Search code examples
streaming

Sliding Vs Tumbling Windows


I'm reading a long article about Data Stream Management, and I'm a bit confused by the difference between Sliding and Tumbling Windows. So far I've understood that tumbling windows can be time-based and has fixed (start,end)-points which "tumbles" when that window expires. E.g. A time-based window can be 1 minute long. So for every minute the window tumbles to process aggregations for a data set.

It is sliding windows that gets confused me. Is sliding windows like count-based such that a window tumbles when x-number of tuples have entered the window. Or is it that the x-recent tuples that entered the window will be part of the window, and that the older tuples will be evicted from that window. I.e. a window that is continuously updated as new tuples arrives?


Solution

    1. Tumbling repeats at a non-overlapping interval.
    2. Hopping is simlar to tumbling, but hopping generally has an overlapping interveral.
    3. Time Sliding triggers at regular interval.
    4. Eviction Sliding triggers on a count.

    Below is a graphical representation showing different types of Data Stream Management System (DSMS) window - tumbling, hopping, timing policy sliding, and eviction policy(count) sliding. I used the above example to create the image (making assumptions).

    Windowing in DSMS