Dear all,
I am using mina as both server and client in my service. I just wonder if I
should use IO/service(process) threads provided by mina to handle the
business logic?
what I understood is:
I added config.getFilterChain().addLast("threadPool", new ExecutorFilter(
Executors.newCachedThreadPool())) at server.
1) If client connector also needs config.getFilterChain().addLast("threadPool",
new ExecutorFilter(Executors.newCachedThreadPool())) ? If so, how to control
the numbers of threads for both servers and clients in order to reach the
maxiuam performance. I have 4, 5 client connections.
2) Since in my application, the data is big. What if mina IO/Process CAN'T
handle them in time? Put them in the mina internal queue? Or drop them? I
really worry about the memory problem.
3) If i use IO/process threads, the messageReceived methods will be called
asychronized. Am I right? If so, how can I make sure the incoming events is
processed in order?
Thanks.