On 2/13/11 9:46 AM, Guy Itzhaki wrote:
Hi all,
I'm using Mina 2.0.2 for my server which, in the nutshell, is a very
simple server that acts as a file server, clients connect to the server
in order to send and fetch files.
I expect up to 200 clients to connect to the server concurrently and the
files might be big (up to few hundred Megs a file).
acceptor.getFilterChain().addLast()
My protocol codec
I read a lot about placing
I wonder where is best to place the ExecutorFilter? Is it before the
ProtocolCodecFilter or after? I assume the answer is "depends" so here
is in general what my server does:
Depends on the type of executor you use and the cost of decoding your data.
As the executor is just a thread pool, if you don't get the same thread
every time some data comes in, assuming that a message might be split in
many PDU, then you might get into trouble decoding the message.
Generally speaking, decoding is not that costly it requires to be spread
on many threads, compared to the execution of your application logic. I
would say that the executor should be put at the end of the chain, just
before your handler.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com