Patterns
35 items
35 items
Real-time processing of continuous data streams
Stream processing handles continuous, unbounded data flows in real-time, processing events as they arrive rather than in batches. Systems like Apache Kafka Streams, Apache Flink, and Spark Streaming enable sub-second processing of millions of events. Key concepts include windowing (grouping events by time), watermarks (handling late data), and exactly-once semantics. This pattern powers real-time analytics, fraud detection, live dashboards, and event-driven architectures where immediate processing is essential.
Unlike batch, stream data has no end. Events arrive continuously. System must process indefinitely without accumulating unbounded state.
Events may arrive out of order or late. Event-time (when event occurred) differs from processing-time (when system sees it). Correct handling requires watermarks.
Windows group unbounded streams into finite chunks. Tumbling (fixed, non-overlapping), sliding (overlapping), session (activity-based).