[infinispan-dev] Zero-copy buffer transfers

Bela Ban bban at redhat.com
Thu May 23 12:00:12 EDT 2013



On 5/23/13 2:09 PM, Manik Surtani wrote:
> Bela,
>
> We shouldn't need to wait for NIO2/JDK7 for this.  We can do this in JDK6 as well, granted the impl may not be as good unless run on a Java7 VM.

In the current NIO impl, unfortunately MulticastSockets are not 
supported (MulticastChannel), only DatagramChannels, so I couldn't 
implement multicasting, only TCP this way.


> Do you have any notes on your designs somewhere?

Not really, but some JIRAs (se below). The main idea is that JGroups 
passes a list of buffers directly to the socket which then creates 
packets by writing them in sequence (gathering writes). One of the 
buffers will be the buffer passed by Infinispan to JGroups; JGroups then 
doesn't copy it into one single larger buffer, but passes it directly to 
the socket, avoiding a copy.

- https://issues.jboss.org/browse/JGRP-815
- https://issues.jboss.org/browse/JGRP-809
- https://issues.jboss.org/browse/JGRP-816



-- 
Bela Ban, JGroups lead (http://www.jgroups.org)


More information about the infinispan-dev mailing list