Wednesday, 12 April 2017

Complex Event Processing Applications

Complex Event Processing Applications
Question 1:
What are some typical uses for complex event processing applications? Give examples and elaborate on the possibilities.
Answer:
Some typical uses for complex event processing are air traffic control, stock market trading, business process management and fraud detection.
In stock market a buyer may place an order depending on many factors like average price over last hour, total turnover for the particular symbol, etc. All these are events which can be processed using a CEP suite like Esper.
Esper can be used to analyze and react to events and make decisions
Question 3:
University of GloucestershireWhat is the difference between doing aggregated queries (AVG/SUM/MAX/ETC) in standard databases and stream databases?
Answer:
In standard databases we get a single result when we do aggregated queries but in stream databases we get new result for each event which is the aggregate till that point.
The insert stream in Esper is updated for each event. Also the remove stream is the aggregation value at the time the event leaves a data window.
Question 13:
What are pattern guards? Why cannot the timer:within pattern guard be used in simulated environments? What alternatives exist to control time and dates?
Answer:
Pattern guards are where-conditions that control the lifecycle of subexpressions. They limit the scope of the pattern to another quanity like time or condition.
timer:within pattern guard depends on actual latency between events but in simulated environments the events occur in quick succession and hence timer:within cannot be used.
We can use the WHERE clause of EPL to control time and date. Also WHILE and guard time interval expressions can be used.
For example:
every a=A -> b=B where timer:within (a.delta seconds)
Question 15:
What are variables in Esper and how can they be used to hold and change state? Give examples!
Answer:
A variable in Esper is an object, event or scalar value which is available for use in all statements including patterns after declaration. It can be used in patterns and other statements including output clauses. They have to be declared or configured before use by defining each variables type and name.
For example to create a variable we can use create variable syntax. Variables can be assigned new values by using the on set syntax via the setVariableValue methods on EPRuntime.
For example:
create [constant] variable variable_type variable_name;
where variable_type is one of string, char, character, bool, short, int, long, double, float among others.

No comments:

Post a Comment