Skip to content

Data & cloud

Edge versus cloud

Deciding what runs on the vehicle and what runs in a datacentre — the four constraints that make the decision for you, and the hybrid patterns that come out of it.

Intermediate6 minEdge · Cloud · Architecture

Every connected feature raises the same question: does this computation happen in the vehicle or in a datacentre? The answer is usually forced by constraints rather than chosen, and knowing which constraint applies saves a lot of debate.

The four constraints that decide it#

Where things actually land#

FunctionWhereThe deciding constraint
Braking, stability controlVehicle (safety ECU)Latency, availability, safety
Lane keeping, ADAS perceptionVehicleLatency, data volume
Cluster renderingVehicleLatency, availability
Voice wake wordVehicleLatency, privacy
Voice understandingUsually cloud, with fallbackCompute cost
Turn-by-turn guidanceVehicle, with cached mapsAvailability
Route calculation with trafficCloudNeeds fleet-wide data
Charging-stop planningCloud, cached on vehicleNeeds live charger status
Media playbackVehicle, streamed contentAvailability of the UI
Fleet analyticsCloudNeeds every vehicle
Fault detectionVehicle detects, cloud correlatesBoth — see below
Model trainingCloudCompute cost
Model inferenceVehicleLatency, data volume

The hybrid patterns worth knowing#

Most real features are not purely one or the other. Four recurring shapes:

Detect locally, correlate centrally#

Compute centrally, cache locally#

Route options, charger locations, map tiles, media metadata. Computed where the data lives, cached on the vehicle so the feature survives a tunnel.

Cloud with a degraded local fallback#

Shadow mode#

Where teams get this wrong#

Gotcha

Assuming connectivity. The most common error by a wide margin, and it comes from developing on a desk with good Wi-Fi. Test in aeroplane mode, deliberately and routinely.

Sending raw data to decide in the cloud. Discussed in the previous topic — this is usually a volume problem disguised as an architecture preference.

No degraded mode. A feature that works only online is a feature that visibly fails in every car park.

Putting a latency-critical loop behind a network call. It will work in testing and fail in a tunnel, at the worst moment.

Ignoring cost. Cloud compute per vehicle per month, multiplied by a fleet over fifteen years, is a number the business needs to have seen before you build.

Forgetting the fifteen-year horizon. A cloud service the feature depends on must still exist in 2041, or the feature must degrade gracefully when it does not. Vehicles have outlived the services they were built against, repeatedly.

Practical questions for a design review#

Ask these five, in order, and the architecture usually settles itself:

  1. What is the latency budget? Under a second means on-vehicle.
  2. What happens with no network? If the answer is "it breaks", that is a requirement, not an accident.
  3. How much data must move? If the input is a video frame, the decision is made.
  4. Does it need data from other vehicles? If yes, part of it is in the cloud.
  5. What does this cost per vehicle per month, for fifteen years?

Next#

Who is accountable for all of this data — governance and privacy.

References & further reading

Code links target the main branch on cs.android.com. AOSP moves — if a path 404s, search the symbol instead.