Re: Call for Discussion: New Project: Loom

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Call for Discussion: New Project: Loom

李三红(三红)
Hi Ron,

I are  very excited about this proposal to add lightweight threads  to Java.


 

As I have talked at JVMLS [1], our own customized OpenJDK version has
implemented  some similar mechanism proposed by loom(we called this as Wisp
internally),  which is already widely deployed in Alibaba production
environment.  A couple of core ecommerce applications (running in very large
scale cluster) are running on top of Wisp. By this way, we achieved 10+%
CPU saving, lots of thread context switches could be reduced by transferring
from thread to coroutine.

 

More specifically,  our implementation is relying on the continuation
primitive support made by  [2] , which is part of MLVM project. Moreover,
we added our own scheduler(fully written in Java) to support coroutine
yielding at almost all possibly blocked places in OpenJDK, including:

-        Java  synchronization(compiled & runtime code change)

-        J.U.C

-        Java network IO

-        Java disk IO

Our goal is to allow Java developers to write in synchronous but gain
performance of asynchronous for free, they just change a couple of line of
code and do some parameter configuration, the control transferring between
coroutines is totally handled by underlying  JDK transparently.

 

We are interested in contributing to this project.

 

[1]:
https://www.slideshare.net/sherrylso/optimizing-jvm-at-alibaba-for-ecommerce
-apps-running-on-100000-servers

[2]:
http://hg.openjdk.java.net/mlvm/mlvm/hotspot/file/4cd7d914b0e3/coro-simple.p
atch