Use Oracle CEP High Availability Components at All Ingress and Egress Points

20-18 Oracle Complex Event Processing Developers Guide ■ Section 20.3.3.3, Partitioned Windows ■ Section 20.3.3.4, Sliding Windows ■ Section 20.3.3.5, DURATION Clause and Non-Event Detection ■ Section 20.3.3.6, Prefer Application Time For more information on Oracle CQL, see the Oracle Complex Event Processing CQL Language Reference.

20.3.3.1 Range-Based Windows

In a Type 1 application where the application must generate exactly the same sequence of output events as existing secondaries, all range-based Oracle CQL windows must be shorter than the warm-up-window time. See also Section 20.3.2.5, Choose an Adequate warm-up-window Time . Channels must use application time if Oracle CQL queries contain range-based Windows. See also Section 20.3.3.6, Prefer Application Time . For more information, see Range-Based Stream-to-Relation Window Operators in the Oracle Complex Event Processing CQL Language Reference.

20.3.3.2 Tuple-Based Windows

In a Type 1 application where the application must generate exactly the same sequence of output events as existing secondaries, all tuple-based windows must also be qualified by time. See also Section 20.3.2.5, Choose an Adequate warm-up-window Time . For more information, see Tuple-Based Stream-to-Relation Window Operators in the Oracle Complex Event Processing CQL Language Reference.

20.3.3.3 Partitioned Windows

Consider avoiding partitioned windows: there are cases where a partition cannot be rebuilt. If using partitioned windows, configure a warm-up-window time long enough to give the Oracle CEP server time to rebuild the partition. See also Section 20.3.2.5, Choose an Adequate warm-up-window Time . For more information, see Partitioned Stream-to-Relation Window Operators in the Oracle Complex Event Processing CQL Language Reference.

20.3.3.4 Sliding Windows

Oracle CQL queries should not use sliding windows if new nodes that join the multi-server domain are expected to generate exactly the same output events as existing nodes. For more information, see: ■ Section 20.1.1.3, Rejoining the High Availability Multi-Server Domain ■ S[range T1 slide T2] in the Oracle Complex Event Processing CQL Language Reference ■ S [rows N1 slide N2] in the Oracle Complex Event Processing CQL Language Reference ■ S [partition by A1,..., Ak rows N range T1 slide T2] in the Oracle Complex Event Processing CQL Language Reference Understanding High Availability 20-19

20.3.3.5 DURATION Clause and Non-Event Detection

You must use application time if Oracle CQL queries contain a DURATION clause for non-event detection. For more information, see: ■ Section 20.3.3.6, Prefer Application Time ■ DURATION Clause in the Oracle Complex Event Processing CQL Language Reference

20.3.3.6 Prefer Application Time

In Oracle CEP each event is associated with a point in time at which the event occurred. Oracle CQL recognizes two types of time: ■ Application time: a time value assigned to each event outside of Oracle CQL by the application before the event enters the Oracle CQL processor. ■ System time: a time value associated with an event when it arrives at the Oracle CQL processor, essentially by calling System.nanoTime. Application time is generally the best approach for applications that need to be highly available. The application time is associated with an event before the event is sent to Oracle CEP, so it is consistent across active primary and secondary instances. System time, on the other hand, can cause application instances to generate different results since the time value associated with an event can be different on each instance due to system clocks not being synchronized. You can use system time for applications whose Oracle CQL queries do not use time-based windows. Applications that use only event-based windows depend only on the arrival order of events rather than the arrival time, so you may use system time in this case. If you must use system time with Oracle CQL queries that do use time-based windows, then you must use a special Oracle CEP high availability input adapter that intercepts incoming events and assigns a consistent time that spans primary and secondary instances.