Jimmy Lai is a Software Engineer in Instagram Infrastructure. His recent interest is Python efficiency, including profiling, optimization and asyncio. He has been sharing his experiences in PyCon Taiwan since 2012. This year, he plan to share his latency efficiency experiences on large scale Python web application.
Adopting Python Asyncio in Large Scale Project (Instagram)
- 地點： R0
- 時段： 第 1 天，16:05‑16:50
- 主題分類： 最佳實踐與慣例
- 語言： 英文演講
- Python 難易度： 中階
Asyncio is one of the new killer features in Python3. It enables concurrent IOs in single thread. Adopting Asyncio in an existing large project is hard because: 1. many changes needs to be made and automation is the key. 2. identify required changes is not straight forward and static analysis with profiling tools is required 3. issues like nested loop and orphan future close loop bug make adoption risky; so bug fixes and optimizations are needed. In this talk, we share our strategy to adopt asyncio and the tools we built: including common helper library for asyncio testing/debugging/profiling, static analysis and profiling tools for identify call stack, bug fixes and optimizations for asyncio module, design patterns for asyncio, etc. Those experiences are learn from large scale project -- Instagram Django Service serves more than 500 million daily active users.