Real-time Machine Learning: Architecture and Challenges
summary
Argues that fresh data beats stale data and maps concrete architectures: batch predictions, online with precomputed features, and near‑real‑time streaming. Names tools and tradeoffs—Spark, Flink, Kafka/Kinesis, BigQuery/Snowflake/Bigtable, Redis and DynamoDB for online stores—and describes patterns that work: precompute counters into Redis, use Kafka+Flink to update feature caches, lock‑and‑wait to guarantee train/serve consistency, and backfill for new logic. Gives cost examples (one team spends $2M/yr on Redis) and efficiency data (98% wasted batch predictions), and reports that streaming often works but raises operational complexity.
AI-written summary · about
chapters (20)
- 0:00Introduction and setup
- 1:27Fresh vs stale data debate
- 2:32Real-time ML use cases
- 5:20Batch vs online predictions
- 6:45Latency sources in predictions
- 7:28Batch predictions explained
- 8:32Online predictions with batch features
- 9:58Real-time feature computations
- 11:42Near real-time computations
- 13:26Balancing latency and freshness
- 16:05Feature stores in architecture
- 18:56Near real-time computation challenges
- 21:03Lock and wait approach
- 22:05Backfilling data challenges
- 24:35Combining batch and streaming data
- 26:20Streaming infrastructure management
- 27:45Unifying batch and streaming pipelines
- 30:04Cost considerations for real-time ML
- 33:12Retraining and freshness requirements
- 36:05Q&A on Redis and costs
