3. Itinerary
I. A bit about AddShoppers
II. What is asynchronous
programming?
A. In general
B. In python
III. Why does it matter?
A. Are there benefits?
B. Is it worth using?
IV. How do I use it?
A. Which libraries should I use?
B. What kind of support can I
expect?
V. Demo
4. How are we using
asynchronous Python at
AddShoppers?
5. AddShoppers
● ### million requests per day, ####
rps
● Hanes, American Giant, Jockey,
more
● ## app servers (all tornado), ## db,
## cache, ## queue
● ## data pipeline servicing ~ ### rps
(asyncio)
● Hiring? Yes, please.
13. Event-loop (continued)
● The CPU very often context switches at non deterministic intervals.
● Allows the programmer to mark context switches
● Single threaded (don’t use synchronous code in your thread)
21. Common Use Cases
● Real-time web. Anything that requires long lived, mostly idle connections from
users.
● Network I/O. Waiting for HTTP requests to return.
● Database calls. Waiting for a database to return a query.
● Filesystem. Waiting for a disk.
● Anything else non CPU bound.
22. How do I write asynchronous
programs in Python?
23. Libraries
● Tornado Web
● asyncio
● Twisted (Event driven networking engine)
● Gevent (Networking library)
● Cyclone (Tornado API on top of Twisted)