Skip to content
All work

Incident Dispatch

Polícia Militar do Estado de São Paulo · Software Engineer · 2023 to 2024

A distributed system for opening an incident and routing it to the right patrol unit, built to cut the time between a call coming in and a unit being on its way.

−62%
response time on urgent incidents

The problem

Creating a case and getting a unit moving were two separate concerns held together by people talking to each other. Every handoff cost minutes, and on urgent incidents minutes are the whole product.

Architecture

Case creation and dispatch are separate services: synchronous gRPC where the caller needs an answer before it can continue, asynchronous events where it does not. Unit status flows back through the bus, so dispatch always assigns against current state rather than a cached guess.

gRPCeventsIntakecall · reportCase servicecreation · triageDispatchunit assignmentRabbitMQstatus eventsPatrol unitslive status
The shape of the system, not its service inventory. Intake feeds the case service, which calls dispatch over gRPC to assign a unit, and unit status flows back through RabbitMQ. Names here are generic: this one runs for a police force.

Also at PMESP

Backend lead on a time management system for COPOM, where registering employee timesheets was still manual. Automating it halved processing time and removed roughly 100 hours of manual work a month.

.NET 8 · C# · SQL Server · gRPC · RabbitMQ · Redis · Terraform · DDD