David Rosenstrauch wrote:
Still, wouldn't it also make sense to have a thread pool on writes as
well? That way once a message has been processed, the reader/processor
thread can just dump the response message into a queue for output,
thereby freeing up the reader thread to process new incoming messages.
Seems like in theory you could handle a lot more message throughput by
decoupling message reading from writing like this.
Am I offbase in my assumptions here?
Thanks,
DR
Hmmm .... answering my own question a bit here, but:
The MINA javadocs state:
IoSession.write(Object message):
"Writes the specified message to remote peer. This operation is
asynchronous; IoHandler.messageSent(IoSession,Object) will be invoked
when the message is actually sent to remote peer. You can also wait for
the returned WriteFuture if you want to wait for the message actually
written."
So then this is already happening in a separate thread than the reader,
and so there's no need for a separate writer thread pool?
Confused ....
DR