~10min dive to Python Asynchronous IO
HTML version (recommended): https://dl.dropboxusercontent.com/u/1565687/speak/Python3%20AsyncIO%20Horizon/index.html
4. Warmup
!
•
Lazy schedule a task for later
•
Avoid waiting for IO (i.e. 2x DB queries)
•
Solve embarrassingly parallel problems
•
Control and manage status of task
5. PEP index brief
PEP
Name
Status
Doc
PEP 255
Simple Generators
2.2 ✔
»»
PEP 342
Coroutines via Enhanced Generators
2.5 ✔
»
PEP 380
Syntax for Delegating to a Subgenerator
3.3 ✔
»
PEP 3148
Futures - execute computations asynchronously
3.2 ✔
»
PEP 3153
Asynchronous IO support
3.3 ✔
»
PEP 3156
Asynchronous IO Support Rebooted: the
"asyncio" Module
3.4 ✔
»
6. PEP index brief
PEP
Name
PEP 219
Stackless Python
❙❙
PEP 220
Coroutines, Generators, Continuations
✗
PEP 319
Python Synchronize/Asynchronize Block
✗
PEP 3145
PEP 3152
Asynchronous I/O For subprocess.Popen
Cofunctions
Status
❙❙
❙❙
39. Links
•
Video by BDFL Tulip: Async I/O for Python 3
•
Video by BDFL PyCon US 2013 Keynote
•
Code by Nikolay Kim aiohttp
•
Code by google appengine-pipeline
•
Code by google ndb tasklets
Photo by Jake Brown used under CC BY 2.0/“Mono+Tile”