directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
Subject Re: [mina] How to delay reading and writing when using Mina
Date Fri, 10 Jun 2005 07:14:11 GMT
2005/6/10, Brad Baker <>:

> >>MINA doesn't have any traffic control support for now, so you can't stop 
> MINA from reading from >>socket and firing messageReceived event. It is a 
> known issue and we are going to fix it in 0.9 stream.
> Cool . In my case I can read and "store" the data for later retreival.
> >>MINA code can have multiple outstanding "client connections" with a 
> "selector" thread that can "tell" >>when they have become readable? >>Yes,

> of course. :)
> >>Multiple SocketConnectors would be the way to do this? >>You can do the

> same thing with single SocketConnector. :)
> My impression of SocketConnect was that you needed 1 per outward bound 
> client connection. So are you saying that if my programs makes 50 outbound 
> client connections to "some server" I only need to use 1 SocketConnector.
> And if so does the "pooling threads" tell me when any one of the multiple 
> outbound client connections is now readable?
 Please note that IoConnector.connect() is a blocking operation. It returns 
IoSession when socket is connected. If once socket is connect, it works 

 What I am trying to achieve is having the MINA process perform many 
> outbound "client connections" and for it to "manage" when data has come back 
> on any one of those connections. 
 As I told you above, IoConnector.connect() is synchronous operation, so 
you'll have to manage your own thread pool to initiate many connections. In 
0.9 stream, we will provide Future interface so that these operations are 
done asynchronously.

 My "outside process" would "ask to initiatiate" an outbound connection and 
> later ask the MINA server if any one of them had become readbable. I am 
> hoping the MINA code manage multiple "outbound client connections" and tell 
> me when any one of them is readable?
 Once connection is established, all connections will be managed by a single 
selector thread in SocketIoProcessor. 
what we call human nature is actually human habit

View raw message