Live data from Hacker News

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

actix.rs

91–100 of 125 posts

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

#91
post #72

Earlier quoted context omitted.

Have you tried to create a more complex web page and have the web frameworks render that as well? Sometimes being the fastest at the most trivial request isn't enough, if it can't handle complex request fast as well. Also, do you have a list of speeds for the frameworks you've tested?

A lot of Rust frameworks use sync io. The first generation does because the libraries for async didn't exist yet, and Rocket doesn't because (last I heard), the author said that he didn't feel the ergonomics were there yet, and that's one of Rocket's primary goals. So that leaves Actix, Gotham, and Shio, basically. Gotham hasn't been tuned for performance at all. I haven't seen any Shio benchmarks. There are a lot th…

From repo activity Shio seems dead. And here is for gotham https://gotham.rs/blog/2018/05/31/the-state-of-gotham.html

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

#92
post #89

Earlier quoted context omitted.

These kinds of tests are heavily reliant on having async IO, and https://news.ycombinator.com/item?id=17194761

Any chance you could elaborate on this, because I dont really understand how it answers my original question. I have not checked recently, but last I saw, the database libraries for rust did not use async IO. Looking at (what I presume is) the code for the benchmark [1], it seems it imports the postgres and diesel crates. Last I heard diesel did not support async [2] and looking at the postgres crate [3] it does not…

> I can see how it has great performance on the plaintext and json benchamrks

I actually forgot the DB tests were implemented; when I was sending in PRs, I was mostly thinking about plaintext and JSON, not database stuff. Sorry about that!

However.

https://actix.rs/docs/databases/

> Technically, sync actors are worker style actors. Multiple sync actors can be run in parallel and process messages from same queue. Sync actors work in mpsc mode.

So, you're still getting some degree of parallelism here. I wonder if that's it?

(You're right about the fact that the DB APIs are currently synchronous.)

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

#93

Earlier quoted context omitted.

A lot of Rust frameworks use sync io. The first generation does because the libraries for async didn't exist yet, and Rocket doesn't because (last I heard), the author said that he didn't feel the ergonomics were there yet, and that's one of Rocket's primary goals. So that leaves Actix, Gotham, and Shio, basically. Gotham hasn't been tuned for performance at all. I haven't seen any Shio benchmarks. There are a lot th…

From repo activity Shio seems dead. And here is for gotham https://gotham.rs/blog/2018/05/31/the-state-of-gotham.html

Yeah, that Gotham news happened after I made this comment. Good to know!

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

#94
post #89

Earlier quoted context omitted.

These kinds of tests are heavily reliant on having async IO, and https://news.ycombinator.com/item?id=17194761

Any chance you could elaborate on this, because I dont really understand how it answers my original question. I have not checked recently, but last I saw, the database libraries for rust did not use async IO. Looking at (what I presume is) the code for the benchmark [1], it seems it imports the postgres and diesel crates. Last I heard diesel did not support async [2] and looking at the postgres crate [3] it does not…

Actix provides actor abstraction over synchronous code and allows to communicate with it in async manner. TechEmpower benchmarks uses sync actors for db operations and http part is async. I am not sure how this help though, tokio-minihttp also uses threadpool for db operations, results are not that good

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

#95
post #29

Earlier quoted context omitted.

I run a public transport website that includes a few mobile apps. I've broken it down into quite a few microservices, but the bulk of it runs on Node and JVM. I have a 64GB RAM, 12 core server, and the JVM services take up about 25% of resident RAM (ignoring Kafka and other Java stuff). I've wanted to learn Rust for a while, so I recently bit the bullet. I use gRPC everywhere (Dart/Flutter, Node, JVM, Python), so I d…

Thanks, situation is similar for me - a 5€ Digital Ocean Droplet (1GB RAM) goes much farther with Rust services than JVM based ones. FYI: https://nevi.me/ errors out with a 502.

Thanks, the Ghost service was down. The blog's back up.

Regarding the RAM, I'll see how far I get with moving some services to Rust in the coming months, and what benefit I derive in the long run.

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

#96
post #89

Earlier quoted context omitted.

These kinds of tests are heavily reliant on having async IO, and https://news.ycombinator.com/item?id=17194761

Any chance you could elaborate on this, because I dont really understand how it answers my original question. I have not checked recently, but last I saw, the database libraries for rust did not use async IO. Looking at (what I presume is) the code for the benchmark [1], it seems it imports the postgres and diesel crates. Last I heard diesel did not support async [2] and looking at the postgres crate [3] it does not…

From my cursory understanding there is following. There is a n async protocol for `postgres` crate called `tokio-postgres`[1] (it's a child crate that is enabled via feature). However, either only Postgres supports async protocols or there isn't an async protocol for Rust outside of `tokio-postgres`.

However, Diesel uses `libpq` over `postgres` (and its child crate `tokio-postgres`). Moving from `libpq` to `rust-postgres` would cause a lot of damage.

[1]https://github.com/sfackler/rust-postgres/tree/master/tokio-...

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

#97
post #88
post #60

Earlier quoted context omitted.

He's the author of actix

So MSFT uses Rust. :) That's actually quite a newsworthy thing, could be a lot more newsworthy if we knew the purpose it was used for was some mission critical component that also needs to be blazing fast. Looking at Rust's strengths, and that MSFT has languages/compilers of it's own, the use case is prolly "mission critical component that also needs to be blazing fast". But for now we're guessing.

MSFT used `ripgrep` for Visual Studio Code IIRC.

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

#100
post #88
post #60

Earlier quoted context omitted.

He's the author of actix

So MSFT uses Rust. :) That's actually quite a newsworthy thing, could be a lot more newsworthy if we knew the purpose it was used for was some mission critical component that also needs to be blazing fast. Looking at Rust's strengths, and that MSFT has languages/compilers of it's own, the use case is prolly "mission critical component that also needs to be blazing fast". But for now we're guessing.

Oracle also uses it, and they changed the Java ONE conference to be Oracle Code ONE conference, including Go and Rust related talks.
Post reply on HN