To enable Java™ sockets over Remote Direct Memory
Access (JSOR) communication, you must first ensure that the native application is using the RSockets
protocol. The RSockets protocol can be used by preloading the native RSockets preloading library or
by using RSockets APIs to write the native application.
Support
for NIO channel applications is added in this update.
About this task
Note: 
The RDMA implementation, which was
previously deprecated is removed from IBM® SDK, Java Technology Edition, Version 8.

There are two methods for enabling JSOR communications between a Java application and a native application. You must select the correct system
property for your application. For example, plain stream socket applications
(com.ibm.net.rdma.conf) or NIO channel applications
(com.ibm.nio.rdma.conf).
Procedure
- Follow these steps if you want to communicate by preloading the native RSockets
preloading library:
- If you are connecting a JSOR client with a native server, type the following
command-line
invocation:
java -Dcom.ibm.net.rdma.conf=<client.conf> -cp <classpath> SampleClient <client_args>
LD_PRELOAD=/usr/lib/rsocket/librspreload.so ./SampleServer <server_args>
Or:
java -Dcom.ibm.nio.rdma.conf=<client.conf> -cp <classpath> NIOClient <client_args>
LD_PRELOAD=/usr/lib/rsocket/librspreload.so ./NIOServer <server_args>
Where:
- client.conf is your client RDMA configuration file.
- classpath specifies the class path.
- client_args are the client application-specific command-line options.
- server_args are the native application-specific command-line options.
- If you are connecting a JSOR server with a native client, type the following
command-line
invocation:
java -Dcom.ibm.net.rdma.conf=<server.conf> -cp <classpath> SampleServer <server_args>
LD_PRELOAD=/usr/lib/rsocket/librspreload.so ./SampleClient <client_args>
Or:
java -Dcom.ibm.nio.rdma.conf=<server.conf> -cp <classpath> NIOServer <server_args>
LD_PRELOAD=/usr/lib/rsocket/librspreload.so ./NIOClient <client_args>
Where:
- server.conf is your server RDMA configuration file.
- classpath specifies the class path.
- server_args are the server application-specific command-line options.
- client_args are the native application-specific command-line options.
- Follow these steps if your native application is written to use the RSockets APIs to
communicate with a JSOR client or server application:
- If you are connecting a JSOR client with a native server that is written to use the
RSockets APIs, type the following command-line
invocation:
java -Dcom.ibm.net.rdma.conf=<client.conf> -cp <classpath> SampleClient <client_args>
cc -o SampleServer -lrdmacm
./SampleServer <server_args>
Or:
java -Dcom.ibm.nio.rdma.conf=<client.conf> -cp <classpath> NIOClient <client_args>
cc -o NIOServer -lrdmacm
./NIOServer <server_args>
Where:
- client.conf is your client RDMA configuration file.
- classpath specifies the class path.
- client_args are the client application-specific command-line options.
- server_args are the native application-specific command-line options.
- If you are connecting a JSOR server with a native client that is written to use the
RSockets APIs, type the following command-line
invocation:
java -Dcom.ibm.net.rdma.conf=<server.conf> -cp <classpath> SampleServer <server_args>
cc -o SampleClient -lrdmacm
./SampleClient <client_args>
Or:
java -Dcom.ibm.nio.rdma.conf=<server.conf> -cp <classpath> NIOServer <server_args>
cc -o NIOClient -lrdmacm
./NIOClient <client_args>
Where:
- server.conf is your server RDMA configuration file.
- classpath specifies the class path.
- server_args are the server application-specific command-line options.
- client_args are the native application-specific command-line options.
Results
Regular TCP/IP socket calls are intercepted and replaced by the equivalent RDMA socket calls for
talking to remote applications through the RDMA path.