project-loom-c5m
jvm-tail-recursion
project-loom-c5m | jvm-tail-recursion | |
---|---|---|
16 | 2 | |
350 | 121 | |
- | - | |
0.0 | 0.0 | |
about 2 years ago | about 1 year ago | |
Java | Java | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
project-loom-c5m
-
Java 21: The Nice, the Meh, and the Momentous
It is not. Blocking IO (with some exceptions mentioned in the JEP) will automatically be translated by the runtime into non-blocking IO when it occurs on virtual threads, and no OS threads will be blocked. You can have a million threads blocking on a million sockets (obviously without creating a million OS threads): https://github.com/ebarlas/project-loom-c5m
You can't do that with thread pools. You could achieve that scalability with async code, but then observability tools will not be able to track the IO operations and who initiated them, but with virtual threads you'll see exactly what business operation is doing what IO and why.
-
Don’t call it a comeback: Why Java is still champ
That might change in JDK 21 (with virtual threads). See this https://github.com/ebarlas/project-loom-c5m . It achieve 5 million persistent connections (again depends on the server capacity and kernal tuning) using normal simple blocking code (https://github.com/ebarlas/project-loom-c5m/blob/main/src/main/java/loomtest/EchoServer.java) . It's a far better better programming model compared to JS async/await.
- Project loom + valhalla + graalvm = Java on steroids
- Distilling the Real Cost of Production Garbage Collectors
- Achieving 5M persistent connections with Project Loom virtual threads
- Experiment to achieve 5M persistent connections with Project Loom (Java)
- What is the current state of the art for efficiently handling blocking requests in Java/Spring?
jvm-tail-recursion
-
Tail Call Recursion in Java with ASM
Disclaimer: I made a library for this: https://github.com/Sipkab/jvm-tail-recursion
- Experiment to achieve 5M persistent connections with Project Loom (Java)
What are some alternatives?
remove-recursion-inspection - Intellij IDEA inspection for automatic recursion detection and removal
abcl - Armed Bear Common Lisp <git+https://github.com/armedbear/abcl/> <--> <svn+https://abcl.org/svn> Bridge
remove-recursion-insp
project-loom-comparison - A comparison of different methods for achieving scalable concurrency in Java
Reactive Streams - Reactive Streams Specification for the JVM
Recaf - The modern Java bytecode editor
qbicc - Experimental static compiler for Java programs.
You-Dont-Need-Loops - Avoid The One-off Problem, Infinite Loops, Statefulness and Hidden intent.
Graal - GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
Jooby - The modular web framework for Java and Kotlin