Live data from Hacker News

IT Runs on Java 8

veekaybee.github.io

371–380 of 556 posts

Re: IT Runs on Java 8

#371

Earlier quoted context omitted.

I'm curious to hear what specifically is too bloated in Spring Boot in your opinion for container based microservices. I've been writing microservices that run in docker in Java for a few years, then moved to Kotlin recently, all using Spring Boot, and I haven't run into anything that made me feel like they were bloated. I've also written Go and Node microservices for contrast.

Spring boot has a large startup time, heavy dependency trail and a lot of dynamic class-loading based off auto-configuration. This makes it un-suitable for some areas: if you desire fast scaling micro-services that respond quickly to incoming load. Or say you want to transform your micro-service to a server-less function. One can do that with Graal VM to compile your micro-service to a single binary with microscopic…

I'm reminded of the crazy stunts from the 1980s where people would start some big, slow program (Emacs was huge!), dump core, and then "undump" to make a pre-initialized binary that would start as fast as the OS could read it. It actually worked, as long as it wasn't relying on open file descriptors, or signal handlers, or env vars, or …

Re: IT Runs on Java 8

#372
post #280

Earlier quoted context omitted.

> .NET has both of them I'll give you value types, but reified generics in .NET were a mistake. It really makes interop and code sharing among languages hard, in exchange for a rather slight added convenience. This means that if you're a language implementor and you're targeting .NET, you'll get much less from the platform than you would if you target Java, which makes .NET not a very appealing common language runtim…

Dumb question. Why do reified generics make interop challenging? Or is it reified generics plus value types that don't inherit system.Object? Couldn't the language implementations basically pass around ICollection in .NET somewhat similar to how they do in Java?

> Why do reified generics make interop challenging?

Suppose you have types A and B, such that A and List? This question is called variance, and different languages have very different answers to this, but once generics are reified, the chosen variance strategy is baked into the runtime.

> Couldn't the language implementations basically pass around ICollection in .NET somewhat similar to how they do in Java?

They could, but then this adds significant runtime overhead at the interop layer. For example, a popular standard API may take a parameter of type List. How do you then call it from, say, JavaScript, without an O(n) operation (and without changing JS)?

Re: IT Runs on Java 8

#373
post #370
post #85

The funny thing is that from a purely technological point of view, Java (even the 5-year-old Java 8 and certainly recent versions) is far ahead of most other stuff hyped on HN (as well as less hyped stuff). Virtually no other platform comes close to that combination of state-of-the-art optimizing compilers, state-of-the-art GCs, and low-overhead in-production profiling/monitoring/management. And much of the cutting-e…

Java itself is fine. It's very popular--and that's the biggest problem. Not the language as such but the developer ecosystem around it. I am dead tired of seeing 80-character camel-case function and variable names, annotations that hide critical functionality of the code, stack traces dozens or hundreds of lines long because of the amount of indirection and poorly conceived configuration "languages" used to support d…

"80-character camel-case function and variable names"

Isn't that a good thing? Tell all of us developers who write clear, clean code why you think that is bad?

I don't ever get to 80 characters but I do write methods names that describe exactly what they do. If I can write it comfortably then I know I tried to do too much in the body.

Re: IT Runs on Java 8

#374
post #280

Earlier quoted context omitted.

> Technically there is nothing I don't like about JVM right now, everything that seems impossible 15 years ago is now solved. Value types are a major missing piece in the JVM stack right now. It's at least on the roadmap, but it keeps getting pushed back and back and back. I'd also argue runtime generics is another one, and perhaps more depressingly one that is unlikely to ever get fixed. .NET has both of them and al…

> .NET has both of them I'll give you value types, but reified generics in .NET were a mistake. It really makes interop and code sharing among languages hard, in exchange for a rather slight added convenience. This means that if you're a language implementor and you're targeting .NET, you'll get much less from the platform than you would if you target Java, which makes .NET not a very appealing common language runtim…

The user is what matters. As a language user I want reified generics. Don't care what the implementers want.

Re: IT Runs on Java 8

#375

Earlier quoted context omitted.

Yeah, there is the legacy of the thousands of mature libraries, frameworks and development tools. Legacy isn't always a bad thing.

Having moved to a stack with a much more competent standard library, it's much nicer to have that great standard library than to have to wade through a rich set of libraries all the time to achieve the same thing. I'm talking about Go, of course. It's just nice getting right to work coding up an http server without having to think about what "web framework" I should need to select, or which logging library to use.

What stack?

