Freewind
Freewind

Reputation: 198188

How to use DMA or RDMA in java?

"DMA" here means: Direct memory access, and "RDMA" is: remote direct memory access.

I used Java to created an application to transfer stock data, but I found the latency is bigger than I expected. I heard someone developed same type application used "DMA/RDMA", which has good performance, so I wonder if I can use "DMA/RDMA" in Java?

If not, what language should I use, and if there are any good libraries to use?

Upvotes: 9

Views: 9155

Answers (6)

pstuedi
pstuedi

Reputation: 151

There is DiSNI, a new library to program RDMA in Java. DiSNI is the open source variant of IBM's jVerbs. There are some performance numbers here that illustrate how RDMA with Java compares to sockets in C and Java, and also to RDMA in C.

Upvotes: 2

JC1
JC1

Reputation: 686

You have two options (that I know of):

  1. Java SDP -- has been deprecated
  2. JXIO [1], a high-performance messaging library built on RDMA and supported by Mellanox

[1] https://github.com/accelio/JXIO

Upvotes: 3

Andy Malakov
Andy Malakov

Reputation: 837

Java 7 supports SDP protocol on Solaris and Linux (with OpenFabrics.org drivers). Unfortunately SDP protocol has been deprecated in the 2.x version of OFED. People resort to JNI wrappers like jVerbs.

Upvotes: 0

NPE
NPE

Reputation: 500167

RDMA as I know it is a property of the networking infrastructure (along with the relevant kernel modules etc), not of the application-level programming language.

In other words, you'd have to get specialized kit to make use of RDMA to reduce network latency. Here is an example of a 10GbE network card that supports RDMA: link.

Upvotes: 1

LordDoskias
LordDoskias

Reputation: 3191

This article from IBM developers work give a great overview of how DMA access can be achieved using java

Upvotes: 6

Konstantin Pribluda
Konstantin Pribluda

Reputation: 12367

Java applications are capable of mmaping files via nio packages. Those mmaped files can be accesses by multiple programs - I affraid this is closes thing to DMA available in java

Upvotes: 0

Related Questions