[Openstack] eventlet weirdness

Jay Pipes jaypipes at gmail.com
Fri Mar 2 21:00:35 UTC 2012


On 03/02/2012 03:38 PM, Caitlin Bestler wrote:
> Duncan McGregor wrote:
>> Like so many things that are aesthetic in nature, the statement above is misleading. Using a callback, event-based, deferred/promise oriented system is hard for *some*. It is far, far easier for>others (myself included).
>
>> It's a matter of perception and personal preference.
>
> I would also agree that coding your application as a series of responses to events can produce code that is easier to understand and debug.
> And that would be a wonderful discussion if we were starting a new project.
>
> But I hope that nobody is suggesting that we rewrite all of OpenStack code away from eventlet pseudo-threading after the fact.
> Personally I think it was the wrong decision, but that ship has already sailed.

Yep, that ship has sailed more than 12 months ago.

> With event-response coding it is obvious that you have to partition any one response into segments that do not take so long to
> Execute that they are blocking other events. That remains true when you hide your event-driven model with eventlet pseudo-threading.
> Inserting sleep(0) calls is the most obvious way to break up an overly event handler, given that you've already decided to obfuscate the
> Code to pretend that it is a thread.

I assume you meant "an overly greedy event handler" above?

-jay




More information about the Openstack mailing list