3 ms·
You can use Java in a lightweight manner. That's what I'm doing lately. Use built-in com.sun.net.httpserver or add undertow dependency. Enough for HTTP, uses fe
by vbezhenar 8y ago
You can use Java in a lightweight manner. That's what I'm doing lately. Use built-in com.sun.net.httpserver or add undertow dependency. Enough for HTTP, uses few MB memory (I'm running one app on a 256 MB OpenBSD server), starts in a fraction of second. Use JDBC without all those ORM nonsense, you'll have somewhat verbose but pretty obvious code. It's pretty productive environment for me.
- vram22 8y ago>Use built-in com.sun.net.httpserver or add undertow dependency. Haven't used Java for a while, but IIRC, (some of) those star.sun.star classes (as opposed to star.java.star ones) used to be mentioned as liable to be deprecated, so not to be relied on (long term at least). Is that still the case now?
- vbezhenar 8y agoI don't think that this module is deprecated. https://docs.oracle.com/en/java/javase/11/docs/api/jdk.httpserver/module-summary.html https://docs.oracle.com/en/java/javase/11/docs/api/jdk.https... here's documentation for latest Java without any mentioning of deprecation. It's a bit strange module because it was located in that package, but it was always documented, so I'm considering it safe to use for the time being. Probably not the most performant (uses good old blocking I/O), but good enough for many tasks.
- vram22 8y agoThanks.