내 맘대로 위클리 뉴스 - 2017년 10주(03월 09일)
Python News
-
Zero downtime deploys: A tale of Django migrations
- Django로 만든 프로젝트를 배포할 때 가장 신경쓰이는 데이터베이스 마이그레이션에 관한 내용을 소개한 기사
- 기사에서 사용하는 DB는
Postgresql
을 사용하고 있으며, 마이그레이션을 위해서 정규식을 사용하고 있기 때문에 기술적으로 차이가 발생하는 분들은The Way
부분을 먼저 읽어보시고 진행하시면 좋을 듯!
- The most sensitive step of the deployment process is the change to our database.
- As a result, during a deploy we have a mix of old model definitions and new model definitions running simultaneously. This means that the database must except both the old and the new for a short period of time and that any change we make to the database should not lock up an entire table.
-
Strategies for reducing memory usage in Django migrations
- Django로 마이그레이션을 할 때 메모리가 부족한 문제가 발생 할 때, 메모리 사용을 줄이기 위한 전략 모음을 모아놓은 기사
Django querysets normally perform a certain amount of caching in the background; this is usually a good thing because it prevents unnecessary extra queries to the database. However, in the case of a migration on a table with a large number of rows, the queryset cache can use up a lot of memory. To work around this, querysets offer an iterator() function which will force the queryset not to cache any data. Since data migrations generally iterate through every row in the database exactly once, this is a perfect use-case for iterator().
-
Modern Django: A Guide on How to Deploy Django-based Web Applications in 2017
- 2017년 Django 기반 웹 응요 프로그램 배포 가이드를 제시하는 기사
- 바쁘다면! 'Part 0'과 'Part 1'을 참고!
Mobile(iOS, Android, Etc) News
-
- 효과적인 방법으로 Swift에서 네트워크 작업을 수행하는 방법을 소개하는 기사
- Swfit 코드를 제공하고 있기 때문에 리팩토링 할 때 많은 도움을 받을 수 있음
- 99.99% of all apps talk to the internet at some point so this is a crucial point of any software.
- the scope was to support at the same time two different user sessions (one for the app itself and another for the watch companion app), so a single entity is not only a design issue but a real problem.
-
Offline support: “Try again, later”, no more.
- 오프라인 지원을 위해 설계를 소개하는 기사
- 현재 상태를 서비스와
Sync
하는 방법을 고민하는 분들에게 추천
The internet connection is the most unstable thing that I have ever used. While in 95% of the time it works well, and I’m successfully able to stream my favorite music without any problem and always, always when I’m standing in an elevator and trying to send a message — it fails on me. We, as developers live in an environment where a strong connection isn’t an issue, but the fact is — it is. Even more — just as in Murphy’s law — it will hurt your users exactly when they most need your App to work — and work fast.
JavaScript News
-
- React에서 많이 사용되는 10가지 패턴을 소개하는 기사
So, instead you can create a little module that gives an incrementing ID, and use that in an Input component like so:
-
8 steps to get started with Redux and React — A roadmap
- Redux를 학습하시는 분들에게 적극 추천하는 자습서!
[...] I think it’s one of the better tutorials, as usual from Wes Bos, however I realized it’s absolutely necessary to read the docs to understand the concept of Redux with React. I have also realized that my knowledge on React is also not good enough — make sure to be confident with React alone. I used the roadmap as guide for another app and it gave me a good direction for setting up a basic structure.