答复: 答复: create a fork under openjdk

李三红(三红) sanhong.lsh at alibaba-inc.com
Fri Feb 12 04:16:28 UTC 2021


Hi Rémi,
The next run requires the 'clean' states in the previous snapshot.
However, the challenge is that even the application owners cannot clearly decide when the application will reach a 'clean' state(due to the code/dependency complexity).
Their application may reply on some 3rd party libraries(e.g., netty, spring),   or some parts/services are developed by different teams.   
In these external code dependencies,  we cannot tell how many state have been maintained, which should be saved(or skipped) before making a snapshot.
If some 'runtime dependent' states have been saved in the snapshot, for example:
- unique message-id for client/server communication(can be only used for this channel talk).
- some on-the-fly system information, e.g System.currentTimeMillis

These states could bring logic error for the next run forked from the previous snapshot.

Thanks!
Sanhong
-----邮件原件-----
发件人: Remi Forax <forax at univ-mlv.fr> 
发送时间: 2021年2月9日 17:39
收件人: 李三红(三红) <sanhong.lsh at alibaba-inc.com>
抄送: Christine Flood <chf at redhat.com>; discuss <discuss at openjdk.java.net>
主题: Re: 答复: create a fork under openjdk



----- Mail original -----
> De: "李三红(三红)" <sanhong.lsh at alibaba-inc.com>
> À: "Christine Flood" <chf at redhat.com>
> Cc: "discuss" <discuss at openjdk.java.net>
> Envoyé: Mardi 9 Février 2021 08:03:15
> Objet: 答复: create a fork under openjdk

> Hi Christine,
> 
> Thanks for your comments  - the challenge of using CRIU is we can not 
> handle the state migration of the java application.
> 
> The situation will become more worse when the application evolves 
> forward, and we don’t have a good mechanism(may consider a middleware 
> framework?) to enforce the ‘stateless constraints’ for their development.
> 
> 
> 
> Thanks!
> 
> Sanhong


Hi Sanhong,
this seems orthogonal, why do you want state migration on top of CRIU ?

You can use CRIU just as a way to start your application in steady state skipping the warmup phase.
So you build your app, then you run it with fake traffic then save the states with CRIU.
If you update the app, instead of trying to migrate states, you just rebuild it, etc.

regards,
Rémi

> 
> 发件人: Christine Flood <chf at redhat.com>
> 发送时间: 2021年2月5日 1:16
> 收件人: 李三红(三红) <sanhong.lsh at alibaba-inc.com>
> 抄送: discuss at openjdk.java.net
> 主题: Re: create a fork under openjdk
> 
> 
> 
> Have you guys looked at CRIU at all?  If you are running on Linux it 
> gives you the capability of firing up a warmed up Java application in minutes.
> 
> 
> 
> For example the TODO app 
> (https://github.com/cescoffier/quarkus-todo-app) takes
> 1.837 seconds to start but only  0.11 seconds to restore.
> 
> 
> 
> I've attached a console log showing the commands I used.
> 
> 
> 
> If you want greater control, I've written a Java API you can tinker with:
> https://github.com/chflood/JavaCriuJar.
> 
> 
> 
> Unfortunately this is a Linux only capability.
> 
> 
> 
> 
> 
> Christine
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Wed, Jan 27, 2021 at 7:14 AM 李三红(三红) <sanhong.lsh at alibaba-inc.com 
> <mailto:sanhong.lsh at alibaba-inc.com> > wrote:
> 
> Hello,
> 
> We are working on the fast-startup related development based on 
> JDK11u. To facilitate community collaboration(sharing backports, bug 
> fixing, patches, etc. across different companies/parties based on the 
> repo), we are exploring creating the fork of JDK11u under the OpenJDK 
> group [1]
> 
> 
> 
> Can anyone help with this, or is there a way/process we can follow to 
> do that? - Your help or any input is much appreciated.
> 
> 
> 
> [1]  <https://github.com/openjdk> https://github.com/openjdk
> 
> 
> 
> Thanks!
> 
> Sanhong



More information about the discuss mailing list