Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asyncio integration for eventlet #868

Open
6 of 10 tasks
itamarst opened this issue Jan 3, 2024 · 1 comment
Open
6 of 10 tasks

Asyncio integration for eventlet #868

itamarst opened this issue Jan 3, 2024 · 1 comment

Comments

@itamarst
Copy link
Contributor

itamarst commented Jan 3, 2024

Motivation

A migration path off of eventlet for libraries/applications that exclusively rely on eventlet

Eventlet has different users with different use cases. This issue covers one specific subset of users: those who deliberately choose eventlet as their exclusive networking/event loop solution. A notable and relevant example is OpenStack.

My basic assumption is that the monkey-patching approach used by eventlet is fundamentally non-viable without massive engineering resources. For example, consider all the effort being put into patching RLock, when patching it actually introduces bugs (e.g. https://bugs.python.org/issue13697). A correct solution would involve maintaining a custom C RLock, and C Queue, and so on. And the more the Python stdlib changes, the harder eventlet maintenance becomes.

As such, I believe eventlet-only users are likely better off switching to event-driven frameworks like asyncio.

Access to asyncio libraries

Even if you disagree with the above, or you're a user who doesn't fit the above criteria, access to asyncio libraries in eventlet code is useful. Eventlet used to have Twisted support for this reason.

In general I don't think new features should be added to eventlet (see #835), but given that this aids with migration I think it's worth it.

I also believe it's easier to do this inside of eventlet rather than as an external project (see eventlet/aiohub#2).

The work involved

Prior art for gevent suggests this all should be possible. Each of these should be done as its own issue.

Questions

@temoto @tipabu what is your opinion on this approach of integrating asyncio and eventlet?

@4383
Copy link
Member

4383 commented Jan 10, 2024

Hello,

I agree with this proposal.

Itamar's proposal, will provide an official migration path to asyncio. This is well aligned with the fact that we want to discourage new usages of eventlet, and this is well aligned with our agreement to move maintenance to a legacy mode (#850).

As I already said (#824), from an Openstack perspective, our long term plan is to retire from eventlet and if nobody volunteer to maintain eventlet again, then retire eventlet in the same time. But we want to be transparent. We want to officialize our position and the impact on the future of this project. This proposal lays the foundations of this planed retirement.

This thread was initiated more than 3 weeks ago (eventlet/aiohub#2) and nobody raised any concerns or objections, so I think we can now move forward. I think we can start updating our maintenance goals (#850) to reflect the fact that no new features will be added to eventlet or accepted in PR, apart, those related to the asyncio hub (so far named aiohub).

We could leave this thread opened, until the support of eventlet is fully implemented. This thread would be a place to track the discussion and the advancement.

The aiohub discussion can be now closed eventlet/aiohub#2. However, as we don't have the owner rights on this organization, we are not able to remove the aiohub repository. We could simply update its readme file to redirect here and leave this repo opened just in case we need a parallel repository.

I'm gonna start reviewing and merging the related pull requests (#870).

Thanks @itamarst for your proposal.

@4383 4383 added the asyncio label Mar 13, 2024
4383 added a commit to 4383/eventlet that referenced this issue Mar 25, 2024
In accordance with our recent maintenance goals we sets [1][2] and in
accordance with the recent addition of the asyncio hub [3], this patch
proposes to deprecate all the other existing hubs, the non asyncio hubs,
to encourage users to start their migration to asyncio.

[1] eventlet#835
[2] eventlet#824
[3] eventlet#868
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants