Engineering
February 20, 2024

Introducing Axle: How We’ve Built Atlas and Apollo

Author
Bugrahan Abdulkarim

Telematics data is the backbone of our supply across logistics, transportation, and fleet management. Yet accessing this data has become a nightmare for developers. With telematics data fragmented among numerous providers, each with their own unique API, developers are forced to spend countless hours integrating different APIs and dealing with inconsistent data. This takes valuable time away from building their applications and leads to inaccurate data and wasted resources.

Axle is the all-in-one universal data platform for telematics, streamlining the development process for logistics and transportation. Our single API grants you access to live location data, webhooks of new entities joining your fleet, and more — all in real time. Say goodbye to the headache of integrating multiple telematics APIs and dealing with inconsistent data. With Axle, you can focus on building innovative, location-aware applications that drive results and achieve accurate, actionable data with ease.

The Axle Architecture

Our goal is to provide as many accurate data points as possible for each customer on a frequent basis. Each of our customers has one or many fleets comprised of thousands of entities, thus increasing the complexity of our engineering efforts.

At the core of our platform lie Apollo and Atlas, the services that drive our customers' success. These two services work together to capture live data so that our customers can make timely, informed decisions. With Apollo and Atlas, we simplify data access and streamline the development process for industries such as logistics and transportation.

Apollo

As developers ourselves, we understand the difficulty of obtaining consistent live location data or sending instant webhooks. That's why we built Apollo, a distributed short-polling app written in Golang. It's the bread and butter of our platform, allowing us to ping the telematics APIs, giving you access to real-time location data. Apollo is meticulously configured for each telematics provider, polling at intervals ranging from 4 to 30 seconds, depending on the specific provider. This frequent polling is vital, especially since most Electronic Logging Devices (ELDs) don't provide historical data, necessitating up-to-date data retrieval. Through Apollo, we've successfully tackled one of our most challenging aspects at Axle: navigating the different rate-limiting implementations of various telematics providers. We often find ourselves making educated guesses to ensure we stay within the rate limits. Over time, we've refined this process across our numerous integrations, including those with Eroad, Motive, Samsara, and many others, to reach a stable version.

Atlas

Atlas plays a pivotal role in facilitating Apollo's data collection process. Often referred to as Apollo's messenger, Atlas serves a dual function. Firstly, it aggregates crucial data from our database, such as telematics information. Secondly, it manages a vital aspect of this data retrieval process: token management.

Since we're making requests on behalf of our customers, we're entrusted with tokens that grant us permission to access their data. However, these tokens aren't perpetual. They come with an expiry date, and once they expire, any subsequent request using that token is met with an 'unauthorized' response from the telematics APIs. This is where Atlas showcases its robustness. To ensure uninterrupted access to the telematics data, Atlas proactively refreshes these tokens based on a set cadence that varies by provider.

These tokens are stored securely in our Redis cache, a high-performance in-memory storage system. Before an Apollo worker—a goroutine that picks up a message—initiates a request, it reads from this cache. This ensures it's always equipped with the most up-to-date token for the specific Telematics Service Provider (TSP) in question. This preemptive approach ensures that our tokens remain valid, and we seldom encounter authorization issues.

After handling the tokens and data retrieval, Atlas dispatches messages to our AWS Simple Queue Service. Every message encapsulates a unit of work corresponding to a unique telematics account. With this streamlined process, our Apollo instances can effortlessly pick up a message, engage with the telematics API, refresh the data, update our database, and move on to the next message, ensuring a smooth and consistent data flow.

In short, our Atlas and Apollo services work together to provide accurate and live location data, simplifying the development process and saving you valuable time and resources. With our telematics platform, you can focus on building innovative, location-aware applications that drive results.

Use Cases

With our platform's capabilities, our customers can streamline their operations and improve their bottom line. Apollo and Atlas allow for a variety of use cases, including:

  • Serve real-time webhooks informing driver status updates, vehicle geofencing, and many more!
  • Provide vehicle breadcrumbs and location history even when a telematics provider doesn't support it.
  • Advanced fleet monitoring, including fuel and CO2 usage.

Summing It Up: Axle, The Future of Transportation

Apollo and Atlas are the backbone of the Axle platform, providing the necessary infrastructure for collecting and processing data from multiple telematics APIs in a fast and efficient manner. Their powerful short-polling capabilities and horizontal scalability ensure that our customers have access to live location data and other critical information in real time.

These services allow us to streamline the data access process and simplify the software development process for our customers, providing numerous benefits to the trucking industry. With their help, customers can improve fleet management, compliance, and safety monitoring, reduce fuel card fraud, and much more!

Apollo and Atlas are core to fulfilling Axle's mission of being the universal data platform for trucking, supply chain, and logistics. Without this critical infrastructure, the platform could not deliver the live, reliable, and comprehensive data access that our customers need. We are proud of their contribution to the Axle platform and look forward to working with our customers to achieve their goals.

Schedule a demo to learn more.

Written by
Bugrahan Abdulkarim

The future of transportation is built with Drumkit