Tornado, often thought of as a web development framework and toolset is built on top of a protocol-agnostic IOLoop, presenting an alternative to Twisted as a foundation for asynchronous application development in Python. This talk covers the Tornado IOLoop, its features and the process of writing drivers and applications using it.
Abstract
Tornado, often thought of as a web development framework and toolset is built on top of a protocol-agnostic IOLoop, presenting an alternative to Twisted as a foundation for asynchronous application development in Python. This talk covers the Tornado IOLoop, its features and the process of writing drivers and applications using it.
Outline
(30 Minutes)
tornado.IOLoop and tornado.IOStream Introduction (5 Minutes)
Building an event driven server using IOStream (10 Minutes)
Options for Socket Reading
read_until_regex, read_until, ready_bytes, read_until close
Callbacks and handling events
Inspecting state
SSL streams
Diving Deeper, Using the IOLoop Directly (10 Minutes)
Registering events on the loop
When data is available
When we can write to the socket
When there are errors on the socket
Using timers, timeouts and callbacks
Inspecting the stack and debugging
Performance Considerations and Closing (5 Minutes)
CTO at http://MeetMe.com. Enjoys Python, Erlang, RabbitMQ, PostgreSQL, gaming, music, photography and his family. bio from Twitter
96 more videos from PyCon US 2012
Sign in to add slides, notes or videos to this session