Twisted + Orbited = Crazy Delicious

April 13th, 2007 by Michael Carter

There are all sorts of fun prototypes you can build using orbited and your favorite web framework. Unfortunately, most of these applications will never scale past a few hundred users on a single node. The reason is that your favorite web framework is probably pretty bad at network IO. It almost certainly dispatches each request to its own thread. And to add insult to injury, these applications probably won’t be very interesting.

Can your web framework create an IRC connection for every user logged into the system? Can it do it fast? Can it do it for more than 24 users? Well, guess what: Twisted can do all of that. For hundreds, if not thousands of users. It is event based, highly scalable, and has almost more protocol implementations than existing protocols.

Both Orbited and Twisted are event based. Both are targeted at low-latency and high scalability applications. Orbited is about receiving real-time notifications; Twisted is about connecting to real-time sources. If you want to connect X to orbited, where X is anything on the internet, then Twisted can do it and do it well.

To this end, I’ve written a twisted-orbited client (Update: This is now part of the pyorbited project) and done some rudimentary tests. I sense the beginning of a great relationship.

Leave a Reply