All projects

Cloud · Case study

Fleet Orchestrator

A cloud control plane that schedules tasks, collects telemetry and ships over-the-air updates to a fleet of 100+ autonomous mobile robots.

Role
Lead developer
Timeline
2023 · 6 months
Stack
  • Go
  • Kubernetes
  • Kafka
  • PostgreSQL
  • gRPC
Links
Robots send events through a gRPC gateway into Kafka, which feeds the scheduler, telemetry and over-the-air update services.
How events flow from the robots to each service.

The problem

Each robot was managed on its own: tasks were assigned by hand, logs lived on the robot, and updates meant connecting to every machine. With more than 100 robots, that stopped scaling.

The goal was one place to see and control the whole fleet, that kept working when robots dropped off the network.

How I solved it

I split the system into small services that talk through an event stream instead of calling each other directly:

  • Gateway: robots connect over gRPC; the gateway authenticates them and forwards events.
  • Kafka: every event is stored in order, so a robot that reconnects can catch up.
  • Services: scheduler, telemetry and OTA updates each read only the events they need.
Key decision

Using Kafka as the backbone meant a slow service never blocks the robots. Each service reads at its own pace and can be restarted safely.

// Example: a service reading robot events
for msg := range consumer.Messages() {
    evt := decode(msg.Value)
    if evt.Type == "task.done" {
        scheduler.Assign(evt.RobotID)
    }
}

Architecture

Everything runs on Kubernetes, with PostgreSQL as the source of truth for robots, tasks and update rollouts. The diagram above shows how events flow from the robots to each service.

Results

  • 100+robots managed from one dashboard
  • —Example: time saved per update
  • —Example: uptime or task throughput

What I learned

Designing for robots that go offline changes everything: every message needs an ID, every action needs to be safe to repeat, and the system has to assume it will be out of date.