Fast event driven socket server framework based on pyev

pip install whizzer==0.4.0



Whizzer is a python library to help write fast non-blocking socket servers.

Whizzer uses class templates to write callback driven programs. Callbacks
are initiated from the C event loop library libev and its python wrapper
pyev. The event loop itself is as fast as any other modern C event loop using
epoll and heap timers. It is much faster than an event loop written purely
in python.

Whizzer supports limited coroutines as well without any form of stack storing
by recursively calling in to the main loop. Coroutines are limited by the
size of the stack and the stack depth limit set in python both of which are
relatively simple to adjust though limited. It does not attempt to store task
state between task switching in any novel ways that may break C extensions.

Whizzer is similiar in style to twisted in that it provides class templates
which may be derived and further defined to implement only the necessary 
functionality. Implementing a protocol in Whizzer means deriving the Protocol
class and implementing a few methods.

Whizzer strives to be very fast, tested, and relatively simple.

Whizzer attempts to have the following features packaged with it.

* Python 2/3 compatible
    * Namely Python 2.7 and python 3.2 or better
* Fast RPC protocol implementations (msgpack-rpc, json-rpc, pickle-rpc)
    * 100k+ notifies/s (one way calls, no responses)
    * 20k+ calls/s (request/response rpc calls)

In the future it would be nice to have a WSGI handler based on Ryan Dahl's C
http protocol parser.

Ad-Hoc Benchmarks

On my Athlon II X4 I can get the examples/servicefork.py to show close to
400k notifications a second.