You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Stojce Dimski <sd...@yahoo.it> on 2007/02/01 17:05:23 UTC

mina 2.0, asyncweb, client...

Hi Trustin,

I am posting this message here as I saw that Trustin made all
refactoring of the asyncweb code for mina 2.0...
I would like to torture myself and adapt asyncweb sandbox client to use
mina 2.0-m1...

I imported the sources and aligned some package statements, also made
some small fixes with class names but have problems with:
decoders - StatefulDecoder, AbstractStatefulDecoder, SequentialDecoder,
SequentialDecoder, FixedLengthDecoder, ChunkedBodyDecoder,
HttpHeaderDecoder...
allocators - Bytes, BytesAllocator...

I am asking for some small and kind guidance into adapting this code for
2.0:

1) where is a HttpHeaders counterpart ?
2) If I correctly understand there are some base classes for building
stateful decoders in mina 2.0... Is there some example for building
those as would be very helpfull for adapting existing decoders...
3) Have something changed fundamentally in allocators area, )something
like absence of acquire/release) ?
4) Is there some design changelog for mina 2.0 ?

Thanks,
Stojce


Re: mina 2.0, asyncweb, client...

Posted by Trustin Lee <tr...@gmail.com>.
Hi Stojce,

On 2/2/07, Stojce Dimski <sd...@yahoo.it> wrote:
>
> Hi Trustin,


There are a couple hundreds people who are sitting on this mailing list, so
it could sound better with 'community' or 'folks' than 'Trustin. ;)

I am posting this message here as I saw that Trustin made all
> refactoring of the asyncweb code for mina 2.0...
> I would like to torture myself and adapt asyncweb sandbox client to use
> mina 2.0-m1...


I hope the migration didn't hurt you much.

I imported the sources and aligned some package statements, also made
> some small fixes with class names but have problems with:
> decoders - StatefulDecoder, AbstractStatefulDecoder, SequentialDecoder,
> SequentialDecoder, FixedLengthDecoder, ChunkedBodyDecoder,
> HttpHeaderDecoder...
> allocators - Bytes, BytesAllocator...


I made AsyncWeb use more features of MINA, and HTTP decoder codec has been
refactored very heavily.  The classes you mentioned are now gone.

I am asking for some small and kind guidance into adapting this code for
> 2.0:
>
> 1) where is a HttpHeaders counterpart ?


It has been replaced with Map<String, List<String>>.

2) If I correctly understand there are some base classes for building
> stateful decoders in mina 2.0... Is there some example for building
> those as would be very helpfull for adapting existing decoders...


Actually the base classes (ProtocolCodecFilter, ProtocolEncoder,
ProtocolDecoder) has been a part of MINA since the birth of MINA.  You could
take a look into our presentation material, and examples such as Reverser
and SumUp here.

http://mina.apache.org/documentation.html

3) Have something changed fundamentally in allocators area, )something
> like absence of acquire/release) ?


MINA 2.0 doesn't need acquire and release anymore.  It is one of the big
changes in 2.0.

4) Is there some design changelog for mina 2.0 ?


Its basic design didn't change at all, but there were a few important
changes:

* One IoAcceptor can bind only one service.
* ThreadModel has been removed
* ByteBuffer pooling is disabled.
* Heap buffers are allocated by default in preference to direct buffers

For the detailed changelog / roadmap, please visit here:

http://tinyurl.com/2vlmjh
HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6