I wanted to post and ask if anyone has played with unikernels and elixir in 2020? I saw there was this post early last year and also saw that nanovm / ops has an elixir example.
Hi @rickp, wanted to tag you here as I saw you posted in the previous post about unikernels. Not sure if the above technology would be helpful to you.
I am also curious if anyone sees the need to use unikernels with elixir.
Once upon a time there was LING (also known as Erlang on Xen), however this project seems pretty dead nowadays. There are other unikernels like Rump that have examples for Erlang. My problem with NanoVM is that it is closed source while there are other, open-source, projects that supports such approach.
In general from what I see the idea of unikernels pretty much died out (that is a shame) and waits for better times.
From the “high level” viewpoint the Nerves is the most unikernelish thing in the Erlang world right now.
And IMHO Erlang is perfect environment for unikernels runtime language, as it is mostly a operating system on it’s own, so removing one layer (“real” OS) wouldn’t harm 90% of Erlang applications while it would provide obvious benefits.
I’m specifically curious about OTP 25 / Elixir 1.14 and OTP 26 / Elixir 1.15.
The existing docs suggest you can only run single .exs scripts, but is it possible to run an entire application consisting of multiple files/artifacts in a Nanos unikernel, or perhaps a mix release? mix release — Mix v1.15.2
Note: I’m not an active elixir dev so there most definitely are probably better methods to do this but..
In this example you can see we actually use ‘mix release’: ops-examples/elixir/02-phoenix at master · nanovms/ops-examples · GitHub . Elixir makes use of quite a few wrapping scripts to setup paths/env vars and that’s the most challenging aspect imo of running it under nanos as you need to declare all of that up front. I think there is definitely room here for extra/better tooling.
Other than that I wouldn’t say there are huge issues but yeh I think it would be good to try and get some newer releases cut. Let me know if you want to take a quick stab at it or if you run into any issues happy to take a look.