[jboss-jira] [JBoss JIRA] (JGRP-886) TCP_NIO: revive and support as additional transport
Bela Ban (JIRA)
issues at jboss.org
Wed Jun 24 03:14:04 EDT 2015
[ https://issues.jboss.org/browse/JGRP-886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083081#comment-13083081 ]
Bela Ban commented on JGRP-886:
-------------------------------
Investigating NIO2 a bit more [1], we decided that NIO won't be the universal model for the transport, but instead JGroups would support both BIO (blocking IO) and NIO. The main reasoning here was that there have been claims that NIO was slower than BIO, plus our own benchmarks didn't show NIO to be faster than BIO.
Also, the JGroups API isn't going to change from {{byte[],offset,length}} to {{java.nio.ByteBuffer}} due to the reasons outlined in [1], so support of {{ByteBuffer}} isn't a requirement, at least for now.
The path that is therefore taken is to revive {{TCP_NIO}} and make it one of the supported transports. There will be conversions between {{byte[]}} and {{ByteBuffer}}, but they should be non-costly, as {{ByteBuffer.warp()}} is a quick operation and so is grabbing the {{byte[]}} buffer, offset and length from a {{ByteBuffer}}.
[1] https://github.com/belaban/JGroups/blob/master/doc/design/NIO2.txt
> TCP_NIO: revive and support as additional transport
> ---------------------------------------------------
>
> Key: JGRP-886
> URL: https://issues.jboss.org/browse/JGRP-886
> Project: JGroups
> Issue Type: Task
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.0
>
>
> Merge TCP and TCP_NIO into one protocol. Adapt it to use NIO2 (when available).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list