mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Vermillard <jvermill...@gmail.com>
Subject Re: [3.0] Would we need CumulativeProtocolDecoder?
Date Sun, 05 May 2013 09:13:08 GMT
Hi Ashish !

On Sun, May 5, 2013 at 7:11 AM, Ashish <paliwalashish@gmail.com> wrote:
> Folks,
>
> I remember the discussion about not to have CumulativeProtocolDecoder in
> 3.0. IMHO, we have many scenarios where we would need it, otherwise we
> might end up writing our own context implementations to store partial
> messages (we have one in TextLineDecoder and Http Decoder has its own).

IMO it's a mistake, we should use the IoBuffer Emmanuel coded : it's a
byte buffer accumulator.
The one in Http decoder is quite stupid, it's copying bytebuffer.

>
> Do we plan to introduce it 3.0?
>
I first coded one, but after thinking twice, I start to agree with
Emmanuel here. We should provide facilities for the different use case
:
TLV, pattern matching termination, fixed length accumulation and for
the more complex use case : IO buffer composite for doing it in your
buffer.

My main issue is compatibility. I think a lot of MINA 2 base code is
using the CumulativeProtocolDecoder.
Julien

Mime
View raw message