4 ms·
I've been writing servers in Rust and I don't really agree. Granted, these may not be traditional HTTP servers - they're AWS lambdas, which puts them closer to
by staticassertion 8y ago
I've been writing servers in Rust and I don't really agree. Granted, these may not be traditional HTTP servers - they're AWS lambdas, which puts them closer to the "some function" than "some server" depending on how you look at it.
They work great, I've been able to iterate extremely quickly on a system that has had its requirements changed quite a lot over time.
I haven't spent much time optimizing my code at this point but they execute extremely quickly, much faster than my Python lambdas.
Regarding the author's complaints:
I haven't needed any async. I use threads and it's fine. When async/await is a thing I'll use it, maybe - I really don't think it's going to make a difference but it might free up some memory that I can throw at caching.
Error handing in Rust is still a bit uncomfortable. The failure crate has been working for me but it doesn't always feel 'right'.
- dnautics 8y ago> they're AWS lambdas those are not servers! In fact the branding of AWS lambda is exactly "serverless". You don't have to have process restart logic, they're very transient, if a process error causes a crash (yes that happens even in rust) the entire thing is taken down. They're less of a server than a kubernetes-orchestrated container.
- staticassertion 8y agoSure, sorry, I meant services where I wrote "servers" and it's likely the person I responded to did as well. I don't think it changes anything about what I said - process restarts aren't something I'd care about the language for anyways, I'd have a sidecar for that.
- youeseh 8y agoHey there, yes. I guess I meant "services" / servers. I suppose from my point of view - small fish in the ocean - I suppose Rust services running on lambda would be a-ok. I'd love to learn more about how you build and deploy. Do you have any favorite articles / resources that I should look at?
- steveklabnik 8y agoHere’s my favorite success story about Rust on lambda: https://andre.arko.net/2018/10/25/parsing-logs-230x-faster-with-rust/ https://andre.arko.net/2018/10/25/parsing-logs-230x-faster-w... This is before they offered official support though. Here’s the announcement for that, which links to resources: https://aws.amazon.com/blogs/opensource/rust-runtime-for-aws-lambda/ https://aws.amazon.com/blogs/opensource/rust-runtime-for-aws...
- youeseh 8y agoHey, thanks! =)
- staticassertion 8y agohttps://insanitybit.github.io/2018/11/05/deploying-grapl-with-aws-cdk https://insanitybit.github.io/2018/11/05/deploying-grapl-wit... Here's a post on how I use AWS's "Cloud Development Kit" to do my deployments. Builds are through Docker. Source code: https://github.com/insanitybit/grapl https://github.com/insanitybit/grapl
- youeseh 8y agoRight on! Thank you =)