4 ms·
Project Loom[0] is going to be coming out at some point. That brings direct JVM support for delimited continuations and fibers. That's really going to change a
by cultus 6y ago
Project Loom[0] is going to be coming out at some point. That brings direct JVM support for delimited continuations and fibers.
That's really going to change and simplify JVM concurrency and I think many other things. Delimited continuations can be used to implement algebraic effects, which is exciting for functional programming.
[0] https://openjdk.java.net/projects/loom/ https://openjdk.java.net/projects/loom/
- cle 6y agoI honestly don’t think it will, not for a long time. It’s going to make things more complicated, because now we have to figure out how to move the entire ecosystem to it incrementally, while operating and maintaining systems during the long transition period, and making technical decisions at every step about how best to do concurrency with all those extra constraints.
- cultus 6y agoI don't see it used much in legacy systems, but the benefits are large enough that I could see new Akka-ish libraries built on it.
- an_opabinia 6y agoTheir compatibility story is alright though, at least they are trying to make "Thread" forward-compatible with the new runtime. And they are working on getting Netty to work, which will immediately get things compiling (not working) for a lot of projects. The biggest challenge will be reconciling Futures, Netty and ThreadLocal (FiberLocal) patterns. Think defining a SQL transaction lifetime, a distributed lock, or a OpenTracing span. For Spring Framework people, no big deal. For everyone else, lots of complex decisions to make.
- mrkeen 6y ago> Delimited continuations can be used to implement algebraic effects, which is exciting for functional programming. How-so? I thought the type system was the precluding factor for algebraic effects, not the threading model.
- cultus 6y agoYou won't be able to type them in Java, at least not now; however it would allow new JVM languages to do it. You could also do fibers on the JVM before, but they didn't have access to the actual JVM stack. That kind of limits their usefulness and performance.