ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Question regarding possible use case of Sliding Windows
Date Thu, 18 Jun 2015 18:04:31 GMT
Anthony,

Is the 2-minute window is a sliding window as well, or you just want to
split 10-minute window into five intervals and compare number of requests in
each interval?

For the first use case I would do the following:
1. Create a cache with 2-minute eviction policy and stream requests data to
this cache.
2. Periodically (or on each update) get the size of this cache, which is
actually number of the requests in the last two minutes.
3. Save results from step 2 along with corresponding timestamps to another
cache with 10-minute eviction policy.

This way you can query the second cache at any moment to answer your
question.

For the second use case (simple split), you can have only one cache with
10-minute eviction policy and execute an SQL query with proper grouping and
aggregation.

Which one are you trying to implement?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Question-regarding-possible-use-case-of-Sliding-Windows-tp530p534.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message