4 ms·
In typical Java fashion, there is a project, Quasar, the adds true green thread support to the language. Done by instrumenting bytecode rather than JVM support,
by throwaway83628 8y ago
In typical Java fashion, there is a project, Quasar, the adds true green thread support to the language. Done by instrumenting bytecode rather than JVM support, but the benchmarks are still excellent. I'm very curious whether the Java or Go implementation is faster. Java does have fast async support which is all you need to add green threads on a library level
Also in Java fashion, the support isn't perfect, and requires some fiddling with JVM parameters (and annotations, obivously). It's still really solid from my experience however, and a shame that it isn't more widely known.
A partner project Comsat provides fairly comprehensive library support for databases and such. I've used it before with Vert.X and the performance was insane. Possibly faster than Go.
Another aside, there's an active research project to add greaan threads to Javas core as well. Project Loom
- RhodesianHunter 8y agoKotlin has excellent coroutine libraries as well.
- jplayer01 8y agoQuasar sounds interesting but it doesn't seem to be actively developed anymore?
- npstr 8y agoIt looks like the author of Quasar, Ron Pressler, is now working on adding native support to the JVM through Project Loom.
- throwaway83628 8y agoThis is AWESOME!!! I was very sad that Quasar seems to be going dormant, made my day
- majewsky 8y ago> I'm very curious whether the Java or Go implementation is faster. Since it's Java, I expect it to be slightly faster than Go while using double the amount of memory.
- throwaway83628 8y agoThis sounds very accurate
- akerro 8y agoThere is also project Loom that will go into Java http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.html http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.htm...
- akerro 8y ago>Also in Java fashion, the support isn't perfect, and requires some fiddling with JVM parameters (and annotations, obivously). It's still really solid from my experience however, and a shame that it isn't more widely known. Could you write more about it? Maybe a blog post?
- throwaway83628 8y agoI could, but my laziness prevents me from doing so. The documentation is fairly good for Quasar, hard part is getting the code instrumentation up. If you use Maven, there's a plug-in to do much of it for you