The jVerbs library (Linux only)

The jVerbs library contains a verbs API and an endpoint API that enable the development of Java™ applications that use high performance networking infrastructures, such as InfiniBand, iWARP, or RoCE. The verbs interface is an alternative networking API to the sockets interface. The verbs interface provides send and receive communications, and the endpoint interface is a simplified API that provides an abstraction of a jVerbs endpoint.

Note: The RDMA implementation is deprecated and will likely be removed in a future release of IBM® SDK, Java Technology Edition, Version 8. A possible alternative is the open source Libfabric library.

jVerbs is implemented as a Java library that is based on the Open Fabrics Enterprise Distribution (OFED) RDMA user libraries. jVerbs uses a thin JNI layer to bridge between Java code and the OFED user libraries. To avoid any performance impacts that are associated with passing complex RDMA parameters and arrays through the JNI interface, the jVerbs library implements a concept called stateful verbs method (SVM). With this approach, each JNI serialization state for a verb call is cached in the context of an SVM object and can be reused many times.

The following diagram illustrates the high-level design for implementing RDMA communications by using the jVerbs library.
The diagram illustrates a running Java application, which requires the JVM and either the jVerbs verbs interface or jVerbs endpoint interface to communicate with an RDMA adapter. Two different paths are used for communicating between these interfaces and the RDMA adapter: the fast data path and the slow control path.
The slow control path is used for RDMA operations such as registering memory and creating queue pairs for communications. The fast data path is used for the transfer of data.

verbs API

The purpose of the verbs interface is to separate data and control. By pre-allocating communication resources, such as pinning memory for Direct Memory Access (DMA), data is transferred without involving the operating system or the JVM. This principle improves the performance of data transfer operations, a key factor in achieving low latency and high bandwidth over RDMA-capable network infrastructures.

The verbs interface provides APIs for the following functions:
RDMA send and receive types of communication
RDMA send and receive communications are two-sided operations. The sender sends a message, while the receiver creates an application buffer and indicates where to receive the data. This mechanism is similar to traditional TCP socket-based communications.
RDMA operations
RDMA operations are one-sided operations in which only one peer reads, writes, or manipulates remote application buffers.
For all functions, data transfer is efficient because the network hardware accesses the data buffers directly by using DMA. Application data buffers must be registered with the RDMA subsystem by using specific verbs API calls. As a consequence, the RDMA subsystem ensures that the memory is pinned and cannot be swapped out.

endpoint API

The endpoint interface is simpler than the verbs interface. You can create an endpoint and a connection in a similar way to TCP socket communications, by using bind, connect, and disconnect operations. However, when an endpoint is connected it represents a simple RDMA queue pair, which can be used to post one-sided or two-sided operations.

For more information about programming with these APIs, see Writing Java applications that use the jVerbs library (Linux only).