Four ways to serve predictions
What it is
Predictions reach the product in one of four ways:
- Batch: compute predictions for everyone on a schedule and store them; the product looks them up.
- Online: compute when the product asks, within its request, and return the answer.
- Streaming: compute when an event happens, without anyone asking, and push the result where it is needed.
- Edge: run the model on the user's phone, browser or a device.
Why it matters
Each suits different needs for freshness, latency and cost.
- Batch is cheapest and simplest but only as fresh as its last run.
- Online uses the latest context but must be fast and always available.
- Streaming reacts to events in seconds without blocking any request.
- Edge avoids the network entirely, for speed, offline use or privacy.
In the real world: Kirana Kart uses all four: batch for demand forecasts and 'buy again' lists, online for ranking and ETA, streaming for fraud signals on account activity, and edge for a small on-phone model that predicts which search the user is typing.
Visual example
PatternsPick per prediction, not per company.
Choosing online for everything by default. Many predictions could be computed overnight with no loss, at a fraction of the cost and risk.