/ Papers / Programming Unikernels in the Large via Functor Driven Development
Working paper at arXiv, May 2019
URL   BibTeX   DOI  

Abstract. Compiling applications as unikernels allows them to be tailored to diverse execution environments. Dependency on a monolithic operating system is replaced with linkage against libraries that provide specific services. Doing so in practice has revealed a major barrier: managing the configuration matrix across heterogenous execution targets. A realistic unikernel application depends on hundreds of libraries, each of which may place different demands on the different target execution platforms (e.g.,\textasciitildecryptographic acceleration). We propose a modular approach to structuring large scale codebases that cleanly separates configuration, application and operating system logic. Our implementation is built on the \textbackslashmirage unikernel framework, using the \textbackslashocaml language's powerful abstraction and metaprogramming facilities. Leveraging modules allows us to build many components independently, with only loose coupling through a set of standardised signatures. Components can be parameterized by other components and composed. Our approach accounts for state, dependency ordering, and error management, and our usage over the years has demonstrated significant efficiency benefits by leveraging compiler features such as global link-time optimisation during the configuration process. We describe our application architecture and experiences via some practical applications of our approach, and discuss how library development in \textbackslashmirage can facilitate adoption in other unikernel frameworks and programming languages.

Authors. Gabriel Radanne, Thomas Gazagnaire, Anil Madhavapeddy, Jeremy Yallop, Richard Mortier, Hannes Mehnert, Mindy Preston and Dave Scott

See Also. This publication was part of the OCaml Labs and Unikernels projects.

News Updates

Jan 2023. «» Recap of the OCaml community in 2022 posted along with plans to join the 'fediverse'.
Apr 2022. «» Update posted to the OCaml community on progress towards OCaml 5.0.
Feb 2022. «» Update posted to the OCaml community on post-multicore-merge activities in OCaml trunk.
Dec 2021. «» Update posted to the OCaml community on major multicore code review with Inria.
Oct 2021. «» Update posted to the OCaml community on confirmation that the effect system will appear in OCaml 5.0.
Aug 2021. «» Published a roadmap for OCaml.org's revamp.
Aug 2020. «» Update on multicore OCaml being ready for testing / «» Talk on the state of the OCaml Platform in 2020.
Apr 2020. «» Update the OCaml community on multicore progress and linked preprint of ICFP submission on the runtime.
Feb 2020. «» Delivered the distinguished seminar series at St Andrews on rebuilding Operating Systems with functional principles / «» Part 2 / «» Part 3.
Jan 2020. «» Began updating the OCaml community regularly with multicore monthly reports.
May 2019. «» Preprint on programming unikernels with ML modules.
Nov 2018. «» Rearranged the OCaml opam repository layout.
Sep 2017. «» Talk on the state of the OCaml Platform.
Oct 2016. «» DockerCon talk on unikernels and MirageOS.
Jun 2016. «» Interviewed by The New Stack at OSCON in Austin, Texas / «» Updated the MirageOS community about the 2016 hack retreat.
May 2016. «» Announced HyperKit, VPNKit and DataKit for the Docker ecosystem.
Jan 2016. «» Announced that Unikernel Systems is now part of Docker.
Sep 2015. «» Update on the state of the OCaml Platform / «» Invited talk at NetPL on Immutable Distributed Infrastructure with Unikernels.
May 2015. «» Talk at Esper on functional programming with unikernels.
Apr 2015. «» Updated the OCaml community on annual OCaml Labs activities for 2014.
Feb 2015. «» Announced a call for sponsorships for ICFP 2015 in my role as industrial relations chair.
Jan 2015. «» Gave BOB 2015 keynote on functional Operating Systems.
Nov 2014. «» New Directions in Operating Systems talk on Jitsu.
Oct 2014. «» At the Xen Summit speaking about branch consistency for Xen Stub Domains.
Sep 2014. «» Talk on the OCaml Platform reaching v1.0 / «» Gave Haskell Symposium 2014 Keynote on functional OS design.
Aug 2014. «» Note on talks from OCaml Labs at ICFP 2014.
Jul 2014. «» Announced the release of MirageOS 1.2, and a roadmap towards MirageOS 2.0 / «» Announced the long-awaited release of MirageOS 2.0 / «» Appeared on FLOSS Weekly 302 about Open Mirage.
May 2014. «» Appeared on SE Radio Episode 204 about Mirage and OCaml.
Mar 2014. «» Call for sponsorships for ICFP 2014 in my role as industrial relations chair / «» Note on an experiment to improve the coupling of opam with GitHub / «» Note on the Codio support for the opam package manager.
Jan 2014. «» Note on the discussions around my recent CACM article on unikernels.
Dec 2013. «» Updated the OCaml community on the activities of OCaml Labs in 2013.
Nov 2013. «» MirageOS and XAPI project update at XenSummit / «» Note on integrating Docker and opam more effectively.
Sep 2013. «» Note on the release of the OPAM 1.1 beta / «» Liveblog from the CUFP 2013 workshop at ICFP / «» Liveblog from the OCaml 2013 workshop.
Jul 2013. «» Mirage Developer Preview 1 screencast.
Apr 2013. «» Note on how to grep the source code for all packages on opam.
Oct 2012. «» Discussing how we disaggregated MirageOS into opam packages / «» Announced the opening of OCaml Labs at Cambridge, along with Jane Street support.
Sep 2012. «» Note on how to build XenStore stub domains using MirageOS / «» Recording of the OCaml Labs announcement.
Feb 2012. «» Note on using ARM Dreamplugs with OCaml published.
Oct 2011. «» At the OCaml Meeting 2011 speaking about MirageOS.
Sep 2011. «» Liveblog on the talks at CUFP 2011.
Jun 2011. «» Note discussing an OCaml interface to our new CIEL dataflow engine / «» Published a note on delimited continuations vs Lwt in OCaml for MirageOS.
Apr 2011. «» Trip report about the new OCaml Users Group in Paris / «» Blogged about the growth of functional programming in the Systems Research Group.
Oct 2010. «» Announced that the MirageOS website now self-hosted on MirageOS! / «» At LinkedIn giving tech talk about Mirage.
Jun 2010. «» At HotCloud for the first talk about MirageOS.