There was a presentation with more info at last JVM Language Summit https://www.youtube.com/watch?v=X4tmr3nhZRg The scary things is that they have implemented coroutine (generalized async/await) by copying the stack back and forth instead of putting the stack in the heap like in stackless python or in scheme.
Java at Alibaba [pdf]
21–30 of 44 posts
Re: Java at Alibaba [pdf]
#22There was a presentation with more info at last JVM Language Summit https://www.youtube.com/watch?v=X4tmr3nhZRg The scary things is that they have implemented coroutine (generalized async/await) by copying the stack back and forth instead of putting the stack in the heap like in stackless python or in scheme.
Could you please explain which stack you are talking about here. If I am not wrong, Java language semantics does not have stack allocated variables, hence my confusion. I sampled the video at random offsets but could not find the location where coroutine implementation was discussed.
The big idea behind this is the concept of a continuation, and a conversion between programs in "direct style" (the way you normally write them) and "continuation passing style" which makes control flow explicit. You could start reading here if interested: http://matt.might.net/articles/by-example-continuation-passi... Or read about how Scheme compilers work to support first class continuations, and the tricks you can play with them.
Re: Java at Alibaba [pdf]
#23There was a presentation with more info at last JVM Language Summit https://www.youtube.com/watch?v=X4tmr3nhZRg The scary things is that they have implemented coroutine (generalized async/await) by copying the stack back and forth instead of putting the stack in the heap like in stackless python or in scheme.
Could you please explain which stack you are talking about here. If I am not wrong, Java language semantics does not have stack allocated variables, hence my confusion. I sampled the video at random offsets but could not find the location where coroutine implementation was discussed.
Note the above only refers to the logical view of the language. A VM and JIT will have an ABI for method calls which may use registers to pass arguments (it may have several for interpreted and JITed code), and it can allocate objects purely on the stack if it can do good enough escape analysis.
Re: Java at Alibaba [pdf]
#24Impressive stuff. They have basically forked their entire backend stack, starting from the OS and moving upwards. I am particularly interested in how much AliOS deviates from mainline Linux.
>Alibaba Runs Millions of Custom JVMs >They have basically forked their entire backend stack, starting from the OS and moving upwards. I doubt this being a cool thing. Sure, they are the second biggest IT employer in the country, and have excess resources for everything, but... A thing about big dotcoms - architects there try to use off-the-shelf software for everything, even if the software is clearly unsuited for t…
Re: Java at Alibaba [pdf]
#25Earlier quoted context omitted.
Could you please explain which stack you are talking about here. If I am not wrong, Java language semantics does not have stack allocated variables, hence my confusion. I sampled the video at random offsets but could not find the location where coroutine implementation was discussed.
It is the call stack that is being copied. It doesn't have to do so much with stack allocated variables (which may be created in Java according to the whim of the compiler) but with capturing the current state of a computation in a relatively light weight manner, so that light weight threads / coroutines can be saved and restored without the context switch and memory overhead of a full thread. This is basically the o…
Re: Java at Alibaba [pdf]
#26Impressive stuff. They have basically forked their entire backend stack, starting from the OS and moving upwards. I am particularly interested in how much AliOS deviates from mainline Linux.
>Alibaba Runs Millions of Custom JVMs >They have basically forked their entire backend stack, starting from the OS and moving upwards. I doubt this being a cool thing. Sure, they are the second biggest IT employer in the country, and have excess resources for everything, but... A thing about big dotcoms - architects there try to use off-the-shelf software for everything, even if the software is clearly unsuited for t…
Do you have a link for that?
Re: Java at Alibaba [pdf]
#27Earlier quoted context omitted.
>Alibaba Runs Millions of Custom JVMs >They have basically forked their entire backend stack, starting from the OS and moving upwards. I doubt this being a cool thing. Sure, they are the second biggest IT employer in the country, and have excess resources for everything, but... A thing about big dotcoms - architects there try to use off-the-shelf software for everything, even if the software is clearly unsuited for t…
Can you add a link to the article (Alibaba/mysql/etc ?!)
Re: Java at Alibaba [pdf]
#28Re: Java at Alibaba [pdf]
#29Java is well suited to very large projects only because developers are "commodity." With the modern language updates, the core java collections library is really broken for modern multi-paradigm programming. There are no true immutable collections in the core lib which makes Java really show its age with the newer language features compared to other more modern languages such as scala. Functions are bolted on as "Sin…
Re: Java at Alibaba [pdf]
#30Java is well suited to very large projects only because developers are "commodity." With the modern language updates, the core java collections library is really broken for modern multi-paradigm programming. There are no true immutable collections in the core lib which makes Java really show its age with the newer language features compared to other more modern languages such as scala. Functions are bolted on as "Sin…