← Back to team overview

nova team mailing list archive

Re: Twisted or Eventlet?

 

On Fri, Jul 30, 2010 at 07:25:44AM -0500, Michael Gundlach wrote:
> When I researched Twisted, I read or got the impression that:
> - it had a "near-vertical learning curve"

It does have a learning curve. No doubt about that.

> - it was named Twisted for a reason -- that it's hard to think the way Twisted needs you to think

That's the aforementioned learning curve again. :)

> - its libraries were a morass (the homepage talks about having two web frameworks and it's not clear which one to choose)

I've heard this many times and the homepage even mentions this
confusion, but I've never quite understood the confusion :) Everything
clearly says that twisted.web is what you want to use:

   http://twistedmatrix.com/trac/wiki/TwistedWebPlan

   http://twistedmatrix.com/trac/wiki/WebDevelopmentWithTwisted

   http://twistedmatrix.com/trac/wiki/TwistedProjects

   http://twistedmatrix.com/trac/wiki/TwistedWeb2

> When I researched Eventlet, I read or got the impression that:
> - it is clean and intuitive to code in
> - it was the thing that came along after Twisted to solve the problem in a better way
> - momentum was gaining around it while Twisted was losing momentum

My primary objections to eventlet (or arguments for Twisted) are:

 - I've been spoiled by Twisted's immense library of... well, all sorts
   of stuff: Transports and Protocols of course, but also all the other
   utilities included in Twisted. I expect to miss a lot of that.

 - While it takes a while to learn to think in terms of events, it's
   still just standard Python. You call methods on things, and they
   return values. Sometimes the reactor calls methods on things for you,
   but still it's the same concept. No new primitives (like coroutines)
   to have to deal with.

 - Maybe it's just me, but having to debug something that makes
   non-blocking I/O appear blocking does not sound like an enjoyable way
   to spend an afternoon. It just sounds too much like magic. I'd be
   happy to be proven wrong, though.

-- 
Soren Hansen
Systems Architect
The Rackspace Cloud



Follow ups

References