Le 9/11/12 4:55 PM, Antonio Rodriges a écrit :
Dear all,
Seems like a NioProcessor-X is assigned for a session-Y upon a client
connect and creating session-Y.
We have 2 Mina-based applications interacting with each other via a
single session. Both applications are multithreaded. This results in
that only 1 NioProcessor works for every message (all threads are
writing to and reading from the same session).
Is it possible to distribute the work (messages) coming for the same
session between all available NioProcessors to speedup the
application?
You can add an ExecutorFilter in the chain, to spread the load. Keep in
mind that it must be added after the decoder. Also be aware that your
IoHJandler should be able to deal with such a situation.
FYI, this is what we do in ApacheDirectoryServer, as we must be able to
abandon a ongoing request on the same session.
More precise: N threads on one Mina-based application concurrently
write to the same session while M threads on another Mina-based
application must read from that session concurrently.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com