Checkpoint and Restore In User Space (CRIU)

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

Interesting:

Luckily for us as we were investigating this possibility we ran into an incredibly ambitious open source project called Checkpoint and Restore in User Space (or CRIU for short). The name says it all. CRIU aims to give you the same checkpointing capability for a process tree that virtual machines give you for an entire computer. This is no small task and actually required changes to the mainline Linux kernel to pull off. The original goal of this project was to allow migrating containers from one computer to another. For example, you could move a running server from one machine to another. Little did they know it that it could also be used to make JavaScript even more dynamic.

The next step was to get CRIU working well with Docker. The CRIU developers have been incredibly supportive in this task, and Ross has been working closely with them to make this a first class feature of Docker. So with this final piece of the puzzle, we could now run our notebooks in Docker containers (which are considerably more light-weight than a full-blown virtual machine). Just like a virtual machine, after a given a code cell is run, we can immediately checkpoint the container (which stores the memory state of node, as well as any subprocesses it may have spawned), and commit the contianer (which stores the state of the filesystem). And just as before, if the user wishes to rewind, we simply resurrect the container using these two pieces of information.

Post external references

  1. 1
    http://blog.tonicdev.com/2015/09/10/time-traveling-in-node.js-notebooks.html
Source