This discussion is archived
6 Replies Latest reply: Jul 17, 2012 12:04 AM by 877753 RSS

CEP - General Questions

user329142 - oracle Newbie
Currently Being Moderated
Hi,

we are working on CEP implementation in a Bank. One of the requeriments is of course the correlation of the events. The max time between two correlated events can be 50 days max, then the event dies. The volume of the event per day is about 15:000 and about 20% have to be correlated. The question is are:

-- make sense use cache (coherence) in order to mantain the events for 50 days?
-- when use range in CQL? what max time razonable in order use range clausole (second, hours or days)?

Thanks
  • 1. Re: CEP - General Questions
    Junger He Explorer
    Currently Being Moderated
    Yes, the best way is use a coherence cache that utilizes DB store to cache the events in the past 50 days.
    Thus you don't need to worry about using 1000 hour or 50 day. A sample query would be:

    select * from CreditStream[now] as a, CreditCache as b where a.creditNo = b.creditNo;

    For the CreditCache, you need to configure it to listen to the input event and keep the data in 50 days. The EPN would be like:

    Adapter -> CreditCache
    ->CreditStream -> Processor -> OuputStream -> UserBean
  • 2. Re: CEP - General Questions
    Junger He Explorer
    Currently Being Moderated
    Because of the format in the wiki. I rewrote the EPN

    Cache as a listener to the input adapter
    Adapter -> CreditCache

    Cache as a source for the processor
    <wlevs:processor id="processor">
    <wlevs:cache-table ref="creditCache"/>
    </wlevs:processor>

    Event Processing Path
    Adapter -> CreditStream -> Processor -> OutputStream -> UserBean
  • 3. Re: CEP - General Questions
    user329142 - oracle Newbie
    Currently Being Moderated
    Thanks Junger He,


    about use clause RANGE in CQL,what is the optimus values of the time (seconds, hours or days)?

    Thanks in advance.
  • 4. Re: CEP - General Questions
    877753 Newbie
    Currently Being Moderated
    we can use any unit for range window, and for your case range window on 50 days should work fine if the event size is not very big.
    select * from s[range 50 days]

    Regards
    Patha
  • 5. Re: CEP - General Questions
    user329142 - oracle Newbie
    Currently Being Moderated
    Thanks Patha,

    Let me explain our situation. We are working with follow stacks:
    •     Oracle CEP 11gR1 (11.1.1.6.0)
    •     S.O.: SUN Solaris
    •     JVM: Oracle JRockit 6 - R28.2.3 for Solaris
    We are receiving the events associates to sell credit process in a Bank. Actually there three system that are sending events and these systems are using also for other scopes sending events that are not related with the sell credit process.
    In CEP we are receiving the events via JMS and in order to handle the correlation we are using “select * from s[range 50 days]” statement . The problem that after 45 / 50 HHS the system crash because out of memory.
    Using mission control of jrockit, we see that every time that the CEP use the statement “select * from s[range 50 days]” the heap decrease because the class oracle.cep.dataStructures.internal.memory.CharAttrVal is allocate and this instance live for 50 days (the garbage collector cannot free the memory). Monitoring the platform we see that the occupation of heap grow very fast due oracle.cep.dataStructures.internal.memory.CharAttrVal allocation and this instance is related with “select * from s[range 50 days]” statement.

    We did also a test using “select * from s[NOW]” and the memory work find.

    One solution could be use the Coherence in order to “persist” the event. What do you think? Is correct that the memory heap grow so fast?

    Thanks in advance
  • 6. Re: CEP - General Questions
    877753 Newbie
    Currently Being Moderated
    Hi,
    Well the out of memory (OOM) was expected since your event type seems big. If we use range window, all the events will be stored in the heap, so we get OOM exception once the heap is full, for channel[now] it just deals with the latest event so no need of storing all the events so it works fine with the memory. I guess if you increase the max size of heap in jvm it may help for 3-4 days more but 50 days is very big range.
    Using coherence cache sounds like a good workaround but it will be very slow since we have to store all the events onto disk (else we get same OOM exception for normal cache config which uses main memory).

    Thanks
    Patha

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points