Primary Oracle CEP High Availability Use Case

Understanding High Availability 20-17 For example, avoid creating an EPN in which multiple threads send events to an Oracle CEP high availability adapter in parallel. If such a channel is an event source for an Oracle CEP high availability adapter, it would cause events to be sent to the adapter in parallel by different threads and could make the event order nondeterministic. For more information on channel configuration to avoid, see: ■ Section 22.2.1, EventPartitioner ■ max-threads in Table C–9, Attributes of the wlevs:channel Application Assembly Element

20.3.2.8.3 Prefer Monotonic Event Identifiers Event identifiers may be monotonic or

nonmontonic. A monotonic identifier is one that increases continually such as a time value. A nonmonotonic identifier does not increase continually and may contain duplicates. In general, you should design your Oracle CEP application using monotonic event identifiers. Using a monotonic event identifier, the Oracle CEP high availability adapter can handle an application that may produce events out of order.

20.3.2.9 Write Oracle CQL Queries with High Availability in Mind

Not all Oracle CQL query usage is supported when using Oracle CEP high availability. You may need to redefine your Oracle CQL queries to address these restrictions. For more information, see Section 20.3.3, Oracle CQL Query Restrictions .

20.3.2.10 Avoid Coupling Servers

The most performant high availability for Oracle CEP systems is when servers can run without requiring coordination between them. Generally this can be achieved if there is no shared state and the downstream system can tolerate duplicates. Increasing levels of high availability are targeted at increasing the fidelity of the stream of events that the downstream system sees, but this increasing fidelity comes with a performance penalty.

20.3.2.11 Plan for Server Recovery

When a secondary server rejoins the multi-server domain, the server must have time to rebuild the Oracle CEP application state to match that of the current primary and active secondaries as Section 20.3.2.5, Choose an Adequate warm-up-window Time describes. The time it takes for a secondary server to become available as an active secondary after rejoining the multi-server domain will be a factor in the number of active secondaries you require. If a secondary is declared to be the new primary before it is ready, the secondary will throw an exception.

20.3.3 Oracle CQL Query Restrictions

When writing Oracle CQL queries in an Oracle CEP application that uses Oracle CEP high availability options, observe the following restrictions: ■ Section 20.3.3.1, Range-Based Windows ■ Section 20.3.3.2, Tuple-Based Windows 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