Better asynchronous code with Tornado and Python 3
summary
Tornado runs on the asyncio event loop and uses Python 3’s subgenerator delegation to turn blocking calls into futures so sequential code stays readable. The demo builds an HTTP proxy using Tornado’s async HTTP client and yield from to fetch three backends in parallel, measuring ~22 ms versus 54 ms for blocking, with Node.js at ~18 ms and Scala comparable; a concurrency sweep to 20 requests exposes scaling patterns. The code is production-proven at Scooby and the proxy demo works.
AI-written summary · about
chapters (12)
- 0:00Start
- 2:23Challenges
- 3:29Overview
- 4:37Recap of the Web Server Execution Models
- 10:25Callbacks
- 13:12The Future Object
- 16:04Event Loop
- 22:02Why Do You Need a Future Object
- 22:37Why Do We Need the Future
- 27:11Async Http Client
- 28:17Nodejs
- 31:24Scala
related talks
27m"Python’s tale of concurrency"
35mHow Do Python Coroutines Work?
47mTaking Asynchronous Python to the Next Level Using Trio
30mLet's get you started with asynchronous programming
56mLeveraging Async and Await in Modern Python
30mDesign and implement a scalable and high performance tcp server with tornado
20mIt's Critical: Concurrent programming as a sane programming model
01h 29mStandardised Coroutine Concurrency in Python 3
