logoalt Hacker News

Why low-latency Java still requires discipline?

65 pointsby theanonymousonetoday at 1:03 PM35 commentsview on HN

Comments

motoboitoday at 2:27 PM

I found claude and GPT very helpful on this, because java have a very sofisticated monitoring harness. Just ask the agent to connect to the running application (on kubernetes or whatever) on prod and do a java flight recording then analyze allocations.

I managed to improve some applications of ours from several garbage collections per second to several minutes between collections. That _really_ improves p99.

show 4 replies
chuckadamstoday at 2:32 PM

I get that blog posts often advertise a company's products, but this one had absolutely zero content other than advertising.

show 3 replies
sandeepkdtoday at 4:37 PM

Had to write a router software once in Java back in 2014. The past experience in me believed that its not a good choice to use something with stop the world GCs for routers. The goal was to have everything under 1ms (max 2ms in rare cases). It has http server on head and websocket connections on the tail end. Turns out the class instantiations and JSON parsing were a bottleneck. Thread safe resources were valuable, the libraries which did not had thread safe resources were re-written to support what we needed. The http server was re-written barebones, the JSON parsing was re-written with barebones. And it worked.

pjmlptoday at 3:04 PM

Even C requires discipline to write low latency code, if you think otherwise, you never used a profiler.

show 2 replies
treydtoday at 3:24 PM

On mobile the whole page text is aligned center which makes it really hard to read.

dominicrosetoday at 2:12 PM

page doesn't load "En attente de la réponse de chronicle.software."

show 1 reply
opentokixtoday at 2:50 PM

How about not using Java? Then you can have low latency.

Average go, rust, c++ and c will outperform amazing java programs, and the former will also be way way more easy to run, troubleshoot, interpret logs from.

Java is usch garbage in every stack.

show 9 replies