Re: IT Runs on Java 8

#376
post #292

Earlier quoted context omitted.

> You also need to realize that it wasn't a negotiation between Oracle and some grassroot project, but among multi-billion-dollar corporations, some of whom have fought Java standards for over a decade, so the process was both legally and politically complex. Yes exactly, I think that is what makes if feel like not the safest choice for many companies.

Java EE has not been the preferred choice for many companies long before this issue, which, I guess, is at least part of the reason why Oracle gave up those projects. I think Spring is the leader, but I am really not too familiar with that entire domain.

That's right that _pure_ JEE has not been preferred, but part of my original point is that simple things like servlets are actually technically part of JEE - so if you are using Spring for web, cloud, etc then you are actually using JEE at least a little bit.

Re: IT Runs on Java 8

#377

Earlier quoted context omitted.

> What I really want is to get a "lite" Java project like this up and running with all of the smart people's opinions in place that I can develop entirely in a lite editor (preferably without XML anywhere). That's pretty much the original value proposition for Spring Boot. "I just want to get to work". I used Spring Boot before encountering a Spring 3 project. The difference is phenomenal. Disclosure: I work for Pivo…

Spring boot still requires gradle, which is much more complex than naive use of npm or python pip. In the long run java build tools are better, but due to the learning curve a lot of folks balk (leave) and use a different stack. Whoever is in charge of openJDK should just adopt kotlin as java 14 even if it was Not Invented Here.

Spring Boot works with both Gradle and Maven.

https://start.spring.io/

Re: IT Runs on Java 8

#378
post #370
post #85

The funny thing is that from a purely technological point of view, Java (even the 5-year-old Java 8 and certainly recent versions) is far ahead of most other stuff hyped on HN (as well as less hyped stuff). Virtually no other platform comes close to that combination of state-of-the-art optimizing compilers, state-of-the-art GCs, and low-overhead in-production profiling/monitoring/management. And much of the cutting-e…

Java itself is fine. It's very popular--and that's the biggest problem. Not the language as such but the developer ecosystem around it. I am dead tired of seeing 80-character camel-case function and variable names, annotations that hide critical functionality of the code, stack traces dozens or hundreds of lines long because of the amount of indirection and poorly conceived configuration "languages" used to support d…

We aren’t talking about Java the language. We are talking about the JVM.

Re: IT Runs on Java 8

#379

Earlier quoted context omitted.

It takes a lot of power to push something that large. A lot of brain power to grock the ecosystem. Outside of the Java bubble, the view is quite a bit different. All that sophistication looks like a wasted effort. Take something as simple as admining the garbage collector. Java has a big selection of GCs, and each has their bunch of knobs for tuning. And you have to pay attention to that stuff. After working with Go…

I'm not saying I disagree but for a lot of businesses (even one with relatively high traffic) it is not unheard of to deploy with almost no tuning of the GC (aside from setting a heap min / max of 2,4,8GB) and have no issues.

I'm sure this all depends on use-cases, but I'll chime in to agree. I work on web services that do high (not Google high, but you've-heard-of-it high) levels of traffic, we run on the JVM, and GC pauses are not something that cause us to lose any sleep using out-of-the-box settings + explicit heap min/max.

Re: IT Runs on Java 8

#380
post #85

The funny thing is that from a purely technological point of view, Java (even the 5-year-old Java 8 and certainly recent versions) is far ahead of most other stuff hyped on HN (as well as less hyped stuff). Virtually no other platform comes close to that combination of state-of-the-art optimizing compilers, state-of-the-art GCs, and low-overhead in-production profiling/monitoring/management. And much of the cutting-e…

I was never super into Java development. I started working in 2014 and was introduced to Weblogic, Jenkins, huge Maven POMs and all the rest, then went into Cloud consulting. When I sit down to do anything I get so wrapped up in all the stuff that comes along with Java and feel like I have to use some huge IDE like Eclipse (I hate) or IntelliJ (I If I could just write code and have a simple package manager like NPM o…

For your web apps / services / APIs, check Dropwizard, it is not what I would call "bleeding edge", but it provides a reasonable base and has always allowed me to easily work with the rest of the awesome JVM ecosystem. My Dropwizard projects are usually cruft/magic free, start in less than 5 seconds, consume predictable resources and is easy to reason about, troubleshoot and improve.

I used to be a big fan of Spring(-boot) with MVC, but since I tried Dropwizard I never looked back. I'd still do Spring but perhaps for non-mvc/web needs.

Post reply on HN