4 About Multiserver Domains

Oracle Stream Analytics multiserver domains (clusters) are created with Oracle Coherence or Oracle Stream Analytics native technology. You add one or more servers to a multiserver domain that become logically and physically connected by User Datagram Protocol (UDP). All servers in an Oracle Stream Analytics multiserver domain are aware of all other servers in the domain and any one server can be the access point for changes to the deployments within the domain.

This chapter includes the following sections:

4.1 Multiserver Administration

You administer servers in a multiserver domain at the domain (infrastructure) level. You must configure every server in the domain with the same multicast address, multicast port number, and domain name to avoid configuration errors.

For example, Oracle Stream Analytics raises an error when you configure servers with the same multicast address and multicast port but with different domain names.

Every server in the domain detects failures, starts, and restarts by the other servers. You can deploy an application to one server and undeploy it from another server under the same domain.

4.1.1 Oracle Coherence

When you create a multiserver domain with Oracle Coherence, the domain receives replicated and distributed (partitioned) data management services on top of a reliable and highly scalable peer-to-peer clustering protocol. Oracle Coherence has no single points of failure, but instead transparently fails over and redistributes its clustered data management services when a server becomes inoperative or disconnected from the network. When you add a new server or restart a failed server, the server joins the cluster and Oracle Coherence transparently restores services and redistributes the cluster load.

Note:

To use Oracle Stream Analytics with Oracle Coherence, you must first obtain a valid Oracle Coherence license. See http://www.oracle.com/technetwork/middleware/coherence/overview/index.html.

4.1.2 Oracle Stream Analytics Native Clustering

When you create a multiserver domain with Oracle Stream Analytics native clustering, the domain receives a native clustering implementation based on TOTEM. However, with Oracle Stream Analytics native clustering, you cannot take advantage of Oracle Stream Analytics high availability quality of service options. See Multiserver Domains with Native Clustering.

4.2 Server Groups

A server group is a set of one or more servers with a unique name within the domain. In an Oracle Stream Analytics domain, an arbitrary number of server groups can exist with a configurable server group membership.

A server can be a member of more than one server group. Users are not aware of the underlying server groups because server groups serve as an administration tool that enables you to deploy and manage a multiserver domain at a finer level.

When you deploy applications to the default server group in a multiserver domain, they are deployed to all servers in the domain. All servers in the multiserver domain must have the same correct configuration resources that are required by the application

Oracle Stream Analytics provides the following predefined deployment server groups:

You can also create a custom deployment server group so that you can deploy applications to specific servers within a multiserver domain. See Custom Deployment Groups. If you plan to deploy an Oracle Stream Analytics high availability application and require scalability, you might need to configure an Oracle Stream Analytics high availability notification group. See Visualizing High Availability Configuration in Using Visualizer for Oracle Stream Analytics.

You create a server group by deciding on a name and using that name it in the groups element in the config.xml file for the servers you want to include in the server group.

4.2.1 Singleton Server Deployment Group

The singleton server deployment group consists of one local server only. The membership of this server group depends on the server from which it is accessed. You can use this server group to pin deployments to a single server.

For more information, see Multiserver Domains with Oracle Coherence.

4.2.2 Domain Deployment Group

The domain deployment group contains all live members of the domain. Its membership can only be changed by an administrator.

The domain name is determined by the Oracle Stream Analytics server config.xml file domain element. The default domain name is AllDomainMembers. In the following example, the default domain name is changed to myDomain in the config.xml file entry:

<domain>
     <name>myDomain</name>
</domain>

4.2.3 Custom Deployment Groups

There are cases where the application logic cannot be replicated across a homogenous set of servers in a multiserver domain. An example is an application that determines the best price provided by different pricing engines. Another example is an application that sends an alert when a position crosses a threshold. In either case, the application does not perform multiple operations, but instead calculates once or sends a single event, respectively. In other cases, the application has a singleton nature, such as monitoring an application, the HTTP pub-sub server, and so on.

