Live data from Hacker News

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

actix.rs

21–30 of 125 posts

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

#22
post #13

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.

Do you have any performance numbers, or a prior version of this service to compare it to? I'm curious how async in Rust compares to synchronous code in real-world applications, especially given its yet-incomplete state.

Absolutely no idea since we did not replace an existing service. From everything I have seen from tests performance is not a concern here and our bottlenecks are elsewhere entirely.

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

#23
I 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.

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

#25
post #15

I've had relatively good success moving some microservices from Kotlin to Rust (mainly saving about 90% resident memory util). I picked up Actix recently, and so far I'm enjoying using it. If Rust library support for geospatial tools was as good as turf.js, I'd be able to move a lot more stuff into Rust.

Whats your driver? Do you save enough server resources do make it worth it, or is it just a hobby project?

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

#26
post #17

I've recently been building an IRC bouncer and webapp with Actix, and it's been really smooth sailing so far -- excellent documentation, extensive examples, and everything I've touched so far has just worked the way you'd expect it to. It's a gem of a project.

Wanted to do the same exact thing! Is it public?

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

#27
post #15

I've had relatively good success moving some microservices from Kotlin to Rust (mainly saving about 90% resident memory util). I picked up Actix recently, and so far I'm enjoying using it. If Rust library support for geospatial tools was as good as turf.js, I'd be able to move a lot more stuff into Rust.

same question, why moved from Kotlin to Rust all the way.

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

#28

I 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.

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

#29
post #15

I've had relatively good success moving some microservices from Kotlin to Rust (mainly saving about 90% resident memory util). I picked up Actix recently, and so far I'm enjoying using it. If Rust library support for geospatial tools was as good as turf.js, I'd be able to move a lot more stuff into Rust.

Whats your driver? Do you save enough server resources do make it worth it, or is it just a hobby project?

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 decided to start by rewriting some small services in Rust using gRPC for comms.

For now, I've taken a Java service that used 500MB at peak, to under 10MB RAM. I'm planning on eating into the big stuff over the coming months.

It's not making money, so it's a "hobby" yes. Consulting's paying the bills so I don't mind at this point.

EDIT:

E.g. here's an url shortener gRPC server that runs on NodeJS, and a Rust client that can shorten urls and get results back.

https://github.com/MovingGauteng/shorty

https://github.com/MovingGauteng/rust-grpc-shorty

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

#30
post #15

I've had relatively good success moving some microservices from Kotlin to Rust (mainly saving about 90% resident memory util). I picked up Actix recently, and so far I'm enjoying using it. If Rust library support for geospatial tools was as good as turf.js, I'd be able to move a lot more stuff into Rust.

same question, why moved from Kotlin to Rust all the way.

To supplement the other sibling question that I answered:

It's a learning experience. Right now, I can't port everything to Rust, because each platform has its advantages. Rust is still missing a lot of libs that exist in NPM and Maven, so it makes it difficult.

I've been exploring exposing some functions that exist in Java/Kotlin through gRPC (as everything runs on the same network anyways) until it's available on Rust.

I hope to blog about my experiences in the coming days/weeks.

Post reply on HN