← Back to team overview

nova team mailing list archive

Re: Twisted or Eventlet?

 

On Wed, Aug 04, 2010 at 12:03:49PM -0400, Michael Gundlach wrote:
> - hazmat's experience during his lightning talk (see the same thread)
> is a good datapoint verifying that people unfamiliar with either
> project will probably prefer to work with Eventlet over Twisted: good
> for recruiting.

I'm quite sure there's more people out there familiar with Twisted than
there are people familiar with eventlet. Twisted has been around for a
while. That's also good for recruiting.

> - It's a weaker argument, but it's really hard to find any comparisons
> between Twisted and Eventlet on the web that say Twisted is preferable
> (has anyone found any?)

I can write one, if you want? :)

> And as always, there's the argument that Eventlet code is easier to
> read and understand, and therefore to maintain.

This has been repeated over and over, but I don't think there's been any
concrete examples of this?

> I'm going to be working on adding the RS API to Nova, and I'm going to
> proceed in Eventlet.  If anyone feels strongly that we must use
> Twisted instead, speak up; otherwise, shall we call this decision
> made?

It's been suggested several times that we implement something using
eventlet, so that we have something concrete to compare. I'm fine with
that thing being the RS API, so that we can add some substance to this
discussion.  I think that's a better basis for a decision than knowing
that someone having told someone else something (which we don't know
what is) about two different things, and these people (who are not the
people working on Nova) felt they liked one of the things more than the
other. I agree it's a data point, but I'd like to make my decisions
based on my own opinions rather than those of strangers.

I think I've said it before, but I'd like to say it again: I really
don't mind code looking asynchronous if I expect it to act
asynchronously.  Stuff happens, it gets handled.  The Twisted framework
provides a bunch of protocols that let you write code this way and it's
easily extensible. Once you get the hang of that it's really quite
straightforward.

Most people aren't used to writing async code, so it may take them a
little bit to wrap their heads around it if they want to architect new
components, but for the odd bugfix, I really don't thinks it's something
you need to worry too much about.  I think it's being made out to look
like using Twisted makes it take a Herculean effort to write even the
simplest things, while Eventlet code magically writes itself. I doubt
that's really the case.

Twisted is a big framework with a bunch of code to do common things that
are a chore with the Python's standard library. Eventlet may let you use
the standard library in an asynchronous way, but you're still stuck with
the standard library :)

-- 
Soren Hansen
Ubuntu Developer
http://www.ubuntu.com/



Follow ups

References