[jboss-jira] [JBoss JIRA] (JGRP-1951) Flexible buffers for scatter/gather

Bela Ban (JIRA) issues at jboss.org
Mon Sep 7 05:34:00 EDT 2015


     [ https://issues.jboss.org/browse/JGRP-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Ban updated JGRP-1951:
---------------------------
    Fix Version/s: 3.6.7
                       (was: 3.6.6)


> Flexible buffers for scatter/gather
> -----------------------------------
>
>                 Key: JGRP-1951
>                 URL: https://issues.jboss.org/browse/JGRP-1951
>             Project: JGroups
>          Issue Type: Feature Request
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 3.6.7
>
>
> Currently, {{Buffers}} and {{WriteBuffers}} are inflexible in that they always expect a length buffer followed by data ({{Buffers}}), or a sequence of len/data pairs ({{WriteBuffers}}).
> This is bad if we for example want to read a sequence like the one below (for connection establishment in TCP):
> {noformat}
> | cookie | version | len | peer-address |
>    (4)         (2)      (2)     (variable)
> {noformat}
> Goals:
> * Have only 1 buffer, for reading *and* writing
> * Allow to define the sequence by adding buffers dynamically, e.g. in the above case, we'd add a 4 and a 2-length buffer and read data into them. If the cookie and version don't match, throw an exception, else *dynamically* add a length buffer (possibly doing a clear() which removes the first 2 buffers), read data into it, then add a new buffer sized to the read length and finally read data into it.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list