Re: 答复: create a fork under openjdk

Anton Kozlov akozlov at azul.com
Thu Feb 11 16:08:25 UTC 2021


(Continuing this little off-topic)

On 09.02.2021 10:03, 李三红(三红) wrote:
> 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.

State management and stateless constraints are the main objectives of the
Coordinated Restore at Checkpoint project [1].  It suggests java itself be a
foundation for such tasks.

One part of the state are resources external to the Java process.  These are
never allowed in the image, it is checked in runtime when the image is created.
It can be used as a part of the development process, so once you succeeded to
create an image of an application in a certain state, you can be sure running
from the image will succeed (or at least will not fail because some external
resource is gone).

Another part is a java application state.  CRaC provides a mechanism for user
code to manage the state.  It is possible before the image is created and after
the java has started from the image.  This enables the application state update
that cannot be updated automatically by the CRaC.

The CRaC is far from complete, but even in the current form, it enables useful
applications.  Demos were done with network services, but CRaC is not limited
to them.

[1] https://mail.openjdk.java.net/pipermail/discuss/2020-September/005594.html

Thanks,
Anton



More information about the discuss mailing list