Download Developing Applications for Event Processing with Oracle Stream
Transcript
Design Applications for High Availability 17.8.3 Oracle CQL Query Restrictions In a high availability application, Oracle CQL queries have the following restrictions. For more information about Oracle CQL and the topics covered in this section, see Oracle CQL Language Reference for Oracle Stream Explorer. 17.8.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-length time. See Choose an Adequate warmup-window-length Time. Channels must use application time when Oracle CQL queries contain range-based Windows. See Prefer Application Time . 17.8.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 be qualified by time. See Choose an Adequate warm-up-window-length Time. 17.8.3.3 Partitioned Windows Avoid partitioned windows because there are situations in which a partition cannot be rebuilt. If you do use partitioned windows, configure a warm-up-window-length time long enough to give the Oracle Stream Explorer server time to rebuild the partition. See Choose an Adequate warm-up-window-length Time. 17.8.3.4 Sliding Windows Oracle CQL queries should not use sliding windows when new stages that join the multiserver domain are expected to generate exactly the same output events as existing stages. See Rejoining the High Availability MultiServer Domain. 17.8.3.5 DURATION Clause and Non-Event Detection You must use application time when Oracle CQL queries contain a DURATION clause for non-event detection. See Prefer Application Time . 17.8.3.6 Prefer Application Time In Oracle Stream Explorer 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 downstream, so it is consistent across active primary and secondary servers. System time can cause application instances to generate different results because the time value associated with an event can be different on each server due to system clocks not being synchronized. You can use system time for applications when Oracle CQL queries do not use time-based windows. Applications that use only event-based 17-18 Developing Applications for Event Processing with Oracle Stream Explorer