Streaming console output in mollymawk
2025-05-21What we achieved
The console output of a unikernel used to be available as an HTTP endpoint (as answer to a GET request). We implemented server-sent events in mollymawk for this, and now the console output is live streamed, without leaking any resources. This helps to use and debug MirageOS unikernels deployed on mollymawk. We also investigated other approaches, such as polling, and using websockets - but server-sent events are much simpler, and perfect for the unidirectional stream.
The work was achieved in this PR, and we used netstat
to confirm when you change the tab or navigate to another site, the stream is closed -- both on the web server to browser, and also the connection between mollymawk and albatross.
This is important to not leak resources (file descriptors).
What's Next?
We are working on various bugfixes and more features (such as streaming of the unikernel binaries etc.) in mollymawk, thanks to the NGI0 core grant run by NLnet.
Robur is a cooperative that develops applications and unikernels in OCaml. The aim is to use and promote MirageOS unikernels.
Our work is only partially funded, we cross-fund our work by commercial contracts and public (EU) funding. We are part of a non-profit company, you can make a (in the EU tax-deductible) donation (select "DONATION robur" in the dropdown menu), or sponsor us via the GitHub sponsor button.