Broadcast Output Adapter EPN Assembly File Configuration

22 Understanding Scalability 22-1 22 Understanding Scalability This chapter describes Oracle CEP components and design patterns that you can use to allow your Oracle CEP application to scale with an increasing event load, including: ■ Section 22.1, Scalability Options ■ Section 22.2, Scalability Components For more information on how to implement a particular scalability option, see Chapter 23, Configuring Scalability .

22.1 Scalability Options

Oracle CEP provides options that you can use to allow your Oracle CEP application to scale with an increasing event load. In general, you can design your application to partition an input event stream and process events in parallel at the point of event ingress, within the Event Processing Network EPN, or both. You should plan to use scalability and parallel processing as early in the event processing sequence as possible. For example, parallel process high-volume, low-value events to extract the typically low-volume, high-value events your application depends on. Oracle CEP provides a variety of scalability components you can use as Section 22.2, Scalability Components describes.

22.1.1 Scalability and High Availability

Because scalability often involves deploying an application to multiple servers, it is advantageous to also consider high availability options when designing your Oracle CEP application for scalability. Input stream partitioning and parallel processing impose important restrictions on application design, such as preserving event order and carefully managing the use of multi-threading. For more information on high availability options, see: ■ Section 20.1, High Availability Architecture ■ Section 20.3, Designing an Oracle CEP Application for High Availability 22-2 Oracle Complex Event Processing Developers Guide

22.2 Scalability Components

Oracle CEP provides the following components that you can use to improve the scalability of your Oracle CEP applications: ■ Section 22.2.1, EventPartitioner ■ Section 22.2.2, ActiveActiveGroupBean

22.2.1 EventPartitioner

A com.bea.wlevs.channel.EventPartitioner provides a mechanism for partitioning events on a channel across its output event sinks as Figure 22–1 shows. Figure 22–1 Event Partitioner EPN This section describes: ■ Section 22.2.1.1, EventPartitioner Implementation ■ Section 22.2.1.2, EventPartitioner Load Balancing ■ Section 22.2.1.3, EventPartitioner Initialization ■ Section 22.2.1.4, EventPartitioner Threading ■ Section 22.2.1.5, EventPartitioner Restrictions For more information, see Section 23.1, Configuring Scalability With a Channel EventPartitioner .

22.2.1.1 EventPartitioner Implementation

Oracle CEP provides a default event property-based EventPartitioner that you can configure a channel to use. When you configure a channel to use the default EventPartitioner, you specify the name of an event property by which the channel partitions events. The default EventPartitioner calculates a hash key using the event property value’s Object.hashCode as input to an internal hash function. The hashkey number-of-listeners is used to calculate which listener will receive the event. This algorithm is based on the same algorithm used by HashMap to calculate in which bucket to place a new item. In practice, this means events with the same event property value are sent to the same listener. Note: The default event property-based EventPartitioner does not dispatch in Round Robin fashion.