You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Oscar Herrera <oh...@studiocom.com> on 2005/09/14 15:51:42 UTC

[mina] Upgrading from Netty 2.1 to Mina

Hello everybody. Actually starting this year we decided to use Netty to
support a server we are currently building, about eight months later
when we were building the first application to run into this server we
realized we are having problems with the message ordering, I mean, code
is written in a sequential order, but anyway events are being triggered
in a random order. Analyzing the issue we realized the problem is
related to the threading pool Netty uses, actually it is something like
many events being triggered in a synchronous way, but when they get to
Netty it might use all available resources to send all the answers for
all the events by different channels (network connections), so this is
causing the client application to receive the messages in the wrong
order. I changed the number of IoThreads and this solved the issue, but
at the same time this reduced the performance of the server as I think
it was expected. 

 

So basically we have 2 approaches to solve this issue: modify Netty
classes trying to link each client application with one channel (with
all the considerations this might lead), or upgrading Netty by Mina. So
here is where my question arises, have any one have any experience like
this or know if the latest version of Mina might solve this issue?.
Actually the answer to this question is very important because of the
time each approach might take, so we'd like to have some confidence
about the way we decide to proceed to give a solution to this issue.

 

Thank you so much for your help,

 

 

Oscar Herrera S.
Developer
studiocom 

_________
Disclaimer: This e-mail message is intended only to its recipient(s). If
by mistake you receive this e-mail please delete it and let me know. You
are not allowed to use any information contained here for yours or
others purposes, neither to reproduce the whole message or any part of
it or its attachments without my written authorization. Information
contained in this message cannot be taken as an official position from
any organization the author belongs to. All rights reserved, Oscar
Herrera S. 2004. Any violation to this disclaimer will be prosecuted to
the last extent of the law.

 


Re: [mina] Upgrading from Netty 2.1 to Mina

Posted by Julien Vermillard <jv...@archean.fr>.
Le mercredi 14 septembre 2005 à 09:51 -0400, Oscar Herrera a écrit :
> Hello everybody. Actually starting this year we decided to use Netty
> to support a server we are currently building, about eight months
> later when we were building the first application to run into this
> server we realized we are having problems with the message ordering, I
> mean, code is written in a sequential order, but anyway events are
> being triggered in a random order. Analyzing the issue we realized the
> problem is related to the threading pool Netty uses, actually it is
> something like many events being triggered in a synchronous way, but
> when they get to Netty it might use all available resources to send
> all the answers for all the events by different channels (network
> connections), so this is causing the client application to receive the
> messages in the wrong order. I changed the number of IoThreads and
> this solved the issue, but at the same time this reduced the
> performance of the server as I think it was expected. 
> 
>  
> 
> So basically we have 2 approaches to solve this issue: modify Netty
> classes trying to link each client application with one channel (with
> all the considerations this might lead), or upgrading Netty by Mina.
> So here is where my question arises, have any one have any experience
> like this or know if the latest version of Mina might solve this
> issue?. Actually the answer to this question is very important because
> of the time each approach might take, so we’d like to have some
> confidence about the way we decide to proceed to give a solution to
> this issue.
> 
>  
> 
> Thank you so much for your help,


Hello, I think you should try to use the netty2 codec for Mina 0.7 it
never procduced the behaviour you are reporting on my application.

Julien


Re: [mina] Upgrading from Netty 2.1 to Mina

Posted by Trustin Lee <tr...@gmail.com>.
Hello Oscar,

2005/9/14, Oscar Herrera <oh...@studiocom.com>:
> 
>  So basically we have 2 approaches to solve this issue: modify Netty 
> classes trying to link each client application with one channel (with all 
> the considerations this might lead), or upgrading Netty by Mina. So here is 
> where my question arises, have any one have any experience like this or know 
> if the latest version of Mina might solve this issue?. Actually the answer 
> to this question is very important because of the time each approach might 
> take, so we'd like to have some confidence about the way we decide to 
> proceed to give a solution to this issue.
> 

I bet you *have to* migrate to MINA. MINA is more widely tested and event 
order is not reproduced anymore.

BTW did you use SimpleEventDispatcher for Netty2? You'll have to use 
OrderedEventDispatcher instead if you did. OrderedEventDispatcher should 
dispatch events in right order.

Thanks for your support,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/