NFV Platforms with MirageOS Unikernels
unikernel.org
unikernel.org
The problem with HTTP, for me, is that I need to have some program running, listening on a port, in order to access the functionality that I've chosen to expose behind a REST API.
With unikernels, RESTful web servers go from being a special kind of function, that requires an always-running executable, to the executable being "applied to" incoming requests, as needed. So a DNS server can basically take an incoming request, boot up a unikernel in 20 ms, reply with the unikernel IP, and the newly started unikernel will receive the actual request data shortly thereafter. This feels more like "applying a web function" to an incoming request, and throwing away that function when the connection is closed - like a garbage collector, of sorts. Rather than having some executable sit and wait for data on a TCP socket, it would be nicer to be able to distribute web apps as shared objects: loaded into memory when needed and applied to a request.
How would you know which web app to apply to a request without associating apps with TCP (or UDP) sockets? I'm not saying it can't be done, I'd just like to understand what you're proposing.
It's really just associating executables with a host/domain name, isn't it? Of course, it would be nice to serve different resources on the same domain using different executables, but I guess this could work too, if we just define domain->resource->executable routes.
It's really just changing the interface from a TCP socket, that a running executable is listening on, to something more sane, like an .so/.dll file which exposes a httpmain() function which accepts a HTTP request as an argument. Then the reverse proxy would be a caller of a function, rather than a dispatcher of data.
Then Amazon/Google/MSAzure would have this reverse proxy, which wouldn't be a reverse proxy at all anymore, running on their infrastructure. You would distribute your web app as a Xen image, and the reverse proxy/"web function proxy" would boot up your VM instance on incoming requests, charging for the number of milliseconds the instance runs.
That said, I've been working recently with Erlang on Rumprun precisely because I didn't want to rely on a totally unknown commodity (LING) in terms of implementation and behavioral semantics at the same time as drastically changing my operational semantics (unikernel deploy).
One of the contributors recently wrote: maximk commented on 25 May "All recent updates to the code were customer-driven. New users mean new updates. The likely application area for this is NFV, modular software for telecoms. No definite plans"
The difference is that you want to spawn a unikernel instead of an executable and your acceptor is not a webserver but something different, but I think these are more performance, security and deployment considerations instead of huge architectural differences.
You might be interested in our paper on Just in time summoning of unikernels (Jitsu). It's exactly what you describe — http://unikernel.org/files/2015-nsdi-jitsu.pdf
There's also some speculative stuff I wrote last year about demand-driven clouds (before I heard of 'serverless') — http://amirchaudhry.com/heroku-for-unikernels-pt2