Search code examples
node.jsdockercloudcloud9virtual-server

How does RunKit make their virtual servers?


There are many websites providing cloud coding sush as Cloud9, repl.it. They must use server virtualisation technologies. For example, Clould9's workspaces are powered by Docker Ubuntu containers. Every workspace is a fully self-contained VM (see details).

I would like to know if there are other technologies to make sandboxed environment. For example, RunKit seems to have a light solution:

It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm's 300,000+ packages are pre-installed, so try it out

Does anyone know how RunKit acheives this?


Solution

  • You can see more in "Tonic is now RunKit - A Part of Stripe! " (see discussion)

    we attacked the problem of time traveling debugging not at the application level, but directly on the OS by using the bleeding edge virtualization tools of CRIU on top of Docker.

    The details are in "Time Traveling in Node.js Notebooks"

    we were able to take a different approach thanks to an ambitious open source project called CRIU (which stands for checkpoint and restore in user space).
    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: CRIU incorporates a lot of lessons learned from earlier attempts at similar functionality, and years of discussion and work with the Linux kernel team. The most common use case of CRIU is to allow migrating containers from one computer to another

    The next step was to get CRIU working well with Docker

    Part of that setup is being opened-source, as mentioned in this HackerNews feed.