Emmanuel,

is there a  detailed explanation of Mina thread model? It would be
great to see a picture of it. As for IoProcessor I found only
http://mina.apache.org/ioprocessor-loop.html it is not very helpful. I
read all introductions, tutorials, etc assessable from Mina home page
and still have vague idea of ExecutorFilter.

2011/9/5 Emmanuel Lécharny <[email protected]>:
> On 9/4/11 7:52 PM, Antonio Rodriges wrote:
>>
>> Thank you, Emmanuel,
>>
>> Any costly action is performed completely in one thread no matter of
>> the thread number.
>
> What's your point ?
>>
>> It is still not clear for me in what cases it would be beneficial to
>> set up both the number of NioAcceptors and number of Executor threads.
>
> IMO, you should not need to set anything for the NioAcceptors. It won't
> matter too much. If you need to scale more and if you ghave some bottleneck,
> then first you have to identify them, and second you have to find the best
> solution to get them fixed.
>
> One very good use case for an executor is when you have a session where a
> request can take a very long time to be processed, and your protocol allow
> the user to send an abort message on the same session, then you need an
> executor, otherwise your long request will be executed no matter what
> (remember that the requests are always processed by the same IoProcessor,
> when they are for the same session, thus the second request will be
> enqueued).
>
> There are many other cases where using an executor could help. For instance,
> as you will have a limited number of IoProcessor (ie, Thread to execute your
> actions), as soon as one of them is busy processing one long request, all
> other sessions associated with this thread will also be enqueued, waiting
> for the thread to be done. Using an executor can allow those pending
> requests to be processed.
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>



-- 
Kind regards,
Antonio Rodriges

Reply via email to