#java

7 posts tagged “java”.

Programming · 7 min read

Share consumers in Kafka: queues without giving up the log

Share groups (KIP-932) let many consumers read the same partition and acknowledge records one by one. How they work, how they differ from consumer groups, and how to use KafkaShareConsumer from Java.

  • kafka
  • java
  • messaging
  • distributed systems

Programming · 16 min read

Microbenchmarking Java with JMH in the age of new JEPs

How to measure Java code correctly with JMH, and how virtual threads, compact object headers, AOT caches, the Vector API and lazy constants change what a benchmark actually tells you.

  • java
  • jvm
  • performance
  • jmh

Blog · 1 min read

My JVM reading list

Books and resources that helped me understand what actually happens when Java code runs.

  • java
  • jvm
  • books

Programming · 2 min read

Virtual threads in practice: what changes for backend code

Java virtual threads make thread-per-request cheap again. Here is how to adopt them, what pinning is, and the habits you should drop.

  • java
  • concurrency
  • jvm

Mathematics · 3 min read

Fibonacci in O(log n): from matrices to fast doubling in Java

Why the naive Fibonacci is exponential, how a 2×2 matrix turns it logarithmic, and a fast-doubling BigInteger implementation that computes F(1 000 000) in a fraction of a second.

  • algorithms
  • linear algebra
  • java

Programming · 3 min read

Backpressure in Project Reactor, explained with code

What request(n) really means, how prefetch and limitRate shape demand, and how to choose an overflow strategy when a producer is faster than its consumer.

  • java
  • reactive
  • reactor

Programming · 4 min read

JVM bytecode instrumentation with ASM: timing every method without touching the source

Build a tiny Java agent that rewrites classes at load time with ASM and records how long each method takes, and learn the pitfalls on the way.

  • java
  • jvm
  • bytecode
  • asm