top | item 10946071

(no title)

div0 | 10 years ago

OCaml is a fine language that most people don't use. If I want a unikernel in my own language, do I need to build one myself? I wonder if someone is building a unikernel that have external language bindings, which will allow one to create "High-level" unikernels. This will open up the possibility to completely bypass the installation of language runtime. For example, I can just type some Python code into a browser editor, the backend can take the source code and fork a Python unikernel to run the code. Docker can currently do this but one still has to rely an underly OS to manage all the packages etc. Wouldn't it be nice if you could simple write "import xyz", and the unikernel takes care of fetching them automatically?

discuss

order

jorge-fundido|10 years ago

Will probably be a while before could build a clean-slate unikernel with something like python, but doing what you want in a rumpkernel looks to be just around the corner:

https://github.com/rumpkernel/rumprun-packages/tree/master/p...

rday|10 years ago

It's getting really close! I have a post detailing how you would run Flask in a rumpkernel[0]. Right now any pure Python modules will run just fine.

We get into tricky situations when you need C extensions, e.g MySQL or PostgreSQL. Since extensions must be statically linked, you have to decide upfront what you want. Either extension can be compiled in, but including both in the package by default.... So a production Python build is fairly custom right now.

Nothing insurmountable, just haven't gotten the workflow perfect.

[0] http://projects.curiousllc.com/flask-in-a-rump-kernel.html#f...

e_d_g_a_r|10 years ago

Maybe this is a good time to learn OCaml then? There's also this I saw, literally what you're talking about: https://stackhut.com/

mands|10 years ago

Thanks :) - we're super early in this space, but are incredibly excited by what how we can use both containers and unikernels to help ease the development process and integrate with your current stack.

ps - shameless plug but we're hiring talented OCaml devs (http://stackhut.com/#/careers)

pps - Congrats to @amirmc and the Mirage OS group!

willtim|10 years ago

Mirage uses OCaml's strong types to generate secure, fast and highly specialised code. It's also very succinct and with LWT, almost as good as Haskell for lightweight concurrency and nonblocking IO. Why would you want to use Python? This is a golden opportunity to learn and use a superior language.

EvanPlaice|10 years ago

There are a bunch. NodeOS and runtime.js are the ones I've looked into because I like JS but there are unikernel implementations.

The cool part is, if the OS is trimmed down enough (ex < 10mb) it's small enough to fit in version control.

Much like we automate build tools to concatenate/minify web assets, it'll be possible to create a build step that takes a webapp as input and spits out a fully functional VM ready to deploy as output.

It completely inverts the deployment process. Instead of building an environment and deploying an app to it, you focus on building the app and deploy it as a VM when it's ready.

div0|10 years ago

Very true. It changes the perspective a little bit: Instead of worrying about incompatible/incomplete libraries/packages. The application dictates everything all the way down to the VM level, and in a single language.