Implementation on Natural Tilted Time Window - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Implementation on Natural Tilted Time Window

Description:

Day in the first month. 8/26/09. Implementation on Tilted Time Window. 3 ... Queue for day: 31 items. Each queue has a tracking pointer to flag the last updated slot. ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 9
Provided by: jiaw186
Category:

less

Transcript and Presenter's Notes

Title: Implementation on Natural Tilted Time Window


1
Implementationon Natural Tilted Time Window
  • MAIDS group
  • NCSA and Dept. of CS
  • University of Illinois at Urbana-Champaign
  • www.maids.ncsa.uiuc.edu

2
Granularities in Titled Time Window
  • Vary in different applications
  • User definable
  • Assume we need four granularity levels
  • Minute in the first 15 minutes
  • Quarter in the first hour
  • Hour in the first 24 hours
  • Day in the first month

3
Data Structure for Implementation
  • Circular Queue - a bounded queue using an array.
  • Queue for minute 15 items
  • Queue for quarter 4 items
  • Queue for hour 24 items
  • Queue for day 31 items
  • Each queue has a tracking pointer to flag the
    last updated slot.
  • The Minute Queue has a timestamp to track the
    last update time.

4
Maintain a Tilted Time Window (1)
  • Data received at 805, count 3
  • Last update time 805
  • Minute Queue
  • Data received at 808, count 5
  • Since 808 805 3, reset the next 2
    slots of the tracking pointer to 0, advance the
    tracking pointer 3 slots, and insert the count 5.
  • Last update time 808
  • Minute Queue
  • Data received at 817, count 4
  • Since 817 808 9, advance the tracking
    pointer 9 slots. When the pointer reaches the end
    of the queue, the counts is summarized and
    propagated to the next granularity level. Last
    update time 817
  • Minute Queue
  • Quarter Queue

5
Maintain a Tilted Time Window (2)
  • Data received at 837, count 9
  • Since 837 817 20, advance the tracking
    pointer 20 slots. When the pointer reaches the
    end of the queue, summarize the counts and
    propagate to the next granularity level. Last
    update time 837
  • Minute Queue
  • Quarter Queue
  • Data received at 906, count 8
  • After data propagation, the tilted time window
    looks as
  • Minute Queue
  • Quarter Queue
  • Hour Queue

6
Algorithm for MaintainingTilted Time Windows
  • Lazy approach. The hours count is not
    summarized until new data comes in and the hour
    is passed.
  • The data propagation from a lower level to a
    higher level is triggered when the tracking
    pointer reaches the end of the queue.
  • In the lowest level Queue, the tracking pointer
    is to advance based on the difference between the
    current time and the last update time.
  • In all other Queues, the tracking pointer is
    always to advance one slot when the propagation
    happens from the lower level.

7
Retrieve Information fromTilted Time Windows (1)
  • Retrieve information on demand and/or on
    schedule.
  • Must do a last update on the tilted time window
    before retrieving information.
  • The closer is the time frame to the current, the
    more accurate is the information in the tilted
    time window.

8
Retrieve Information fromTilted Time Windows (2)
  • Example current time 927
  • Minute
  • Quarter
  • Hour
  • What is the count for the last 5 minutes?
    2135718
  • What is the count for 900 920? 81213217
  • What is the count for 830 900? 9615
  • What is the count for 800 900? 21
  • What is the count for 500 700? 6915
  • What is the count for 830 915? 896 23
  • What is the count for the last 14 minutes?
    Sum(Minute Queue)-242
Write a Comment
User Comments (0)
About PowerShow.com