Skip to main content

CALF: C++ ACTOR LIGHT FRAMEWORK

 

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.

CALF

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

SG

Comments

Popular posts from this blog

THE VALUE OF DATA

  Every organization has data, whether they know it or not. A company’s data is their second biggest asset (staff, data, customers, other assets). Without data, how do you make decisions? How do you chose what areas to focus on, what department to grow, which customers need another visit, where your strengths and weaknesses are? Lots of firms neglect their data, leaving it to languish in old computer systems or worse still, paperwork, when they should be making it work for them. It should be updated continuously and used to generate valuable reports for management and staff. WHAT IS JOINED-UP DATA? You’ve probably heard of the phrase joined-up thinking. Well, joined-up data is really the same thing: different departments having a free exchange of data. An example of a system with joined-up data would be the following: Imagine a railway company. One computer system holds the track information – lengths, junctions, stations – in a  GIS  database. Another system handles the scheduling. Th

HOW TO CHOOSE A WEB DESIGNER

  You can’t run a business in the 21st Century without a website. Well, you can, but, honestly, why would you want to. Navigating the world wide web is easy, but navigating the world of procuring a website is a little more involved. Not to mention, social media, which many purport as being a must for any business. SOCIAL MEDIA That’s a good a place as any to start. The value of Social Media on your business success is often over-inflated. Read that again. Yep, outspoken some will say, but it’s true. It’s in the interest of consultants and service providers to over-play the role of social media in your business as they can justify more costs. And it’s more than that, website practitioners have invested many hours in learning the social media platforms. They have to believe that has been worth it. So how much social media engagement do you need? It totally depends on your business. If all your customers are on facebook you may want a facebook page. If they’re on reddit, you may want a su