-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
explain why trio is better, preferably with "real-world" examples #259
Comments
I just saw issue #132, so I guess this is a duplicate. |
You're right, it would be good to have more details here. Briefly in the meantime:
It actually hadn't occurred to me that this part might be controversial :-). Obviously side-by-side comparison is great, but even twisted and asyncio's biggest fans will agree that approachability is not their strongest suit.
The first part of this blog post is exactly that; it uses curio instead of trio for the comparison, but trio is basically designed as a next-generation curio. I've also been thinking that "happy eyeballs" would be a good example for another blog post, since it's a small but real and decidedly non-trivial problem where I can't be accused of cherry picking. (Trio's implementation is in #145; twisted's is in their
Mainly the community and library ecosystem (at least for now). Though this is also what you give up choosing asyncio over twisted :-).
Currently there isn't any particular interoperability story, though see #171 for some notes on how we could fix that. |
Thanks for the explanation. I should have read the blog post again after becoming more familiar with asyncio. The blog post is quite long, so perhaps some bullet points summarizing the differences in addition to a link and examples would suffice. Also, since it looks like asyncio will be acquiring |
s/trio/curio/ and you have exactly described what that blog post is about, especially the "is this fixable" part :-). My conclusion is that when you layer async/await on top of callbacks and protocols then the abstraction leaks a lot and this isn't really avoidable. And AFAIK the planned asyncio changes don't really affect much -- the new thread-local loop tracking is a great feature that solves one of the problems I noted, but it's really the least essential problem. (Heck, in asyncio if you're using the high-level Anyway, I'm definitely not saying that that blog post is the best possible documentation, and I appreciate the suggestions. This is a huge area, different people find different aspects compelling, ... improving the docs/marketing/communication-in-general is an ongoing process :-). So this kind of feedback is very much appreciated -- I'm just trying to give some quick hints as to what the proper documentation might eventually say so that you don't have to wait that long :-). |
Cool, I appreciate this summary, and keep up the interesting work! |
My apologies if this is already covered somewhere. But in the README, it says:
Perusing the docs, though, I can't seem to find any examples explaining why this is the case.
I think it would be helpful if somewhere in the docs you could show why trio is better using concrete examples. Perhaps you could take a couple use cases and then implement them in both trio and asyncio (and Twisted?), and then explain why the trio implementation is simpler, or better, etc.
Also, it would be good to be honest. What does someone give up by choosing trio over asyncio.
Finally, what's involved in transitioning to and from trio? Wholesale rewrite? Can one transition incrementally, etc?
The text was updated successfully, but these errors were encountered: