4 ms·
> I once worked on a Java-based server at Google This is kind of a fair comment, but kind of not, because Java performance and GC internals have really advance
by galdosdi 4y ago
> I once worked on a Java-based server at Google
This is kind of a fair comment, but kind of not, because Java performance and GC internals have really advanced a lot in the last decade. It would really help if you qualified approximately when this was.
> Sadly the garbage collection debate is full of people who want GC to be the answer to everything
Good point. I think more recently, the Java world is very aware of this. Native and off heap memory has been getting more use in performance sensitive stuff for quite a while. You can totally just (essentially) malloc and free in Java, if you really need to for performance.
That said, if you want to be able to make your code accessible to a wider audience, GC is a must. There are tons of junior and midlevel developers who don't really have experience working with non-GC application code (and in many cases are intimidated by it!), and you will be restricted from hiring any of them if you use a non-GC language.
If that's ok, then that's ok, but with Java you can still do a little off heap stuff in the critical part you need to, encapsulate it behind a safe API, while letting the juniors run amok in the rest of the codebase.
- deleted 4y ago[deleted]
- kentonv 4y agoI agree with all this. Java is a great application programming language. But bullen was arguing that Java is the best for servers of all types, which is what I object to.
- blub 4y agoIf one considers applications as GUI programs running on consumer hardware like desktops, laptops or smartphones Java is in reality not at all great at this task. It’s better than Rust sure, but definitely worse than C++, C#, Swift or Objective-C which have access to the native UI frameworks of their respective platforms. I’ve had the opportunity to observe Java’s floundering in this area for a couple of decades now and the only decent Java application that I can tolerate is an IDE from Jetbrains. I’m not happy with the performance or UI, but the alternatives are often worse, because in an unexpected twist they’re written in JavaScript.
- origin_path 4y agoIt's worth observing that ZGC can actually do sub-millisecond pauses. That didn't exist when you were at Google and it's still pretty new (and low throughput until they make it generational). But it's definitely on the edge of being able to handle even that sort of demanding latency requirement, at least as long as you aren't overloading the servers.