Take some time to transcribe PyCon 2014 talks! Click on the "Share" button below the video and then "Subtitle" to get started.
Eventlet: Asynchronous I/O with a synchronous interface (#141)
Eventlet: Asynchronous I/O with a synchronous interface
Presented by Donovan Preston
Network servers which scale to thousands of simultaneous connections have always been possible in Python thanks to libraries such as asyncore and twisted. More recently, FriendFeed's new open source project Tornado has stirred debate in this area. These libraries allow a Python process to scale to many simultaneous connections using non-blocking I/O (also known as asynchronous I/O). However these projects require that the programmer learn a custom API to abstract away the complexities of using a callback-style API.
Eventlet uses greenlet, which provides coroutines as described in "The Art of Computer Programming", to implement efficient cooperative concurrency while retaining synchronous semantics. Eventlet also provides an implementation of the standard library's socket module. Code written to use Python's standard socket library can be transparently converted to use nonblocking I/O and green threads with eventlet. This leads to much greater code reuse and programmer efficiency.