A more complex example is a domain with two applications. The first application, strategies, uses several strategies to calculate different prices for a derivative and feeds the results to the selector application. The selector application selects the best price from the results sent to it by the strategies application.

The strategies application can be replicated to achieve fault-tolerance. However, the selector application must keep state so it can determine the best price. Because selector must maintain state, the selector application cannot be replicated across a homogenous set of servers.

If a domain must support servers that are not completely homogeneous, you can configure with custom deployment groups. Applications deployed to a custom deployment group in a multiserver domain are deployed homogeneously to all servers within the deployment group. All servers within the deployment group must have the appropriate configuration resources required by the application or applications.

For more information, see Multiserver Domains with Oracle Coherence.

4.3 Multiserver Notifications and Messaging

Oracle Stream Analytics provides a number of notification and messaging APIs for server groups and servers. You can use these APIs to configure a server to receive notification when its server group or domain membership changes. The change can be because an administrator changed it or because of a server failure. You can also use these APIs to send messages to individual server groups and to the domain.

When you configure your application to use Oracle Stream Analytics high availability options, the primary Oracle Stream Analytics server uses Oracle Coherence to communicate with its secondary servers to keep them up-to-date with the event processing progress of the primary server.

You can also configure Oracle Stream Analytics servers in a multiserver domain to communicate securely.

For more information, see:

4.4 Multiserver Domain Directory Structure

Servers in an Oracle Stream Analytics domain store their files in a single directory. By convention, the directories of the servers in a multiserver domain are subdirectories of the domain directory. Also, the name of the servers and domain correspond to the name of the server directories and domain directory, respectively.

This is by convention only, and not required, although Oracle recommends you set up your domains this way for simplicity and consistency. If the servers of the multiserver domain are located on different computers, you can replicate the directory structure on both computers, also for simplicity and consistency.

Figure 4-1 shows a multiserver domain directory with three servers.

Figure 4-1 Multiserver Domain Directory Structure

Description of Figure 4-1 follows
Description of "Figure 4-1 Multiserver Domain Directory Structure"

In Figure 4-1, the myServer1 configuration file snippet shows how the domain directory and domain object are configured with the same name, and the server directory and server name.

The domain directory is in the /Oracle/Middleware/my_oep/user_projects/domains directory, which is the default location for Oracle Stream Analytics domains.

4.5 Order of Cluster Element Child Elements

The order of cluster element child elements in the config.xml file is important. If you put elements in an incorrect order you can get an error.

The following list describes the order in which to list the child elements:

  • server-name

  • server-host-name: Specifies the host address/IP used for point-to-point HTTP multiserver communication. Default value is localhost.

    This element is mandatory if one or more Oracle Stream Analytics servers in your multiserver domain are on different hosts and you plan to manage the multiserver domain with Oracle Stream Analytics Visualizer. The element is also mandatory when a server is deployed on a host machine that has multiple IP addresses configured (whether in a multiserver or standalone-server environment).

  • multicast-address: The multicast communication address. For Oracle Coherence well-known addressing (WKA) a unicast address can be used.

  • multicast-port: Optional. Specifies the port to use for multicast traffic. Default value is 9001.

  • identity: Mandatory only for Oracle Stream Analytics native clustering. This element is not used for Oracle Coherence.

  • enabled

  • security

  • groups

  • operation-timeout: Optional. Specifies, in milliseconds, the time out for point-to-point HTTP multiserver requests. Default value is 30000.

4.6 High Availability and Multiserver Domains

If you use Oracle Coherence clustering for your multiserver domain, you can take advantage of Oracle Stream Analytics high availability quality of service options. These options are not supported by Oracle Stream Analytics native clustering.

4.7 Scalability and Multiserver Domains

With either Oracle Coherence or Oracle Stream Analytics native clustering, you can take advantage of Oracle Stream Analytics scalability quality of service options.