On Fri, Aug 19, 2011 at 2:26 PM, Alan D. Cabrera <l...@toolazydogs.com> wrote:
>
> On Aug 19, 2011, at 5:19 AM, Emmanuel Lecharny wrote:
>
>> On 8/19/11 2:16 PM, Alan D. Cabrera wrote:
>>> I'm wondering.  Do you guys think it's a good idea?  It seems to make 
>>> things pretty complicated and adds another dimension to groking the 
>>> behavior of your service.  I'm not sure that it's necessary.
>> Definitively a bad idea.
>>
>> What we need is an abstraction on top of an Array of ByteBuffer (the Java 
>> NIO class), which extends the size by adding new ByteBuffer on the fly.
>>
>> The array must behave exactly as the ByteBuffer.
>>
>> I wrote such a class 2 years ago, but I can't find the code. Will look again 
>> on my USB keys this week-end.
>
> So, what is the scenario that we're trying to support?  I imagine appending 
> headers to binary data would be one.  In this case is an Array of ByteBuffers 
> really needed?  Why not just send down one ByteBuffer for the header and 
> another for the body that was sent to you?
>
> Searching for use cases where we need this complexity.  :)
>
Accumulating ByteBuffer until we have a full PDU to decode ?

Reply via email to