Program JavaZone

Foredrag Onsdag 2. september

Gentle Introduction to Lock-Free Programming in Java

Room 8

Engelsk 1 t

Andrzej Grzesik

ags likes distributed systems in all shapes and form. Coding since the age of 8, loves simplicity and continuous delivery. While he has written in many languages, he favours the JVM. Since „most software problems are people problems”, he stirs communities, organizes and speaks at conferences (proud to be a JavaONE Rockstar!). He is passionate about all things data, because science! In his spare time… cycling, photography and books. And he is a Java Champion!

Jarosław Pałka

For more than 20 years in the IT industry, as a database administrator, programmer, architect, manager, and “onsite disaster engineer”. I took part in small, medium, and nonsensically large projects carried out according to the rules “Waterfall”, Agile and in the absence of any methodologies, with the same always effect. Which led me to the conclusion that it doesn’t matter what you do as long as you do it in the simplest possible way and use the right tools to do the work for you. Recently I spent too much time exploring JVM’s best-kept secrets, reading about managed runtimes, parsers, and interpreters.

From time to time, you can hear my low-quality jokes about architecture at conferences in Poland.
I am also the author of a blog on http://geekyprimitives.com/, the occasional dictator in conferences program committees, brand, and full-time benchmarking infrastructure engineer at Neo4j.

Are you curious about lock-free programming but only familiar with using locks in concurrent Java? This talk is for you! We'll make the concepts of lock-free programming approachable, starting with why it matters and the basics of progress guarantees. You’ll learn to differentiate between wait-freedom, lock-freedom, and obstruction-freedom, understanding why these guarantees are crucial.
We’ll explore essential lock-free programming idioms, like Compare-And-Swap (CAS) for atomic updates, markable references for efficient state management, and the sentinel node technique for simplifying concurrent data structures.
The infamous ABA problem will be demystified—what it is, why it’s problematic, and how to tackle it with techniques like versioning.
To see these concepts in action, we’ll implement three lock-free data structures in Java: a stack, a queue, and a linked list. These examples will highlight the practical application of lock-free techniques and the challenges they address.
Finally, we’ll discuss performance characteristics, comparing the benefits and limitations of lock-free programming versus traditional locking. You’ll learn when to use lock-free methods for better scalability and when sticking with locks might be more appropriate.
Join us to elevate your concurrent programming skills and confidently start experimenting with lock-free programming in your Java projects!

Developers excited about performance.

  1. Å skifte vinger i lufta eller hjul mens sykkelen er i nedoverbakke: Modernisering av samfunnskritiske systemer uten høye skuldre Room 1
  2. Hexagonal happiness! Room 2
  3. No More Forks: Policy Transformation for Terraform at Scale Room 3
  4. Global Cultural Reflections on Software Testing Practices Room 4
  5. Your Database Sprawl is a 1990s Workaround, Give it a KISS Room 5
  6. Nyheter i JavaScript - ES2026 Room 6
  7. Managing the chaos: Automating internal dependency upgrades with OpenRewrite Room 7
  8. Korleis me gjekk frå React til CSS hos Designsystemet Room 6
  9. Få oversikt over JSON med JSONata-spørringer Room 6
  10. Stop Writing API Clients — Let the Spec Do It Room 6