Search the web
Sign In
New User? Sign Up
CEP-Interest · Event Processing Technologies
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How would you solve this simple problem?   Message List  
Reply | Forward Message #1953 of 2144 |
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




Sun Jan 4, 2009 12:04 am

pureza_l
Offline Offline
Send Email Send Email

Forward
Message #1953 of 2144 |
Expand Messages Author Sort by Date

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...
pureza_l
Offline Send Email
Jan 4, 2009
12:04 am

In Oracle model, this is one of the reasons why we don't mix application time & wall clock time. The model is based on application time (unless explicitly...
Shailendra Mishra
shailendra_m...
Online Now Send Email
Jan 4, 2009
4:08 am

Correct me if I'm wrong here, but I believe the issue to be that 1ms prior to when the second trade was made the price was in fact $71 post trade it was $69...
David Tucker
flyguyd
Offline Send Email
Jan 4, 2009
8:23 am

Yes, that is the issue. Luís Pureza ... prior to when the second trade was made the price was in fact $71 post trade it was $69 event though the last every...
pureza_l
Offline Send Email
Jan 4, 2009
11:36 am

Be warned. I'm about to go off on a philosophical tangent. I disagree with the "we, humans, know" interpretation. The last trade may have been at $71, but I...
Seth Grimes
sethgrimes
Offline Send Email
Jan 4, 2009
1:04 pm

Seth, I really meant stock prices, but I admit the inner workings of the financial market is not really my specialty and that could cause some confusion. For...
Luis Pureza
pureza_l
Offline Send Email
Jan 4, 2009
3:03 pm

Shailendra, Thanks for your reply. What if the first event came at 10:50 instead? Luís Pureza...
pureza_l
Offline Send Email
Jan 4, 2009
11:35 am

Hi Luis: Sorry I misunderstood the problem. Anand Srinivasan from my group has proposed a solution to the problem using the Oracle CQL language. Here it is: ...
Shailendra Mishra
shailendra_m...
Online Now Send Email
Jan 4, 2009
7:38 pm

How about basing the window on number of entries rather than time? ... minutes?"....
anilkuppa
Offline Send Email
Jan 4, 2009
9:07 am

Well, I guess I could find out how many events happened during the last 5 minutes and then create a fixed window of size N + 1 (to contain the newest event...
pureza_l
Offline Send Email
Jan 4, 2009
11:40 am

Hi Luis. The main issue with your example is that you are asking a temporal query not on the events but on the state created by the events (where event is a ...
Opher Etzion
o_etzion
Offline Send Email
Jan 4, 2009
10:18 am

(sorry for the spam!) Opher, Interesting post. However those examples seem to be quite challenging, while my problem is very simple :-) Luís Pureza ... event...
pureza_l
Offline Send Email
Jan 4, 2009
12:00 pm

Hi Luis. Your problem seems simple, but it is not really that simple, the query: Were Company X stock actions priced above $70 during any moment of the last...
Opher Etzion
o_etzion
Offline Send Email
Jan 4, 2009
12:17 pm

I second Opher's comment. Although the sample "appears" simple, the logic behind it isn't. Things that humans "believe" to be simple are complex and require a...
Peter Lin
woolfel
Offline Send Email
Jan 4, 2009
3:34 pm

Since the question is posed at 11:00am and the question result is expected to be aware of the events that arrived before 11:00am, the solution seems to require...
Thomas Bernhardt
bernhardttom
Offline Send Email
Jan 4, 2009
12:40 pm

wouldn't it be better to simply support existential and negated patterns? it feels rather cumbersome to do all that when an existential pattern would be more...
Peter Lin
woolfel
Offline Send Email
Jan 4, 2009
3:27 pm

Peter, I guess that this really depends on the requirements. If you would like to, at any arbitrary time, place this query at an arbitrary price - then the...
hansgilde
Offline Send Email
Jan 5, 2009
4:49 pm

Ah, Tom beat me to it with the tick-containing-the-previous-tick approach. The queryable window approach is probably the most flexible, but is a red flag for...
hansgilde
Offline Send Email
Jan 5, 2009
4:01 pm

I like this problem. First, it's dead simple to solve in many programming languages. Second, it points out deficiencies in the concept of windows in many CEP...
Jon Riecke
jon_riecke
Offline Send Email
Jan 4, 2009
4:43 pm

To me this sounds like using CEP is the wrong tool - For this particular problem... What you describe feels more like a database query. When you have a problem...
"Marco Seiriö @ ru...
marco_seirio
Offline Send Email
Jan 5, 2009
4:10 pm

Marco, I agree - the question sounds very like an "ad-hoc" query, better suited to a database query (based on the assumption that the set of events required ...
Brian Connell
cep_ws_bam
Offline Send Email
Jan 5, 2009
4:35 pm

I disagree. Maybe this is not event processing (I think it is), but a database would be unsuitable in the presence of stricter real-time requirements. For...
Luis Pureza
pureza_l
Offline Send Email
Jan 5, 2009
5:01 pm

And I too was answering the question that was asked. The question, as asked, is an ad-hoc query and therefore requires a set of event data respondant to a...
Brian Connell
cep_ws_bam
Offline Send Email
Jan 5, 2009
5:04 pm

Some more random thoughts for what it's worth. the issue I see with defining 2 time windows is the system could end up doing more work than necessary. The kind...
Peter Lin
woolfel
Offline Send Email
Jan 5, 2009
5:28 pm

I don't think it is accurate to argue that an ad-hoc query is best suited to a database or is not event processing. This entirely depends on the context and on...
Alexandre Vasseur
alexandre_va...
Offline Send Email
Jan 5, 2009
5:15 pm

Hi Alex, I agree it is a very powerful concept. I disagree that it is event processing. Vendors are free to extend their products in any direction they like...
Brian Connell
cep_ws_bam
Offline Send Email
Jan 5, 2009
5:55 pm

Hi Marco, This is a question of whether a database can get the required performance. Although fast hardware and optimized DB engines do a much better job than...
hansgilde
Offline Send Email
Jan 5, 2009
4:40 pm

Hans, Not knowing much about streaming SQL systems :-), but most of the answers I've seen effectively set up a query (in advance) by creating a window of 5 ...
Brian Connell
cep_ws_bam
Offline Send Email
Jan 5, 2009
4:50 pm

Brian, come on... you know what was being asked. :) "Sorry, although we know what you're trying to do, we won't answer your question in this forum because you...
hansgilde
Offline Send Email
Jan 5, 2009
5:17 pm
First  | < Prev  |  Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help