KatInterview

Real-Time Fleet Data Platform Architecture

System DesignModel answer
MediumModel answerSystem Designreal-time-systemsdata-ingestionAPI-design

Last updated

Design a platform to monitor live telemetry from electric vehicles, covering data collection, ingestion, storage, APIs, and operational controls.

You're designing a monitoring platform for an electric vehicle company's internal operations team.

The platform needs to display live telemetry from their fleet—metrics like speed, cabin temperature, battery charge level, and location—as vehicles drive around. The operations team should be able to view current readings and historical trends for any vehicle.

Your design should address:

  1. Vehicle data pipeline: How do vehicles capture and send telemetry to your backend? What protocols and data formats would you use?

  2. Backend ingestion and storage: How does the system receive, validate, and store incoming data at scale? How do you ensure data quality and handle vehicles going offline?

  3. Query and API layer: What APIs would you expose for internal tools? How would you efficiently retrieve the most recent speed reading for a given vehicle?

  4. User interface: What would the monitoring dashboard show? How would you keep it responsive with live updates?

  5. Operational controls: How would you implement a feature that stops a specific vehicle from sending data to any external systems? Consider both immediate enforcement and reliability when vehicles are offline.

  6. AI-assisted development: How would you incorporate AI coding tools during implementation to speed up development while maintaining code quality, security, and long-term maintainability?

Make reasonable assumptions about fleet size and data volume, and state them clearly. Discuss trade-offs in your choices.

Hints

Hint 1

Start by estimating throughput: how many vehicles, how often does each send data, and what does that mean for messages per second and storage per day?

Hint 2

Consider the vehicle's connectivity reality—intermittent network, offline periods—and design for at-least-once delivery with deduplication.

Hint 3

For 'latest value' queries, think about a storage layer optimized for key-value lookups separate from your time-series store.