Preparing your design workspace

Loading the problem and your latest saved attempt…

Design an Autonomous-Vehicle Cloud Command System

Design a secure command channel that delivers expiring operational commands to connected or reconnecting autonomous vehicles and reports truthful per-vehicle outcomes.

Problem statement

An interview report asks for a communication system between autonomous vehicles and the cloud for commands.

For this exercise, assume an authenticated fleet operator submits a high-level operational command, such as enter service, leave service, or return to a depot, for one vehicle or an immutable snapshot of a named cohort.

Each logical command has a stable command ID, an operator-scoped idempotency key, and an expiry deadline. The cloud must durably accept the command, fan it out, and show a truthful outcome for every target.

Vehicles normally maintain mutually authenticated sessions through regional gateways, but connections may drop, reconnect, duplicate messages, or lose acknowledgements.

A vehicle authenticates every command, rejects expired or unauthorized work, suppresses duplicate execution by command ID, and may reject or defer a command when local safety or operating policy does not permit it.

A target may be pending, delivered, accepted, rejected, deferred, applied, expired, canceled, or outcome-unknown. The cloud must never report applied without an authenticated vehicle acknowledgement for that command and vehicle. Cancellation is best effort and cannot undo work already applied.

Design command admission, immutable targeting, fan-out, gateway delivery, vehicle acknowledgement, per-target state, aggregate status, recovery, and audit. Remote steering or braking, route planning, trip dispatch, maps, passenger data, software updates, and bulk telemetry analytics are out of scope.

What to build

  1. An authenticated operator can idempotently submit one expiring operational command for a vehicle or an immutable cohort snapshot and receive a durable accepted or rejected result.
  2. The platform delivers each still-valid target command through the vehicle's current secure session with retry-safe identity and bounded priority.
  3. A vehicle can authenticate, deduplicate, accept, reject, defer, or apply a command and return an acknowledgement tied to the command and vehicle.
  4. An operator can inspect versioned per-target and aggregate outcomes without delivery being misreported as vehicle application.
  5. An operator can request best-effort cancellation, while expiry and already-applied outcomes remain truthful and auditable.

At scale

  • For this exercise, assume 100,000 registered vehicles and 25,000 concurrent secure vehicle sessions.
  • For this exercise, assume 20 routine logical commands per second and occasional cohort commands targeting up to 10,000 vehicles, with fan-out admitted within 60 seconds.
  • For this exercise, assume a durable submission response within 300 milliseconds, connected-vehicle delivery within two seconds at p95, status visibility within five seconds, and a default command expiry of five minutes.
  • For this exercise, assume 99.99% command-control availability, no loss of an accepted logical command during one regional-gateway failure, and one year of command, target, acknowledgement, and operator audit history.