A user looking at their mobile phone tracking a vehicle's location

Using GPS to Pinpoint Vehicle Standstills

Introduction Knowing the exact location of a vehicle in real-time can be invaluable. Whether it’s for deliveries, transportation, or personal use, a delay can raise questions. Is the vehicle stuck in traffic? Has there been a mechanical issue? Or is it just a short distance away? Modern vehicles are often equipped with GPS devices that provide continuous location updates. This data is essential not just for the vehicle operators but also for those who are dependent on its timely arrival....

October 27, 2023 · 4 min · 823 words · Sudhanshu Mishra

Go Lessons: Local LRU Cache

Introduction In the architecture of a typical web application, a database often serves as the primary data store while a distributed cache like Redis supplements it for enhanced performance. While this setup already offers a level of efficiency, there’s room for further optimization. Enter the concept of a local LRU (Least Recently Used) cache. Using a local LRU cache allows us to reduce the load on Redis and improve the speed and responsiveness of the application even more....

October 1, 2023 · 3 min · 635 words · Sudhanshu Mishra
A docker ship with osrm-backend container

Deploying osrm-backend to Production

Introduction When we set out to revamp the tracking system for Cityflo, we quickly realized we needed a way to align the vehicle locations we receive with actual roads. While Google Maps offers a Snap to Roads API that accomplishes this, it can get quite expensive when you’re processing locations in real-time. Enter osrm-backend, a powerful routing engine coded in C++ that uses OpenStreetMap data. What piqued our interest was its match service, which is excellent for correcting noisy GPS data by snapping it to the closest road network....

September 30, 2023 · 4 min · 817 words · Sudhanshu Mishra

Go Lessons: How to Exit a Child Goroutine

Introduction Lately, I’ve been working on a hobby project which is a distributed real-time chat app. The objective of this project was to learn the Go programming language. Having worked with Python for over the past 6 years, I found Go extremely fascinating! Go has this amazing cheap and lightweight thread called goroutine that helps create concurrent applications so much easier. The Problem While writing the chat app, I came across a problem of cleaning up the resources when a user disconnects from the server....

February 11, 2022 · 2 min · 340 words · Sudhanshu Mishra