Video, Slides, and Code About Async Python and MongoDB
Video is now online from my webinar last week about Tornado and MongoDB. Alas, I didn't make the text on my screen big enough to be easily readable in the low-res video we recorded, so it'll be a little fuzzy for you. (Live and learn.) No worries, the slides are here in full-res glory and the example code is on GitHub. It's a trivial Twitter clone called "chirp" which demonstrates using a MongoDB capped collection as a sort of queue. The demo uses Tornado, a MongoDB tailable cursor, and socket.io to stream new "chirps" from the capped collection to clients. I've implemented the same demo app three times:
- Once with AsyncMongo, using features I've added in my AsyncMongo fork to support tailable cursors.
- Once with AsyncMongo and Tornado's generator interface.
- And finally, using the official PyMongo, which reveals the tragic consequences of long-running MongoDB queries blocking Tornado's IOLoop.