[infinispan-dev] Hot Rod clients & payload size estimates

Sanne Grinovero sanne at infinispan.org
Wed Sep 14 10:02:32 EDT 2016


Hi all,
I just noticed that the payload size estimates are ignored by the Hot
Rod client when using the ProtoStreamMarshaller.

That sounds good, as the estimating strategies are typically based on
dumb statistics, while in case we're using protobuf-encoded data we
have a schema which implies the ProtoStreamMarshaller could know
better.. however this marshaller doesn't seem to try optimise the
buffer size at all.

Some types in protobuf will still need variable lenght encoding for
obvious reasons (i.e. encode a String type), but some message types
could have a pre-computed constant size.

Even for those messages which include some variable length fields we
could define at least:
 - a minimum size
 - try guess a good a reasonable default size depending on the type
and number of fields
 - a per- message type sampler?

With the OGM Grid Dialect for Hot Rod I'm sending several different
kinds of objects over the wire, which implies wildfly different buffer
sizes. Would be nice to be able to control this better?

Thanks,
Sanne


More information about the infinispan-dev mailing list