Tuesday, January 13, 2015

Work summary @ OCaml labs

In this blog I would like to summarise my contribution to some of the on going projects as well as highlight some of the open source development that I encourage the wider community to adopt and provide feedback.

First, I would like to acknowledge the incredible support and welcome I received from the OCaml labs  - lead by @avsm. Thank you for facilitating great and fun working environment.

Executive summary

My main contribution involved

1. Research and development of a graph-based service abstraction for PIH as part the UCN project.

  • Co-authored a whitepaper (draft) on how Moana-based service abstraction can be used to facilitate access control

2. Contributing to Ocaml.org - creating a teaching resource page  for the community which provides useful resources for people who would like to keep up to date with the relevant material and resources for teaching OCaml to masses, mainly at the Uni level.

3. Pubłished a position paper (Moana - A Case for Redefining the Internet Service Abstraction) Middleware for Next Generation Internet Computing (MW4NG).

Besides stated above contribution, I was able to participate and help organise in many interesting initiatives such as help set up with @amirmc start-up class meet ups for people to follow online Stanford course on "How to start a startup" as well participated in (initial) discussions with the Office of Postdoctoral Affairs to setup the first Cambridge postdoc's entrepreneurial club. I also learnt a lot about very exciting technologies being developed around the lab such as Mirage OS, Irmin, Jitsu and many others (here is the 2014 review)

Now, in more details...

While in OCaml labs my main role involved contributing to research and development of a personal information hub (PIH) as part of the UCN project. The main objective of the project is:

"... to develop and use the PIH platform and architecture to install the user as the owner and controller of his/her personal data, allowing personalization and immersion while preserving a user’s privacy."

This is an on going project with very promising outcomes and I believe that the technology developed as part of it can serve as the foundation for future information-centric systems. ''
The current two main building blocks are Mirrage OS for deployment and Irmin for Git-like persistent storage. Both very interesting system which I recommend to check them out.

After learning more about the project, I felt that it's very important to provide a very useful and efficient service abstraction for application and system developers to use in order to simplify the development on top of such a systems.

Enter Moana. Moana, an information-centric middleware for distributed services and applications. Moana offers a shared graph-based storage abstraction through which applications communicate with each other by appending and observing the shared graph. Arguably, this higher level of abstraction is much closer  to the developer world, which "allows developers to focus their efforts on functionality and spares their time fiddling with low level tasks, such as information synchronisation or storage". Applications can also specify access control policies which can be then enforced by the system. It would be great to see Moana like abstraction on top of Irmin which I believe will move the overall design  closer towards the overall goals of the UCN project.

So the main challenge was to develop and deploy Moana on top of Irmin. Both Mirage OS and Irmin (for many good reasons ) are written in OCaml so naturally I had to learn OCaml. This is how the work on MoanaML started. MoanaML is essentially implementation of Moana in OCaml. During the process I learnt a lot about type safe, functional languages and at this stage, this paradigm aligns extremely well with  Moana's AC mechanisms (I am working on the blog about it).

The current MoanaML has a couple of implementations including one for Irmin. I previously blogged about it.

I was also working on showcasing the the power behind MoanaML  and the ideas behind a PIH-type applications by developing a contacts app prototype. I will have a separate blog about it soon. In a nutshell, I developed contacts app which uses MoamaML code to store all contacts in the Moana graph, which also contains various access control policies for various requesters. Using js_of_ocaml I converted the contacts app (backend) code into JS which allowed me to reuse it in the JavaScript app development framework such as AngujarJS. I then used Ionic framework which translates JS apps to native mobile apps to create the front end. The current implementation requires further testing and development, nevertheless, the current ability to deploy OCaml code on the phone with nice native app like user interface, I believe, serves as a nice substrate for further for it.

2. I helped out to setup the Ocaml teaching resource page for the OCaml.org website.  The page contains resources for teaching OCaml. It also gathers information on where OCaml is currently being taught.

3. Read the paper :)


  1. The blog article you referenced in "I previously blogged about it" does not seem to be available.

  2. Thanks Misha. All fixed. Sorry for that.