[infinispan-dev] Adaptive marshaller buffer sizes - ISPN-1102

Manik Surtani manik at jboss.org
Fri Jun 10 06:20:22 EDT 2011


I was referring to generating byte arrays (sending state), not generating objects (receiving state).  A buffer is maintained in the AbstractMarshaller and used.

I did see a comment from Bela on this thread about seeing this on the receiver too though - Bela, care to clarify?  I presume on the receiver that JGroups calls RpcDispatcher.Marshaller2.objectFromByteBuffer() and passes in a byte array.  So perhaps you are referring to how you create these byte buffers in JGroups for reading off a network stream?


On 9 Jun 2011, at 23:45, Sanne Grinovero wrote:

> Actually on this thread I keep getting confused about what is the
> issue we want to solve. Initially I thought it was about allocating
> the buffer to externalize known object types, as I saw the growing
> buffer logic in the MarshalledValue so the discussion seemed
> interesting to me, but I was corrected that it's about estimating the
> receiving buffer.
> 
> Then why don't we prefix all messages with the length, read that long
> first, and then proceed by allocating exactly what we know will be
> needed?
> (If the point is that we can't read the long without a first buffer,
> then we can't read the type for the first marshaller either, but we
> can at least reduce it to single estimate & resize once to exact
> size).
> 
> Seems too simple, so I would appreciate it if somebody could recap
> what the problem is about.
> 
> Sanne
> 
> 2011/6/9 Manik Surtani <manik at jboss.org>:
>> 
>> On 25 May 2011, at 08:45, Galder Zamarreño wrote:
>> 
>>>> 
>>>> Looks great Galder, although I could use some comments on how the
>>>> possible buffer sizes are chosen in your algorithm :-)
>>> 
>>> I'll ping you on IRC.
>> 
>> Could you make sure this is properly documented in the impl classes, whether in Javadoc or comments?
>> 
>> --
>> Manik Surtani
>> manik at jboss.org
>> twitter.com/maniksurtani
>> 
>> Lead, Infinispan
>> http://www.infinispan.org
>> 
>> 
>> 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
manik at jboss.org
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org






More information about the infinispan-dev mailing list