News for hackers. Stuff that matters.
Re:The JVM is not that heavy by martingxx on Wednesday February 01, 2017 @04:56PM (#13545710)
These apps are mostly microservices and the Java ones are mostly only a year or two old. None of them use things like spring. Some use Dropwizard. Would you consider dropwizard modern? If not, what would you use instead?
Re:The JVM is not that heavy by nostrademons on Wednesday February 01, 2017 @07:54PM (#13547074)
Take a look at the TechEmpower benchmarks:

https://www.techempower.com/benchmarks/

DropWizard is modern, but it isn't fast. Go and even Node.js are significantly faster. If you want performance, you cut layers out of the stack - check out the numbers for raw servlets or even just straight Jersey annotations in that benchmark. If I were doing JSON-over-HTTP microservices in Java, I'd likely use straight Jersey + Jackson, or if performance was really a problem, Boon over straight servlets.

What framework did your Go rewrite use? The standard libs?

Re:The JVM is not that heavy by zapov on Thursday February 02, 2017 @12:15AM (#13548292)
Boon is not that fast. It only appears fast on some poorly constructed benchmarks due to some lazy benchmarketing optimizations.

https://github.com/fabienrenaud/java-json-benchmark

Re:The JVM is not that heavy by sk5t on Wednesday February 01, 2017 @11:03PM (#13548009)
On first glance the dropwizard test app appears to be doomed to mediocrity via reliance on hibernate.

Call me crazy, but I like my dropwizard with Spring DI for (singleton) resource setup, a micro-ORM to get work done, and HikariCP datasources at runtime.

Re:The JVM is not that heavy by imtringued on Thursday February 02, 2017 @06:15AM (#13549696)
What's wrong with hibernate? The only thing I can think of is that you're not using "JOIN FETCH entity.relation" when accessing collections and end up with the N+1 select problem but that is because you're using any ORM incorrectly.

Entity framework has include and active record has includes which do the same thing. The qt ORM also has something similar.

The only ORM I have seen that lacks this critical feature is odb. It doesn't allow setting the fetching strategy on a per query basis. You have to either always use eager loading or lazy loading which basically makes it useless for my purposes.

Re:The JVM is not that heavy by sk5t on Thursday February 02, 2017 @10:52PM (#13557528)
Well, for benchmarking the essential framework, which does not mandate any ORM, I would want to use something for data access that takes the question of time spent on type reflection, internal caching, and the like, out of the picture. Hibernate and EMF have their place, but not as part of benchmarking the thing that hosts 'em. Core Dropwizard performance is all about how it uses Jetty, Jackson, and maps requests to resources and operations.
Re:The JVM is not that heavy by hota_mazi on Wednesday February 01, 2017 @11:53PM (#13548213)
> DropWizard is modern, but it isn't fast. Go and even Node.js are significantly faster.

Any benchmarks to provide in order to support this wild claim?

Re:The JVM is not that heavy by nostrademons on Thursday February 02, 2017 @12:08AM (#13548263)
The ones I just linked to above.
Re:The JVM is not that heavy by lenkite on Thursday February 02, 2017 @01:02AM (#13548467)
Use vertx if you want lean REST micro-services. I so wish vertx was part of the standard library.

The main advantages that Go has over Java is that the standard library is brilliant - thus obviating the need for folks to create monstrous frameworks (and losing performance) and that Go has better memory utilization because of value types (structs) and because it is AOT compiled. Unfortunately Java JIT as designed by the JVM devs takes a lot of memory.

In raw performance, I would still give the edge to Java over Golang though.

Re:The JVM is not that heavy by brianwawok on Wednesday February 01, 2017 @05:41PM (#13546133)
A lot more to an app than MCV framework. I realize dropwizard tries to be the everything for the app, but at the core it is a MVC with some bundled libs.