|
|
|
Back to newsletter 203 contents
Alibaba (see our news items this month, below) look to have invested a lot of time and effort in going down the lightweight-thread path of asynchronous programming. Although their approach is proprietary, we have had coroutines (eg Matthias Mann's) in Java for a long time used by quite a few projects, and ParallelUniverse's Quasar project is a nice generally available implementation of lightweight threads.
Alibaba seems to have taken the next step, of integrating these into the JVM so that stack traces actually show the lightweight thread trace instead of the framework trace - that's essential for visibility and allowing proper debugging of of issues; Alibaba describes this as "simplicity of synchronous, performance of asynchronous". The problem with most asynchronous programming frameworks (Actors, Fork-join, etc) is that when you go to debug an issue, you get thrown into the framework rather than your use of the framework, and this makes debugging much more difficult than debugging synchronous execution.
It would be ideal to have lightweight threads properly integrated into the JVM. I appreciate this is a lot of effort - primarily because all JVM-kernel blocking calls as well as the GC need to be altered to work with them for optimal integration, but the benefits are huge, and Alibaba is already showing the need and the capability! Ron Pressler, the force behind Quasar, has now made a proposal for project Loom (see our news items below) to do this, so maybe we'll see some progress in Java 10 (thanks to my colleague Luis Pedrosa for alerting me to the proposal).
Now on to our usual links to articles, tools, news, talks, blogs. And if you need the tips from this month's articles and talks, as ever they are extracted into this month's tips page.
Java performance tuning related news.
Java performance tuning related tools.
Back to newsletter 203 contents