Summary
Enhance the JDK networking API to support remote direct memory access (RDMA) using the rsocket protocol on Linux-based platforms.
Problem
For HPC and cloud applications, fully utilizing networking hardware capabilities to reach maximum bandwidth at low latency is challenging. Networking libraries inside the JDK currently use operating-system kernel sockets. Multiple memory copies between user and kernel spaces are involved during data transfers, which are expensive in both memory bandwidth and CPU cycles.
Solution
To improve this, we propose to add support for rsocket, a protocol over remote direct memory access (RDMA) that permits high-throughput, low-latency networking. For more details, please refer to JEP 337 .
Specification
A JDK-specific API is proposed as the rsocket feature is non-standard and only available on Linux platforms. Therefore, the proposal here is to add a JDK-specific API to the jdk.net
package of the jdk.net
module, which is where other JDK-specific networking features are already exposed. On platforms where rsocket is not supported, an UnsupportedOperationException
will be thrown by the factory methods.
A new class named jdk.net.RdmaSockets
will define factory methods to create RDMA-based TCP sockets and channels.
java.net.Socket openSocket(ProtocolFamily family)
java.net.ServerSocket openServerSocket(ProtocolFamily family)
java.nio.channels.SocketChannel openSocketChannel(ProtocolFamily family)
java.nio.channels.ServerSocketChannel openServerSocketChannel(ProtocolFamily family)
java.nio.channels.Selector openSelector()
A new class named jdk.net.RdmaSocketOptions
will define three RDMA related socket options.
public static final SocketOption<Integer> RDMA_SQSIZE
public static final SocketOption<Integer> RDMA_RQSIZE
public static final SocketOption<Integer> RDMA_INLINE
- csr of
-
JDK-8195160 Add support for rsockets
-
- Open
-
- relates to
-
JDK-8213217 Add protected constructor java.net.ServerSocket(SocketImpl)
-
- Closed
-