Under what circumstances would something like eventlet/gevent be better than twisted? Twisted seems like the most used, but eventlet/gevent must have some advantages... I'm not looking for an answer to a specific scenario, just generalities.
It's an issue of aesthetic preference, I think.
First of all, eventlet can actually use Twisted for networking, so in a sense, it's not an either-or question, it's a this-is-built-on-top-of-that question.
Personally, I don't see the need for libraries like gevent or eventlet, especially since the advent of the @inlineCallbacks
decorator in Twisted, which already write code which sorta looks like it's blocking.
But, if you have a large library of code which already uses threads, and you want to port it to be event-driven, something like eventlet can save you some typing, since you don't need to insert 'yield
's everywhere.. Some people, like the guys behind the EVE online game, think that code written in this style is just better for some things, such as AI code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With