Add a asyncio executor to oslo.messaging
The Enovance company is working actively on porting OpenStack on Python 3, see the status on the Python3 page. Eventlet dependency blocks the portage because it is not yet compatible with Python 3. Even if it would be available, we would like to get ride of eventlet for the reasons listed below.
We choose to start the work in the Olso Messaging project because its design allows to use different "executor drivers", a function to run a task asynchronously. Olso Messaging is a core component and so should be ported on Python 3 first to be able to port other components on Python 3.
The asyncio module is a new and modern asynchronous library which is part of the Python 3.4 standard library. The idea is to add a new asyncio executor to Olso Messaging. At the beginning, asyncio will reuse the greenlet event loop. If an OpenStack server doesn't use eventlet anymore, it will be possible to use an asyncio event loop.
Patches:
* openstack/
* Olso Messaging: https:/
* Olso Messaging: https:/
--
Originial blueprint of Flavio Percoco:
Oslo messaging supports different type of executors. As of the time of this blueprint registration, there are 2 executors currently supported: Eventlet and Blocking.
This blueprint proposes the creation of an executor for asyncio[0] which is part of Python's 3.4 stdlib and has a package for Python 3.3
[0] http://
Victor Stinner: Flavio gave me the right to modify its blueprint. I created this blueprint before I noticed his blueprint:
https:/
Blueprint information
- Status:
- Not started
- Approver:
- Mark McLoughlin
- Priority:
- High
- Drafter:
- Flavio Percoco
- Direction:
- Approved
- Assignee:
- Victor Stinner
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Deferred
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Joshua Harlow: Why directly jump into asyncio (a 3.4/3.3(?) feature) when http://
I've even made an eventlet compatiblity layer @ https:/
--
I think we should go to asyncio because we already have py27 covered with eventlet and we could also add another executor for gevent (which has some work going on for the Py3K compat). The other reason is that we already have a gate for py33 and we won't have one for py32.
-- flaper87
--
I did a mockup of this here: https:/
and the background is discussed here: http://
-- @markmc
--
Hi, I created a duplicate blueprint because I didn't know this one:
https:/
Full specification:
https:/
I ported asyncio on Python 2.6/2.7, it's the new Trollius project:
https:/
Using the greenio module, it becomes possible to use the asyncio API with the greenlet event loop (greenio is an asyncio event loop which calls greenlet).
I just posted an implementation of the blueprint. The patchset is still a work-in-progress:
https:/
Would it be possible to merge the two blueprints? I don't really care of the name, but this one is accepted, whereas mine is still a draft.
Update (2014-02-12): I merged my blueprint wit Flavio's blueprint. Thanks Flavio.
-- @haypo (victor Stinner, Enovance)
---
After some discussion, we're planning on adding a greenio executor in Juno - see https:/
A pure asyncio/trollius executor will come in a future release when we have an OpenStack service sufficently ported that it can use it.
-- @markmc