I have a small homelab running a few services, some written by myself for small tasks - so the load is basically just me a few times a day.
Now, I’m a Java developer during the day, so I’m relatively productive with it and used some of these apps as learning opportunities (balls to my own wall overengineering to try out a new framework or something).
Problem is, each app uses something like 200mb of memory while doing next to nothing. That seems excessive. Native images dropped that to ~70mb, but that needs a bunch of resources to build.
So my question is, what is you go-to for such cases?
My current candidates are Python/FastAPI, Rust and Elixir, but I’m open for anything at this point - even if it’s just for learning new languages.
I feel like in a lot of ways, most languages are great candidates for this, for lots of different reasons!
Buuuuut, Rust’s compilation can be pretty resource intensive, so if you’re actually developing on limited hardware:
Then there’s the fact that it’s a home server, so always on, meaning you actually have generous resources in some ways, because any available CPU is kinda just there to use so:
And then why not go whole hog into the world of experimental languages:
And then we’re forgetting about:
But that doesn’t factor in:
Plus:
Edit: My actual serious answer is that Rust + Rocket would be great fun if you’re interested in learning something new, and you’d get very optimised code. If you just want it to use less memory that java and don’t want to spend too much time learning new things then python is probably fine and very quick to learn. Go is a nice halfway point.