by marknadal · 12y ago · 0 comments
The bookkeeping associated with zero-copy often exceeds the copying cost. This was the curse of the original message-passing Mach implementation, which gave microkernels a bad name.
I'd like to see marshalling as a language feature. It's compilable, done often, and has an effect on performance. Many marshalling systems, from OpenRPC to protocol buffers, use a precompiler. But that adds another level of language.
Errr, that would be a major bug in capnproto. While it's definitely possible the software has bugs, it's certainly a design constraint that the sender absolutely cannot crash the receiver.
http://kentonv.github.io/capnproto/faq.html#arent-messages-t...
I think one issue you'd run across when doing something like that it that Node is not an application in the sense that Redis is an application. It's mostly a JIT-compiler for applications that are written in Javascript. Porting a Node application to run on Arrakis would probably involve changes to both Node and the Javascript application code, particularly if you want to run close to the hardware performance limits. That's doable, but I doubt you could preserve the APIs that Node currently exposes to applications. (The FS module would be especially problematic!)
What could be useful is to ditch Node's existing IO APIs and provide bindings to the Arrakis IO library directly.
Node is not a data specific application and won't live entirely in the data-plane. It is general purpose and libuv especially has a lot of moving parts that might blur between the data-plane and control-plane. I would imagine you would have better luck building a unikernel dedicated for node than to try and shoehorn node into Arrakis.