Announcement: Barefoot release – Online map matching with real-time visualization using NodeJS and OpenLayers
In the last weeks, I noticed a significant increase of interest in our Barefoot library due to a viral spreading on Twitter. I’m very happy about the attention and positive feedback. I would like to grasp the opportunity and the attention for announcing some features that will be available with the next release, which will be published within next weeks.
A web-based frontend shows objects with map matched positions (red) and – when hovering with the mouse cursor – also the map matched paths (red), see video below. Selecting an object focuses on the object and shows the full result of Hidden Markov Model map matching [1,2], which includes alternative positions and paths (green) with their probability (indicated by transparency). This may not only be an interesting use case for businesses and Open Source and Open Data projects, but also illustrates the essence of Hidden Markov Model map matching: It keeps track of alternative positions and paths, rates them with a probability, and converges with each iteration for increasing confidence on the object’s position and path on the map.
A single machine (commodity hardware) can host Barefoot’s tracker and monitor server for handling hundreds of objects, each sending position update messages every second. A large scale solution of Barefoot’s tracker server for handling several thousands (or maybe millions) of objects is straight-forward. (Here, we do not focus on scaling Barefoot’s monitor server.) A simple state-of-the-art solution uses a combination of Storm, Kafka, and Cassandra (see Figure 2): 
- Streams of position messages, each sent from a moving object, are queued in Kafka which acts as a partitioned and distributed message queue.
- Storm pulls position messages from Kafka (blue arrow) and determines each object’s state, consisting of its position and path on the map. For that purpose, it performs map matching of position messages in real-time and keeps track of the objects’ states.
- Object states are stored in Cassandra which is a distributed hash table that enables fast reading and writing (red arrows) and provides a HDFS interface for further processing with Hadoop.
With each position message, Storm must read the state of a respective object from Cassandra to perform map matching. However, remote reading from Cassandra induces higher latencies during processing. To decrease latency, Storm nodes may try avoiding reads (dashed red arrow) by caching object states in local memory. As a consequence, Storm must assign position messages to nodes holding the respective object’s state in cache (dashed blue arrows). For that purpose, Storm nodes must divide the set of object states into subsets A, B, C … (e.g., ranges of object ids or geographical regions) and must forward messages to the appropriate node if necessary. Message forwarding can be implemented easily with Storm’s concept of direct stream grouping and can be coordinated with Zookeeper. Only if the object’s state is not in local cache, e.g. if an object moves to another region, a Storm node must read the state from Cassandra.
As maintainer of the project, I’m inviting enthusiasts and experts to join the project and to use Barefoot. – It’s free and uses free map data, thanks to OpenStreetMap. – Making Barefoot a part of the Open Source community in Geographic Information Systems may not only support your business but also helps other great Open Source and Open Data projects, such as OpenStreetMap.
 P. Newson and J. Krumm. Hidden Markov Map Matching Through Noise and Sparseness. In Proceedings of International Conference on Advances in Geographic Information Systems, 2009.
 C.Y. Goh, J. Dauwels, N. Mitrovic, M.T. Asif, A. Oran, and P. Jaillet. Online map-matching based on Hidden Markov model for real-time traffic sensing applications. In International IEEE Conference on Intelligent Transportation Systems, 2012.
 S. Mattheis, K. Al-Zahid, B. Engelmann, A. Hildisch, S. Holder, O. Lazarevych, D. Mohr, F. Sedlmeier, and R. Zinck. Putting the car on the map: A scalable map matching system for the Open Source Community. In INFORMATIK 2014: Workshop Automotive Software Engineering, 2014.