I recently ported a very small micro service from Rocket to Actix and found the migration to be painless. In fact, it's use of types and inferencing along with integration with Serde made it very easy. It also worked on stable-rust and can work with connection pooling against postgres. This makes it a winner in my mind. I'm excited to use it again in my next service.
Actix: a small, pragmatic, and fast Rust web framework
51–60 of 125 posts
Re: Actix: a small, pragmatic, and fast Rust web framework
#52I tried using actix for a recent project. I just could not get it to do what I wanted to. It always felt like a fight. I switched to rocket and everything is so much easier. Everyone is saying great things about it, but I just want to point out that it's not for everyone.
Don't know anything about Actix, but can confirm that Rocket is excellent. The actor abstraction is very interesting, though. Anyone have any insight into how Actix and Rocket compare? I'm interested mostly in ergonomics and safety.
Other than Rocket being nightly, the other reason I switched to Actix was because Rocket doesn't have the ability to respond to requests directly within the middleware layer, you can only modify the response but not return early. This is pretty important with regards to CORS and trying to catch all OPTIONS requests. There are a few solutions of course, but all of them felt hacky or verbose.
I have no complaints with Actix yet.
Re: Actix: a small, pragmatic, and fast Rust web framework
#53I recently ported a very small micro service from Rocket to Actix and found the migration to be painless. In fact, it's use of types and inferencing along with integration with Serde made it very easy. It also worked on stable-rust and can work with connection pooling against postgres. This makes it a winner in my mind. I'm excited to use it again in my next service.
What motivated you to move away from Rocket (just curious, I've only used Iron)?
Re: Actix: a small, pragmatic, and fast Rust web framework
#54What a great looking site. I've been really exciting about actix for a while now. We just started some internal experiments with it here and I'm looking forward to more.
Agreed. Good site. This is an aside, and I sincerely apologize for that, but I am compelled... I'm reading the greeting/hello-world example on this nice site and I notice unwrap_or(). That is a poor name: can it panic, as suggested by the "unwrap" part (I have just enough Rust to know that,) or can it not, as suggested by the "or" part? The name is inherently ambiguous! It's as if the .unwrap() that is festooned thro…
One way to look at them is "unwrap", "or" and "or_else" are building blocks that have a common meaning across the different examples:
- unwrap: returns a plain T
- or: the left-hand side, unless it is a "failure", then use the argument value
- or_else: the left-hand side, unless it is a "failure", then use the argument function to create the value
Re: Actix: a small, pragmatic, and fast Rust web framework
#55Also, what problem is this solving that countless other near identical web frameworks don’t already solve?
Re: Actix: a small, pragmatic, and fast Rust web framework
#56Browsing thru Actix guide ( https://actix.rs/actix/guide/ ), I didn't find any explanation regarding what will happen when actor(s) crashes or how crashes[1] are being handled? http://wiki.c2.com/?LetItCrash
Re: Actix: a small, pragmatic, and fast Rust web framework
#57Nice to see front page example using 'impl', the recent most improvement in ergonomics. Before 1.26 things would be different. This makes me more appreciative of the efforts from Rust team/community to improve the ease of use.
Re: Actix: a small, pragmatic, and fast Rust web framework
#58Why do so many Rust projects lead with telling you their number one feature is type safety? It’s Rust we get it, stop telling us about your type safety! Also, what problem is this solving that countless other near identical web frameworks don’t already solve?
Re: Actix: a small, pragmatic, and fast Rust web framework
#59The benchmark result really confused me. But you'll find that the `actix` actors are extraordinarily lightweight and highly optimized around the equally lightweight and highly optimized Futures. The design is hard to beat, from a performance standpoint.
Re: Actix: a small, pragmatic, and fast Rust web framework
#60Earlier quoted context omitted.
we use actix. but that is all i can share :)
Have you spoken with the Rust core team about Microsoft's use of actix? They love getting feedback from commercial users, and I believe they are willing to sign NDAs when necessary (there's certainly plenty of commercial users they seem to be unable to tell me about, and I ask often :P ). I'm happy to put you in touch with them if you'd like; see my email in my HN profile (and this invitation goes for anyone else out…