Kurukuru Matches Student Riders in Real Time Using Go and WebSockets

Kurukuru is a college ride-sharing app where pilots with free seats carry co-pilots who pay in in-app coins. The Go backend on Postgres with PostGIS handles three kinds of real-time needs, each with a different transport: WebSockets stream live trip positions, HTTP polling checks match status, and a background matcher with a queue suggests recurring commutes. The author chose to keep match decisions in the database rather than push them over sockets, since pushed data can be lost. The matching rule projects each co-pilot's start and destination onto the pilot's route, requiring departure times within 20 minutes, both points within 600 m of the route, correct directional order, and at least 250 m of shared travel. Candidates are ranked by combined off-route distance and departure gap.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in