So my personal opinion is that u should design your API independent of either 
of these (asyncio, eventlet, threads...),

I think if u design the key parts of your API with the future[1] concept in 
mind then you can easily connect into the future (asyncio or other).

The asyncio layer has a future wrapper of its own (it actually has its own 
future related class[2], both of which are in the standard library to add to 
the confusion/fun...),

But if you target that kind of API (one that can return async objects, futures 
or other) then I think you will be tolerant of changes for asyncio or other...

With taskflow[3] I've tried to do this. It runs tasks/atoms (a taskflow 
concept) via futures and executors (one of its executors actually runs things 
remotely), which hopefully makes it easier to switch in a asyncio executor or 
other in the future, and it also has connections to make it transparent that 
eventlet is just another future executor[4]. But I guess it becomes a question 
of what platform (3.4+) do you want to support  and what design decisions you 
are ok with making that don't affect your current system to drastically...

[1] https://docs.python.org/dev/library/concurrent.futures.html#future-objects
[2] https://docs.python.org/3/library/asyncio-task.html#future
[3] http://docs.openstack.org/developer/taskflow/
[4] 
https://github.com/openstack/taskflow/blob/master/taskflow/utils/eventlet_utils.py#L98

My 2 cents,

Josh

On Sep 12, 2014, at 2:53 PM, Eichberger, German <german.eichber...@hp.com> 
wrote:

> Hi,
>  
> I think the “standard” threading library for OpenStack is eventlet – however, 
> it seems that Oslo is spearheading efforts to get to a more compatible one 
> (seehttp://techs.enovance.com/6562/asyncio-openstack-python3) I am now 
> wondering since we are starting fresh if we should embrace (a potential) 
> future or stick with eventlet and all its flaws?
>  
> Thoughts?
>  
> German
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to