Hello all,
very interesting discussion clearly showing the limitations of
(timed) windows and data streaming/continuous queries approaches to
CEP. I am with Marc here.
For my part, raising the level of abstraction as suggested by Peter
and Hans I have uploaded version 1.1 of the file "What is State"
that now includes the problem that Luis states below as a toy "use
case" to show how one can take advantage of the appraoch of thinking
of state as sequences of events to write a platform-independent
constructive specification of the problem.
You can find discussion and more details of the approach state =
sequences of events here:
http://forum.complexevents.com/viewtopic.php?f=13&t=115
As always comments will be more than welcome!
Thank you very much!
Regards,
PatternStorm
--- In CEP-Interest@yahoogroups.com, "pureza_l" <pureza_l@...> wrote:
>
> Hi,
>
> I have the good old StockTrades stream with two fields: symbol and
> price. I'm trying to answer the following question "Were Company X
> stock actions priced above $70 during any moment of the last 5
minutes?".
>
> Unfortunately, using a simple time-based sliding window won't
work. To
> see why, imagine there were only two price updates: the first, at
> 10:54 am stated that stocks were at $71. The second, 2 minutes
later,
> notified that the stocks went down to $69. Now imagine that the
above
> question was posed at 11:00 am (of the same day). We, humans, know
> that the answer is "yes" because the price was $71 between 10:54
and
> 10:56. But the first event is outside the 5 minutes window and will
> thus be ignored by the system.
>
> How would you solve this?
>
> Thanks,
>
> Luís Pureza
>