[Openstack] eventlet weirdness

Caitlin Bestler Caitlin.Bestler at nexenta.com
Fri Mar 2 20:38:57 UTC 2012


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.

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.






More information about the Openstack mailing list