News for hackers. Stuff that matters.
Re:Microservices in Java – A Second Look by beders on Wednesday October 18, 2017 @04:48PM (#15502884)
Did you just compare running a fully fledged server application framework with a simple Go and Python server? What was the point here?
Re:Microservices in Java – A Second Look by mmargerum on Thursday October 19, 2017 @06:13AM (#15506710)
What would be in the “fully fledged server framework” that’s not in the Go standard library aside from sessions which is easily added with the gorilla library
Re:Microservices in Java – A Second Look by cosminaut on Friday October 20, 2017 @07:47AM (#15514986)
The article's POM depends on spring-boot-starter-web. Here are some of the things you get with that:

* Dependency Injection (@Autowire)

* Externalized configuration (change app settings via CLI or environment variables) with profiles (think DEV,PROD)

* Out of the box logging (think log levels, configurable per logger)

* Remote administration via JMX (runtime administration)

* An ORM (Hibernate)

* A unit testing framework with mocking (JUnit, Hamcrest, Mockito)

* Remote debugging via JVM debugging port

Going beyond the simple app, you can take full advantage of the Spring Boot ecosystem of dependencies to pick and choose only the dependencies you need, while being able to do anything that a cloud app might need to do.

If you don't need all that, you can always fall back to the simple HttpServer example he gives in the article and still get a small footprint.

The article compares Java 8 to the others. I'd love to see a comparison to Java 9, where hopefully the modularization of the JVM will lead to a smaller overall runtime and memory footprint.

Re:Microservices in Java – A Second Look by haglin on Friday October 20, 2017 @12:48PM (#15517197)
JDK 9 also comes with compact strings which can reduce the heap with 5-15%[1] and with -XX:+UseStringDeduplication, AppCDS and AOT the memory footprint can be reduced even more.

[1] https://www.infoq.com/news/2016/02/compact-strings-Java-JDK9