14th May 2013: Ocamlot, actors and performance
Attendees: Anil Madhavapeddy, David Scott, Richard Mortier, Thomas Gazagnaire, Prashanth Mundkur, Balraj Singh, Euan Harris, Amir Chaudhry, David Sheets, Jon Ludlam, Vincent Bernardoff, David Sheets
OCamlot is coming together and should go live in a couple of weeks. It is currently using Lwt but will eventually transition to Async. It can download from a GitHub pull-request, merge the OPAM repositories locally, and run tests. We will get this up and running in Computer Lab soon with machines here, but could use more resources and hardware from Citrix and others.
David Sheets: I want to be able to get event notification and know when data structures change and get the functional diff between old and new (as well as the new). Anil: This sounds suspiciously similar to what Irminsule could offer. We're going to work with Thomas next week to figure out how all this fits together.
Dave Scott: Citrix also needs a simple messaging system, with queues persistent in memory (not necessarily on disk). This all needs to run on a Mirage VM also, and will coordinate the nextgen unikernel architecture. Apps will talk about named queues of events. The current implementation uses file descriptor passing but will fall back to TCP if across different hosts in the cluster. Using Lwt at the moment. It's a [prototype on Github](http://github.com/djs55/message-switch] so feedback on semantics would be helpful. Taken some ideas from OpenStack etc. Could use Fable when it's ready (looks pointedly at Anil).
Anil: This work may unblock some of the OCamlot prototyping too. We can use Irminsule when ready but leave that out for the very first release of OCamlot, since we need tests running asap. However, this all converging nicely for the longer term.
Euan Harris continues to work on the actor library, although he's mainly on the low-level end of things at the moment. Two significant other interface-related things were pointed out.
Anil Madhavapeddy: Daniel Bunzli is working on a really nice Vg graphing library suite which will help visualise actor interactions. Thomas Gazagnaire: Have you seen the Akka demo console, which provides similar functionality for Scala.
Anil: Balraj had a localhost web server embedded directly into the Mirage TCP stack for debugging. This actor approach offers us a well-structured alternatives to such daring hacks. It would be great to be able to recompile the whole stack into debug mode, with RPCs flying around instead of function calls. RPCs are far easier to debug. Balraj agrees that a more general solution would be useful.
Cohttp is much more stable, and it's functorised cleanly now. Citrix has their own IO monad for it using regular buffered IO over channels using FD reading/writing. There are an increasing number of third-party projects using Cohttp, so we really do need to get a stable version out.
Need to do testing for All the Things, preferably on an ongoing basis within OCamlot! Since we're now on release track this matters far more than when it was just prototypes for research papers. We don't have a full regression suite to work off yet.
For now, we should just pick a set of reasonable tests per library. Balraj had some for the TCP stack, Anil will put together for HTTP stack. Mark Shinwell is working on some very useful allocation profiling patches that should be ready in a month or earlier.
Balraj: Example test for TCP might be the 10MM concurrent connections. We should be able to do that without too much sweat.
Anil: For HTTP, can use httperf. Curious to see where we are with that and how we compare with nginx, as we were competitive in the ASPLOS paper but may have regressed.
Having performance tests as part of libraries is a good idea so that they can be run by Ocamelot automatically.
80+ repos now listed on wiki. Maybe add info on testing status to this list also. Dave and Jon and Anil will chat separately about writing Github scripts to help manage these repositories as a cluster.
Prashanth Mundkur is looking into getting OCaml into CHERI (a MIPS 64 experimental CPU developed at the Computer Lab and SRI International). Anil suggests looking at porting OCaml into stackless mode so it doesn't share the C stack, which would break the FFI very slightly, but be easier to segment.
There were some patches flying around a few years to implement this directly in ocamlopt, and Anil will investigate.
A number of Cambridge students are going to Jane Street for internships, and we're synching up projects so that they can continue after the summer. Ideas for internships welcome.