Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Creating a new class of Windows, SlidingWindows, to add aggregation flexibility and features for users. Building off the TimeWindow implementation, these sliding windows will have an inclusive start and end point and each window will be unique, meaning that each distinct set of records will only appear in one window. This is in contrast with hopping windows, which can mimic sliding windows with an advance of 1ms, but result in many overlapping windows, as shown below. This causes expensive aggregation calculations for each window, whereas for the sliding windows, aggregations are only done for each unique window, cutting down significantly on the amount of work required.

Windows Figure 1: Windows with SlidingWindow Implementation: Window size 10ms, 9 windows for 5 records.



Image RemovedImage Added





Figure 2: Windows with HoppingWindow with a 1ms advance: Window size 10ms, 17 windows for 5 records.

Image RemovedImage Added


With Sliding Windows, a new window is defined when a new record enters on the right, or one after a record leaves the window on the left. In this example, a new window is formed with C as the end point when it enters the window area, creating a window with the unique set of {A, B, C}. Then, as the window slides along, a new window is defined 1ms after a record, A, leaves the window, creating a new window with the unique set of {B, C}. The next window to be created in this example would be 1ms after B leaves the window, creating a window with just {C}. In this implementation, there are two ways to define a distinct window using the sliding window semantics, one when a record enters the window from the right (Figure 3), and one when a record leaves the window on the left (Figure 4). When the record leaves the window, the next window is 1ms higher than that record's timestamp. 



Figure 3: New window defined after C enters


Image Added

Figure 4: New window defined after A exits



Image AddedImage Removed

Compatibility, Deprecation, and Migration Plan

...