[openstack-dev] Asynchrounous programming: replace eventlet with asyncio

Joshua Harlow harlowja at yahoo-inc.com
Tue Feb 4 18:53:06 UTC 2014


I was just thinking that openstack would be better to slowly get off
eventlet (avoids the large amount of changes this new mostly
untested/unproven tulip/trollius framework introduces). A first step could
be to replace the greenlet layer with asyncio (or similar). Then the
eventlet layer still exists (and all its funky monkey patching). Then as
asyncio matures and is proven as the way to go (it doesn't quite seem to
be this yet, even with guido sponsorship) then we slowly cut out eventlet
and directly replace it with asyncio (the bigger change imho).

Just an idea...

I would sort of expect this to happen in the community anyway; seeing that
a lot of people are used to eventlet (warts and all) so the easiest path
for them to asyncio is to just have have a new layer underneath eventlet
that works with asyncio. Isn't this what the twisted folks are doing (to
retain the twisted API while using asyncio underneath)?

-----Original Message-----
From: victor stinner <victor.stinner at enovance.com>
Reply-To: "OpenStack Development Mailing List (not for usage questions)"
<openstack-dev at lists.openstack.org>
Date: Tuesday, February 4, 2014 at 10:07 AM
To: "OpenStack Development Mailing List (not for usage questions)"
<openstack-dev at lists.openstack.org>
Subject: Re: [openstack-dev] Asynchrounous programming: replace eventlet
with	asyncio

>Hi Joshua,
>
>> Why not just create a eventlet "micro" version that underneath uses
>>asyncio?
>> Then code isn't riddled with yield from or Return() or similar. It seems
>> possible (maybe?) to replace the eventlet hub with one that uses
>>asyncio?
>> This is then a nice change for all those who are using eventlet.
>
>I don't understand what do you expect from replacing the eventlet event
>loop with asyncio event loop. It's basically the same.
>
>The purpose of replacing eventlet with asyncio is to get a well defined
>control flow, no more surprising task switching at random points.
>
>You may read the report of Guido van Rossum's keynote at Pycon 2013, he
>explains probably better than me how asyncio is different from other
>asynchronous frameworks:
>http://lwn.net/Articles/544522/
>
>For more information, see my notes about asyncio:
>http://haypo-notes.readthedocs.org/asyncio.html#talks-about-asyncio
>
>Victor
>
>_______________________________________________
>OpenStack-dev mailing list
>OpenStack-dev at lists.openstack.org
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list