K Improving Endpoint Scalability by Using NIO

This appendix discusses how linear scalability of a large number of endpoints can be achieved by using the Java New I/O (NIO) API.

This appendix contains the following sections:

K.1 Why Do I Use NIO?

Using the old Java IO APIs, issues regarding thread management made it impossible to scale a server to thousands of users. The Java New IO (NIO) framework has been designed to help you to take advantage of the Java NIO APIs in building scalable and robust servers.

Using the Java-based socket implementation to manage endpoints with the old IO system causes scalability problems for Oracle SOA Suite for healthcare integration. To overcome this issue, Oracle SOA Suite for healthcare integration uses the NIO-based transport implementation. The NIO framework provides an abstract, event-driven, asynchronous API over various transports such as TCP/IP and UDP/IP.

Note:

NIO is not supported in the cases of Negative ACK and Generic TCP is supported.

K.2 How Do I Use the NIO Framework?

Oracle SOA Suite for healthcare integration uses the NIO support to exchange MLLP messages to improve latency, improve scalability, maximize throughput, and maximize performance.

Oracle SOA Suite for healthcare integration uses NIO features seamlessly with the current architecture without affecting existing socket-based IO implementation.To switch to NIO-based transport, you must:

Set the b2b.nio server property to true in the Oracle Fusion Middleware Enterprise Manager Control console.

Note:

You must restart the server for the property to take effect.

If this property is not set, the default behavior is to use the existing socket-based transport.

Note:

Both transport implementation, which are socket IO and the NIO implementation, cannot work together during runtime. This means that you cannot use the NIO-based transport for one endpoint and the socket-based IO transport for another endpoint.

The NIO-based framework provides the following support for MLLP 1.0 based message exchanges:

  • Server and client type socket

  • Synchronous and Asynchronous modes of communication

  • Transient and permanent connection

  • Retry and Timeout policy for message exchange

  • Endpoint creation

  • Endpoint enabling and disabling

  • Endpoint updation

Note:

Using the NIO framework, enabling or disabling 1000 endpoints from the dashboard takes time. It is recommended that you try this feature with a maximum of 100 endpoints at a time.

K.3 Specifying Worker Pool and Selector Pool Size

The NIO framework uses its own thread pool defaults as per the Worker thread pool model. However, Oracle SOA Suite for healthcare integration enables you to specify the Worker thread pool size.

To specify the Worker pool size, set the following properties in the Oracle Fusion Middleware Enterprise Manager Control console:

b2b.nio.minWorkerPoolSize = n (default is 3)

b2b.nio.maxWorkerPoolSize = n (default is 5)

Where n is the thread pool size.

Oracle SOA Suite for healthcare integration runtime automatically sets the Selector count value equal to the number of available cores of the CPU of the server. To configure minimum and maximum values of the Selector pool size, set the following properties in the Oracle Fusion Middleware Enterprise Manager Control console:

  • b2b.nio.minSelectorPoolSize

  • b2b.nio.maxSelectorPoolSize

Note:

You must restart the server for the property to take effect.

K.4 Support for MLLP 1.0 Transport Protocol

The NIO framework provides support for the MLLP 1.0 transport protocol currently.

It provides support for:

  • Support for Immediate acknowledgement

  • Support for Discard acknowledgement

  • Support for Persist acknowledgement

  • Identify TP by Delivery Channel.

  • Sequencing Mode:

    • None

    • OnetoOne

    • OnetoOneMapping

  • Interface sequencing

  • SSL/TLS