[jboss-jira] [JBoss JIRA] (JGRP-1781) Message: write/read the payload last when marshalling
Bela Ban (JIRA)
issues at jboss.org
Thu Jan 23 06:34:28 EST 2014
[ https://issues.jboss.org/browse/JGRP-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12938205#comment-12938205 ]
Bela Ban commented on JGRP-1781:
--------------------------------
For now, I'll write the length field even for single messages, to have the same code for parsing of single messages and message batches. With NIO.2 in 4.0, this will change anyway
> Message: write/read the payload last when marshalling
> -----------------------------------------------------
>
> Key: JGRP-1781
> URL: https://issues.jboss.org/browse/JGRP-1781
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.5
>
>
> When (un)marshalling a message, we process the fields in this order:
> # Sender and receiver addresses
> # Flags
> # Payload
> # Headers
> I'd like to change this to move processing of the payload to the end because
> * If payload refers to a different buffer (JGRP-1773), then we don't need to read the bytes, but currently have to skip N bytes to read the headers. If the payload was at the end, this wouldn't be needed
> * Once we use NIO.2 and gathering writes, we'd pass a couple of buffers to the socket write and therefore it's simpler if the payload is written last. Ditto for scattering reads.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list