airhacks.fm podcast with adam bien· Folge 342

Apache Storm, Disruptor, JCTools and Linearizability

Sonntag, 27. April 2025 · 1 h 07

MP3

Shownotes

An airhacks.fm conversation with Francesco Nigro (@forked_franz (twitter.com/forked_franz)) about:
github.com/JCTools/JCTools as a Java (java.com/en) concurrency utility library created by Nitsan Wakart,
the history of JCTools and how Cliff Click (twitter.com/cliff_click) donated his non-blocking HashMap algorithm to the project,
contributions to JCTools including weight-free queue implementations,
Apache Storm (storm.apache.org) vs. Apache Kafka (kafka.apache.org),
explanation of how JCTools improves upon Java's standard concurrent queues by reducing garbage creation and optimizing memory layout,
the difference between linked node implementations in standard Java collections versus array-based implementations in JCTools,
detailed explanation of linearizability (en.wikipedia.org/wiki/Linearizability) as a property of concurrent algorithms,
the challenges of implementing concurrent data structures that maintain proper ordering guarantees,
explanation of lock-free versus wait-free algorithms and their progress guarantees,
discussion of the xadd (en.wikipedia.org/wiki/X86_instruction_listings) instruction in x86 processors and how it's used in JCTools for atomic operations,
the implementation of github.com/JCTools/JCTools/blob/master/jctools… API in JCTools that provides relaxed guarantees for better performance,
comparison between JCTools and other solutions like Disruptor (lmax-exchange.github.io/disruptor),
explanation of how JCTools achieves 400 million operations per second in single-producer single-consumer scenarios,
discussion of cooperative algorithms for multi-producer scenarios,
the use of padding to avoid false sharing in concurrent data structures,
the implementation of code generation in JCTools to create different flavors of queues,
the use of Unsafe and docs.oracle.com/en/java/javase/24/docs/api/jav… for low-level operations,
real-world applications in high-frequency trading and medical data processing,
integration of JCTools with quarkus.io and smallrye.io/smallrye-mutiny frameworks,
the importance of proper memory layout for performance

Francesco Nigro on twitter: @forked_franz (twitter.com/forked_franz)

0:00 / 0:00