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

Joshua Harlow harlowja at yahoo-inc.com
Tue Feb 4 23:32:52 UTC 2014


Neat, I'd be very interested in asyncio replacing greenlet, then eventlet
(as it currently exists) would 'just work' (hopefully).

That seems to be the most pain-free way of making this happen, while
slowly we keep on removing eventlet where we can (slowly but surely).

Something that might help that I've used in taskflow:

https://github.com/stackforge/taskflow/blob/master/taskflow/utils/eventlet_
utils.py#L96 (might be useful, might not).

-Josh

-----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 12:38 PM
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

>Kevin Conway wrote:
>> Switching our async IO management from eventlet to asyncio would not be
>>a
>> trivial task. Tell me when I'm wrong, but it would require that we
>> completely change our programming model from typical, function-call
>>based
>> programming to use generator-iterators for everything.
>
>My proposition is to put asyncio on top of greenlet using the greenio
>project. So the current code can be leaved unchanged (it will continue to
>eventlet) if you don't want to modify it. New code may use asyncio API
>instead of greenlet/eventlet API, but the code will still be executed by
>greenlet. Or you may have different implementations of the same feature,
>one for eventlet and another for asyncio.
>
>For example, the Oslo Messaging project has an abstraction of the
>asynchronous framework called "executor". So you can use a blocking
>executor, eventlet, trollius or something else. Today, a patch was
>proposed by Joshua Harlow (*) to support concurrent.futures to use a pool
>of thread. I don't know yet how asyncio can be integrated in other
>projects. I'm just starting with Oslo Messaging :-)
>
>The abstraction layer may be moved from Oslo Messaging to Oslo Incubator,
>so other projects can reuse it.
>
>(*) "Start adding a futures executor based executor",
>https://review.openstack.org/#/c/70914/
>
>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