Select Page

Recently I found myself writing a self-contained server-based traffic management software service. This harvested traffic data from a TomTom navigation API. It then used Artificial Intelligence to “learn” from that information and decide on how to advise users. This product made it into the renowned Cape Breton Spark competition, which was a great experience. Since then the project has stalled, but I’ve decided to open-source a part of it in the hopes other people may use it in one of their future projects.

The Problem

Gathering data over a network and processing it is very asynchronous and the problem lent itself to a simple actor framework. This is a paradigm that’s commonplace in languages such as Erlang, Smalltalk, Go, and others, but I wanted to use C++. My language choice was made based mainly on wanting to hit the ground running and my previous experience in C++ would make that a lot easier. Others too, I’m sure will find themselves in that boat.

The Actor Framework

I did a little research and found the credible CAF: C++ Actor Framework project. This, for me, was overkill. It required C++14 and had a lot of baggage. More functionality typically comes at a price: often performance, more often maintainability, breaking changes, bulky prerequisites such as boost, etc. I found other platforms I could use too, such as those in the Apache foundation, but they suffered similar shortcomings, for my project at least.


So I wrote my own. I wrote the application with the actor framework in separate files to the business logic, so that I could reuse the platform for other future projects. And then I decided to open-source it. My own projects continue to benefit from the generosity of open-source developers, so this is a very small payback, for anyone who stumbles across it and finds it useful.

calf-source on github


Good Luck