4 ms·
Javalin is _very_ lightweight, and starts up fast. Use the framework that best suits your requirements. Also, Java is working on reducing ram usage: https://op
by Skinney 5y ago
Javalin is _very_ lightweight, and starts up fast. Use the framework that best suits your requirements.
Also, Java is working on reducing ram usage: https://openjdk.java.net/projects/lilliput/ https://openjdk.java.net/projects/lilliput/
- dzonga 5y agothere's Helidon: https://helidon.io/ https://helidon.io/ as well from Oracle. though at the moment, I'm using Javalin.
- vbezhenar 5y agoI thought so too. And wrote simple web service using Helidon SE. It eats 300+ MB of RAM. I spend some time trying to optimize GC and all that stuff. Similar node service would eat 30 MB of RAM. May be Graal would save us all. Until then Java is beyond salvation.
- kaba0 5y agoOther than a very very niche usecase, I really don’t see how eating 300 MB of RAM is so problematic when we quite literally have servers with terabytes of RAM. Yeah java can be configured to run GC all the time and target <100M of ram, but it rather runs the GC only seldom (jvm is actually one of the most energy efficient runtimed languages out there!) and trades memory usage to throughput.
- vbezhenar 5y agoBecause in the cloud you're paying hefty price for every MB of RAM. For example with Jelastic you have 128 MB per cloudlet. And it's 2x difference between 120 MB and 130 MB. And with dedicated servers I don't have terabytes of RAM, I have two server with 24 GB each. And no, you can't configure Java to target <100 MB of RAM. I configured it with -Xmx64m and it still eats around 300 MB. Java just fat and you can't do nothing about it at this time.