
More Action, More Overview – From 4k to 1M Threads
About this event
Black Friday, a million concurrent requests – and somewhere in the backend, a simple new Thread(). OutOfMemoryError guaranteed! Platform threads cost you 1MB of RAM each and limit your application to a maximum of 10,000 threads. With Java 21+, everything changes: Virtual Threads only need 1KB, are created in a microsecond, and you can easily start a million of them. I'll show you how to harness this power using a real-world rule engine. Together, we'll build a system that executes 100,000 business rules in parallel – without thread pools, without caching headaches. You'll learn about the three pillars of modern Java concurrency: virtual threads (final since Java 21) for massive parallelisation, scoped values (final in Java 25) as a safe alternative to ThreadLocal, and structured concurrency for elegant task management. In live coding, you will see how these APIs interact. After this talk, you will know exactly when virtual threads make sense (I/O-bound) and when they don't (CPU-intensive), how to migrate existing code with tools like OpenRewrite, and what pitfalls to watch out for. Bonus: a working GitHub GIST for experimenting
Referent:
Merlin Bögershausen ist Java Enthusiast seit über 10 Jahren und ein großer Fan der neusten Entwicklungen im Java Ecosystem. Er spricht auf Konferenzen und schreibt Artikel rund um das Thema Java. Er ist aktiver Contributor im Open Rewrite Projekt, Volleyballer und Segelfluglehrer.
Source: meetup