Skip to content

Releasing Okku

I am pleased to announce the release of the Okku library.

Okku is a Clojure wrapper around the Akka library. Very briefly, Akka brings the Actor model to the Scala programming language, and hence to the JVM. The Actor model is a model of computation based on small, asynchronous units that communicate only through message passing, without any shared memory.

This means an application built on the Actor model is trivial to distribute: actors do not know nor care whether the actors they communicate with are on the same machine.

It is of course no silver bullet: the whole application has to be designed specifically for the Actor model, so there is some upfront cost, and even though the code for an actor will be the same whether it communicates with local or remote actors, you still have to think about distribution while designing your system: problems such as network latency, lossy communications or node failings do not magically disappear.

Let’s get back to Okku: Okku brings Akka to the Clojure world, allowing one to create actors as easily as:

(use 'okku.core)
(let [system (actor-system "test")
      echo-actor (spawn (actor (onReceive [msg]
                                  (println msg)))
                        :in system)]
  (.tell echo-actor "Hello, world!"))

 

I have developed Okku for an application I am currently building. It is a distributed monitoring system based on the recognition of time-related event patterns, where I have to keep every partially recognized pattern for completeness reasons. Without going into more detail, it is pretty easy to see that each partially recognized pattern can be modeled as an actor waiting for more events to decide whether it shall be recognized or not.

The mapping from my problem domain to the Actor model thus seems pretty straightforward, and as I did not find any existing Actor library for Clojure, I wrote one. Once I had written it for my own use, I decided it would be worth going the extra mile to document it and make it useable for other projects. Okku is the result. Enjoy.


 

Releated Posts

Calibrate to Interpret

Trustworthy machine learning is driving a large number of the ML community works in order to improve ML acceptance and adoption. In this paper, we show a first link between uncertainty and explainability, by studying the relation between calibration and interpretation.
Read More

Mass Estimation of Planck Galaxy Clusters using Deep Learning

Galaxy cluster masses can be inferred indirectly using measurements from X-ray band, Sunyaev-Zeldovich (SZ) effect signal or optical observations. Unfortunately, all of them are affected by some bias. Alternatively, we provide an independent estimation of the cluster masses from the Planck PSZ2 catalogue of galaxy clusters using a machine-learning method.
Read More