How bmwcarit/barefoot works
Project type and purpose
• Barefoot is an open-source, Java-based map matching library and a set of stand-alone servers (matcher and tracker) plus auxiliary tools (map server, monitor UI, submission scripts).
• It provides both offline (batch) and online (real-time) Hidden Markov Model (HMM) map matching on OpenStreetMap data, a suite of spatial/geometric operations, cluster analysis (DBSCAN), routing (Dijkstra), and support for parallel/distributed execution.
File structure
• Top-level directories
• config: properties for servers and map loading
• deps: third-party licenses, manually vendored jars (ESRI, GeographicLib, Jackson, JeroMQ, etc.)
• Dockerfile, Postgres/PostGIS configuration, import scripts, Python map tools (bfmap.py, osm2ways.py)
• src: Java code organized under com.bmwcarit.barefoot
– analysis (DBSCAN)
– markov (HMM core: states, transitions)
– matcher (offline matcher API and MatcherServer)
– tracker (online matcher API and TrackerServer)
– road, roadmap (in-memory map data structures, loaders)
– spatial (geometric operators, quad-trees)
– topology (graph, Dijkstra router)
– scheduler (parallel task scheduling)
– util (common I/O, server base classes, JDBC sources)
• util/monitor: NodeJS web monitor (ZeroMQ → Socket.io → browser)
• util/submit: Python scripts for batch and streaming submission to servers
• wiki: markdown documentation
README for additional insights
• Confirms architecture:
• “Docker-based map server” (PostgreSQL + PostGIS container)
• “Standalone matcher server” (Java JAR, REST-like API)
• “Standalone tracker server” (Java JAR, ZeroMQ for push)
• “Monitor” (NodeJS web app visualizing tracker output)
• Library API for JVM integration (Hadoop, Spark, Storm)
• Key technologies: Java 7+, Maven, ZeroMQ (JeroMQ), PostgreSQL JDBC, ESRI Geometry API, GeographicLib, Jackson JSON.
Detail without overthinking
• Server, module layer, and communication channel
• Docker map server, matcher server, tracker server, monitor UI, and submission scripts