|
|
|
Re: [CEP-Interest] How would you solve this simple problem?
Here's my 2 cents based on first hand experience implementing natural language rule editing.
regarding A, the english has to be translated to logic first, before it is translated to a target rule language be it streamSql or some other EP language. Those who haven't written natural language translation often don't realize this, but it is crucial from my first hand experience.
regarding B, in some cases the perceived complexity is the result of the EP language. In other cases, it is because the logic is complex. Take the following logic example.
not (not (price < $100.00) )
in many expert systems and business rule engines, a nested negated expression inside a negated expression is the same as existential expression. In other words:
not (not (price < $100.00) ) == exist(price < $100.00)
this is just a simple
example. If we start to nest pattern within a negated or existential quantifier, the logic gets complex quickly. This is why I mentioned first order logic and logic programming in the previous responses. From my perspective, CEP is over-hyped in terms of what it promises to deliver and how it delivers it. Although some people would like to paint a rosy picture of simple queries, the reality is clearly different.
Take the following example statements.
if the price increases 50% or 30% above the industry, then send an event to the trader
if the price is over 100.00 and the country is US or GB, then send an event to the trader
In the first example, the or is a logical disjunction, which should be converted to 2 rules. The second example is a simple list.contains(value) test. From my experience building natural language rule editors, many users don't realize the difference. It's only after a lengthy explanation that users realize
one is a logical disjunction and the other isn't.
building a practical and usable english EP language requires a strong logical foundation. without that, it's just garbage in/garbage out. there are efforts in the rule space like constrained english, which attempt to provide a generic framework for translating english to formal logic. the best bet is to build a domain specific language to fit the use case and not a general purpose EP language. Some people have coined the term Business Domain Language BDL for this type of custom language.
hope that provides food for thought.
peter lin
--- On Mon, 1/5/09, Pedro Bizarro <pedro.bizarro@...> wrote:
From: Pedro Bizarro <pedro.bizarro@...> Subject: Re: [CEP-Interest] How would you solve this simple problem? To:
CEP-Interest@yahoogroups.com Date: Monday, January 5, 2009, 8:36 PM
Dear all,
Let me recast this question and address some of the comments and
answers. But first, thanks to all, it was an impressive set of
detailed answers.
Luis is working in our research group at the University of Coimbra and
we have talked about this and other similar questions. The issue is
not about whether this is CEP or not. [A more CEP-ish, similar query
is: what is the moving 5-min avg of X (e.g., temperature, stock value,
dice roll values)? - we argue that the answer is not as clear cut as
it seems.]
The issue is one of syntax and semantics. Regarding syntax, we expect
that simple English queries can be translated into simple CEP
expressions. What we noticed is that in a few cases, the semantics of
the engines are that simple English queries:
a) can be translated into simple CEP expressions but those expressions
do not return what we expected; or
b) to get the semantics we want, we are forced to write CEP
expressions significantly more complex then what we expected.
Regarding the state of the CEP field, my personal impression is that,
as also mentioned in one of the panels at the EPTS'08 Symposium, if
anything CEP is under-hyped. Several tech-savvy managers we have
talked with were unaware of CEP companies, products, and technology
even though they have systems were CEP engines could shine.
Also, this thread is not bad press for CEP. Ok, there is room for
improvement and some queries do not translate easily into CEP
expressions, but apart from those queries, we have been quite
impressed with the engines in terms of usability, integration, user
support, and performance. Some of the companies we give advice to have
been happily surprised too.
Regards,
Pedro
On Sun, Jan 4, 2009 at 00:04, pureza_l <pureza_l@yahoo. com> 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
>
>
> ------------ --------- --------- ------
>
> Yahoo! Groups Links
>
>
>
>
|
|
Peter Lin <woolfel@...>
woolfel
Offline Send Email
|
|
Expand Messages |
Author |
Sort by Date
|
|
|
Pedro Bizarro
p_bizarro
|
Jan 6, 2009 1:36 am |
|
|
David Tucker
flyguyd
|
Jan 6, 2009 3:01 am |
|
|
Jon Riecke
jon_riecke
|
Jan 8, 2009 4:04 am |
|
|
Opher Etzion
o_etzion
|
Jan 6, 2009 4:52 am |
|
|
Thomas Bernhardt
bernhardttom
|
Jan 6, 2009 12:38 pm |
|
|
isvana321
|
Jan 6, 2009 2:04 pm |
|
|
Luis Pureza
pureza_l
|
Jan 6, 2009 3:43 pm |
|
|
Tim Bass
tim_tibco
|
Jan 6, 2009 5:31 pm |
|
|
Brian Connell
cep_ws_bam
|
Jan 6, 2009 5:56 pm |
|
|
Peter Lin
woolfel
|
Jan 6, 2009 6:08 pm |
|
|
hansgilde
|
Jan 6, 2009 9:17 pm |
|
|
Peter Lin
woolfel
|
Jan 6, 2009 9:45 pm |
|
|
Brian Connell
cep_ws_bam
|
Jan 6, 2009 6:00 pm |
|
|
PatternStorm
claudi_p
|
Jan 7, 2009 1:22 am |
|
|
hansgilde
|
Jan 7, 2009 3:50 am |
|
|
Tim Bass
tim_tibco
|
Jan 7, 2009 5:53 pm |
|
|
Fatih Ildiz
fildiz57
|
Jan 7, 2009 6:10 pm |
|
|