-
Notifications
You must be signed in to change notification settings - Fork 0
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
Actix. #3
Comments
It is glad to see you here! and I'll summary major difference and make a simple comparison between actix and crossbus, and hope you can get a clue base on these.
theoretically crossbus can do what actix does in a lower level way along with more compatibility. but if you wanna use corssbus as an alternative of actix, there are some major differences you should take an eye on:
the way that crossbus take to tackle async/await is, to some degree, different from that actix takes. take a more specific example, actix has a set of trait and types to asynchronously handle Message request and directly await the returned response future base on what a lot of crates create services / features / functions, like actix-web, actix-net, but crossbus don't do that way, it use the similar way as javascript callback does (in case you familiar with), you just send the message request and set the handler for the ready response, crossbus will do the rest for you. So if you wanna an easy version of actix, the answer is obviously NO,
|
Hey @hominee Thank you for taking the time to look into this, and pull up the good informations provided. Take for instance the following snippets from actix;
Since Can not use actix way handling future and returning its value with atomicResponse, i used block_on which as result, blocks the thread, causing the system to crash specially in the case of using websockets and while blocked a Pong response is not sent, not to mention other issues. Being said, I am thankful to your time here, I am on the phase of finding the right candidate to move on with, not necsserly will opt in but it is always good to know my options. Thank you. |
few separate points are stressed regarding to your problem:
Last but not the least, I don't recommend you to use crossbus given the situation you provide, instead, you should dig deeper over actix. |
Agreed. @hominee Thank you for your time. |
Hello there,
I am comming from actix actors background, it is working really good, especially with StreamHandlers, and webscokets, Now the project is growing and needs to put in place some sqlx queries, and that added a ton of issues, as sqlx is async, and self can not move while holding db connection.
I am wondering if this crate would be an easy convert from actix, without lossing much, and gaining async await handle?
Thank you.
The text was updated successfully, but these errors were encountered: