Techniques such as using generators and defgen, using Twisted's thread support and
how to rewrite existing code for an event based network will be explained, all
arranged around a hypothetical protocol for saving and restoring key/value pairs.
Non-event-based code will be shown, and incrementally modified to integrate with
Twisted's native facilities. The technique of breaking up synchronous code along
waiting points, using deferreds and explicit state management, will be covered, as
well as using defgen to make this easier, and using Twisted's built-in thread pool
management when needing to integrate with inherently-blocking code.