Database Reference
In-Depth Information
Coherence and event processing
Now, we will approach a more complex realization that is related to CEP. So, we can move
the data object whenever and wherever we want to, and we can execute the methods,
thanks to the Coherence Processing pattern. However, being essentially a distributed cache,
Coherence is not really at its best when it comes to continuous aggregation, that is, accu-
mulating and filtering data for an extended period of time. It will be quite right to call Co-
herence processing stateless, and that's logical as it will be quite difficult to replicate and
partition stateful object/processing nodes. Yes, Coherence has EntityAggregators ,
which is built-in and customizable, but their main purpose is to reduce the number of entit-
ies in the cache, combining and aggregating the identical ones (by their attributes) in order
to reduce the cache size and provide the result. Aggregators are constantly updating entit-
ies, but not in a time-based aggregation manner. Also, we must keep in mind the limited
ways of accessing distributed cache, that is, we do not have adapters in the common sense;
that's not the purpose of Coherence.
Event Processing at the same time is very good for time-based continuous aggregation of
different streams; aggregations can be incrementally evaluated and grouped by values. We
have quite an efficient adapter framework with abilities to implement custom adapters
within adapter factories. The downside of the Oracle EDN is that we have no way to make
our continuous aggregation parallel. Something that is going on in an isolated JVM for
quite some time cannot be really replicated unless we perform the same operations exactly
in another JVM. Operations are highly stateful. If we fail, we will have to start all over
again, and all the previous results are wasted (if we are processing using CEP alone).
The natural approach here would be the combining benefits of both products in one form of
MapReduce patterns (read http://www.cs.stanford.edu/people/ang//papers/
nips06-mapreducemulticore.pdf and http://highlyscalable.wordpress.com/2012/02/01/
mapreduce-patterns/ ; these articles are really good), where roles will be distributed as fol-
lows:
• Coherence (Map):
◦ Entity aggregation using key affinity/no-entity duplicates
◦ Entity indexing
◦ Maintaining the highest resilience through Partitioning and backup
◦ Supporting partition transactions and preparing results for the final aggreg-
ation
◦ A handy publishing mechanism
• Oracle Event Processing (Reduce):
Search WWH ::




Custom Search