On May 2, 2006, at 2:32 AM, Serkan Demir wrote:
>>All 100 sessions are sharing the same IoSession/ProtocolSession? Yes, all client connections share same IoSession.
This is the source of your problem then.
Or do i have to connect server for each client request ( this sounds odd to me) to multiply session objects ?
correct. Each new IoSession is a distinct connection to the server.
>>If you want to do parallel processing for a single session, you will want to create your own ThreadPoolFilter to achieve this. I have already use SimpleServiceRegistry and adds mina's default IoThreadPoolFilter to the chains of SocketIoAcceptor, what do you mean by writing own ThreadPoolFilter? I cannot see any specialized implementation of ThreadPoolFilter in examples. As i indicated my previous post, i want to see a dynamic and auto- scalable thread pool which increases/decreases its pool size according to traffic. However, i cannot achieve this. (i am also profiling my application).Is there a multiplexing scheme in Mina in order to achieve multiple sessions are all multiplexed through a single physical connection ? I am asking this question because the protocol (DIAMETER) which we are trying to implement advices to open a single connection between client and server.
MINA does not have built-in support for multiple "virtual" client connections on a single physical connection. Since MINA uses non- blocking IO, there is not the same penalty for multiple connections as when doing blocking IO (a thread per connection).
The default ThreadPoolFilter ensures that data received for a single connection is processed in serial. You want it to be processed in parallel, so you will need to write your own ThreadPoolFilter (you can start from the one MINA ships) to achieve that. For each connection, you will want to batch the data until you have a full "message", then dispatch processing of that on a worker thread.
Honestly, I think you'll be better off with discrete connections for each client.
-pete -- [EMAIL PROTECTED] - http://fotap.org/~osi
smime.p7s
Description: S/MIME cryptographic signature
