Database Reference
In-Depth Information
There you will see the old SQL-like approach (including the oldies but goodies GROUP
BY , ORDER BY , JOIN , and HAVING ) perfectly match the parallel processing of disparate
event streams that are enforced with the following CQL query clauses:
MATCH_RECOGNIZE
XSTREAM (and IStream , DStream , and RStream in relation to stream oper-
ators)
• Built-in window queries for stream-to-relation operations
• Also, surely, XMLTable operations on the Oracle XMLType data, using XPath
clauses that are similar to the EPL meta-code snippet shown previously
So, you have all the necessary means to fulfill core EDN tasks (collect, aggregate, correl-
ate, and analyze) using CQL for all types of data (by location: streams, and DB) and with
all types of relations (time-based or CorrId/CorrSet-based, or both); the
MATCH_RECOGNIZE clause is probably one of the most powerful options here. Frankly
speaking, this clause is not an exclusive invention of CQL; it's quite common for all EPL
types of languages. Look at Esper for instance; it has also superseded the old 10 g MODEL
clause in 12 c RDBMS, so you can use it in regular SQL statements as some form of case.
Tip
To avoid possible confusion, we have to give very short explanations here. Firstly, there is
no contradiction between EPL and CQL here; you will find them both in the Oracle EDN
documentation: http://docs.oracle.com/cd/E23943_01/dev.1111/e14301/toc.htm . Simply
put, EPL is the old-fashioned way of defining filtering, recognition, and so on. Rules (in
Chapter 5 , Maintaining the Core - the Service Repository , we advised to keep the struc-
ture and format in XML for better portability) and CQL are the modern query-based
workhouse, performing all of the heavy work or aggregation, correlation, and matching.
Both require a dedicated processor. Now what? Yes! You are right. The second figure in
this chapter with the decision-parsing tree is in fact pretty close to the branch and bound
method from discrete programming and combinatorial optimization. We cannot stress
enough how important it is for real-life event processing (in the e-commerce era, classic
problems such as MAX-SAT, TSP, and NNS were not just theoretical exercises; they were
means to generate money—even Oracle's EDN examples are mostly stock-related); under-
standing these subjects is highly desirable for efficient EDN implementation, but unfortu-
nately, this subject deserves a separate topic.
To be consistent, we would like to repeat the previously mentioned EPL meta-code snip-
pet using CQL and take into account some additional requirements we expressed earlier,
Search WWH ::




Custom Search