From Batch to Streaming: Building Real-time Inference Pipelines for Machine Learning

Authors

  • Chirag Maheshwari Courant Institute of Mathematical Sciences, New York University Author

DOI:

https://doi.org/10.32628/CSEIT251112374

Keywords:

Machine Learning Pipelines, Real-time Inference, Continual Learning, Stream Processing, MLOps Architecture

Abstract

Modern machine learning applications are experiencing a fundamental shift from traditional batch processing toward real-time inference pipelines, driven by the increasing demand for timely and context-aware predictions. This article comprehensively explores different training and serving architectures, ranging from conventional batch processing to sophisticated streaming approaches. It examines the evolution of ML pipelines, discussing the advantages and challenges of various architectural patterns, including batch training with batch predictions, batch training with streaming predictions, and fully streaming approaches. The article delves into the implementation considerations for each architecture, addressing critical challenges such as data freshness, concept drift, and model degradation. It also explores continual learning systems, representing the cutting edge of adaptive ML architectures. The article includes a detailed analysis of best practices for implementation, covering architecture selection, system design considerations, and operational excellence. Through this systematic examination, the article provides practitioners with a structured framework for selecting and implementing appropriate ML pipeline architectures based on their specific requirements and constraints.

Downloads

Download data is not yet available.

References

Nina Zumel, "Real-Time Data in Machine Learning: Challenges and Solutions," Dataversity, 2022. [Online]. Available: https://www.dataversity.net/real-time-data-in-machine-learning-challenges-and-solutions/

Aarti Dhapte, "Real-Time Analytics Market Research Report: By Application (Marketing Analytics, Financial Analytics, Operational Analytics, Customer Analytics, Supply Chain Analytics), By Deployment Model (On-Premises, Cloud-Based, Hybrid), By Technology (Streaming Analytics, Complex Event Processing, Data Mining, Data Warehousing), By End Use (Retail, Healthcare, Manufacturing, Telecommunications, Banking and Financial Services) and By Regional (North America, Europe, South America, Asia Pacific, Middle East and Africa) - Forecast to 2034," Market Research Future, Feb. 2025. [Online]. Available: https://www.marketresearchfuture.com/reports/real-time-analytics-market-37074

Nick Parsons and Aditya Nambiar, "Challenges of Building Realtime Machine Learning Pipelines," Fennel.ai, 2022. [Online]. Available: https://fennel.ai/blog/challenges-of-building-realtime-ml-pipelines/

Daniel Greenberg, "Optimizing Data Pipelines: Understanding Batch Processing vs. Stream Processing," Rivery, Jan. 2025. [Online]. Available: https://rivery.io/blog/batch-vs-stream-processing-pros-and-cons-2/

CloudFactory, "Everything you need to know about batches in Machine Learning," CloudFactory. [Online]. Available: https://wiki.cloudfactory.com/docs/mp-wiki/training-parameters/everything-you-need-to-know-about-batches-in-machine-learning

GeeksforGeeks, "What is the difference between batch processing and real-time processing?" GeeksforGeeks, 2024. [Online]. Available: https://www.geeksforgeeks.org/what-is-the-difference-between-batch-processing-and-real-time-processing/

Paul Iusztin, "A Framework for Building a Production-Ready Feature Engineering Pipeline," Towards Data Science, 2023. [Online]. Available: https://towardsdatascience.com/a-framework-for-building-a-production-ready-feature-engineering-pipeline-f0b29609b20f/

Sahil Sharma, "Apache Flink for Real-Time Stream Processing," Medium, 2023. [Online]. Available: https://medium.com/@DataEngineeer/apache-flink-for-real-time-stream-processing-e83335a70cfe

Chip Huyen, "Real-Time Machine Learning: Architecture and Challenges," InfoQ, 2022. [Online]. Available: https://www.infoq.com/presentations/ml-arch-challenges/

Liyuan Wang, Xingxing Zhang, Hang Su, and Jun Zhu, "A Comprehensive Survey of Continual Learning: Theory, Method and Application," 2023. [Online]. Available: https://arxiv.org/abs/2302.00487

Vincenzo Lomonaco, "Continual Learning for Production Systems," Medium - Continual AI, Medium, 2019. [Online]. Available: https://medium.com/continual-ai/continual-learning-for-production-systems-304cc9f60603

AWS, "What is MLOps?," AWS. [Online]. Available: https://aws.amazon.com/what-is/mlops/

Eugeneyan, "More Design Patterns For Machine Learning Systems," Eugene Yan's Blog, 2023. [Online]. Available: https://eugeneyan.com/writing/more-patterns/

Downloads

Published

25-02-2025

Issue

Section

Research Articles