Live data from Hacker News

Actix: a small, pragmatic, and fast Rust web framework

actix.rs

1–10 of 125 posts

Re: Actix: a small, pragmatic, and fast Rust web framework

#3
Actix-web is great! I've adopted it for my projects. I can take full advantage of what Rust offers for concurrency and safety without going too deep into the weeds. Documentation, a growing number of examples, a very responsive author, and growing community are some of the reasons why I think this project is going to play a major role in Rust's web development story going forward.

Re: Actix: a small, pragmatic, and fast Rust web framework

#8
We use it at Sentry for one of our services and the experience has been great. The best part by far is that you can benefit from async io handling without having to write every one of your views in an async fashion. All the async complexity is offloaded into the extractors and the response sending.

Re: Actix: a small, pragmatic, and fast Rust web framework

#9

Can someone explain to me what advantage the actor model provides for a web server?

Actors are generally a very powerful abstraction.

To give a specific example: they can be used to mediate access to a resource without requiring complex synchronisation: instead of sharing a piece of mutable state (like a cache) and protecting it with a lock, you can ensure a single actor accesses the cache, and other code communicates with that actor.

This is particularly useful with asynchronous code, because it's not possible to have a fair, asynchronous "passive" mutex without suffering from the thundering-herd problem. If you try to implement such a mutex, you will find yourself needing to queue up lock requests and responses, and you will end up reinventing the concept of an actor.

Post reply on HN