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.
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 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.
- 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.
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).