Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 12437 invoked from network); 10 Jun 2005 16:14:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jun 2005 16:14:35 -0000 Received: (qmail 12417 invoked by uid 500); 10 Jun 2005 16:14:35 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 12330 invoked by uid 500); 10 Jun 2005 16:14:34 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 12304 invoked by uid 99); 10 Jun 2005 16:14:34 -0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=HTML_30_40,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS,URIBL_SBL X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of trustin@gmail.com designates 64.233.184.196 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.196) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 10 Jun 2005 09:14:28 -0700 Received: by wproxy.gmail.com with SMTP id 70so885172wra for ; Fri, 10 Jun 2005 09:14:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=BBNIXzu8QJpEXqRqiE5vNS3dGLDHDwNh4OW060y8S3dMMcklKf64ZJaZ8Yul2dJdaGCL1PFiK1S2Cwm0ZSdSWncP2HSxCDdpLAyzmmlp6rI+AdtcTnHG4RcESWQc5hWHmjV4v0N+59s9YPpN6pFhwAtBVpsxUigc2pPY57YykBo= Received: by 10.54.35.71 with SMTP id i71mr798250wri; Fri, 10 Jun 2005 00:14:11 -0700 (PDT) Received: by 10.54.72.4 with HTTP; Fri, 10 Jun 2005 00:14:11 -0700 (PDT) Message-ID: <768dcb2e05061000145c9b4ea1@mail.gmail.com> Date: Fri, 10 Jun 2005 16:14:11 +0900 From: Trustin Lee Reply-To: Trustin Lee To: Apache Directory Developers List , Brad Baker Subject: Re: [mina] How to delay reading and writing when using Mina In-Reply-To: <75075940506092342802764d@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2874_14243008.1118387651494" References: <750759405060823155de40395@mail.gmail.com> <768dcb2e050609002910471718@mail.gmail.com> <75075940506092342802764d@mail.gmail.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_2874_14243008.1118387651494 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 2005/6/10, Brad Baker : > >>MINA doesn't have any traffic control support for now, so you can't sto= p=20 > MINA from reading from >>socket and firing messageReceived event. It is a= =20 > known issue and we are going to fix it in 0.9 stream. >=20 > Cool . In my case I can read and "store" the data for later retreival. >=20 > >>MINA code can have multiple outstanding "client connections" with a=20 > "selector" thread that can "tell" >>when they have become readable? >>Yes= ,=20 > of course. :) > >>Multiple SocketConnectors would be the way to do this? >>You can do the= =20 > same thing with single SocketConnector. :) >=20 > My impression of SocketConnect was that you needed 1 per outward bound=20 > client connection. So are you saying that if my programs makes 50 outboun= d=20 > client connections to "some server" I only need to use 1 SocketConnector. >=20 > And if so does the "pooling threads" tell me when any one of the multiple= =20 > outbound client connections is now readable? >=20 Please note that IoConnector.connect() is a blocking operation. It returns= =20 IoSession when socket is connected. If once socket is connect, it works=20 asynchronously. What I am trying to achieve is having the MINA process perform many=20 > outbound "client connections" and for it to "manage" when data has come b= ack=20 > on any one of those connections.=20 >=20 As I told you above, IoConnector.connect() is synchronous operation, so=20 you'll have to manage your own thread pool to initiate many connections. In= =20 0.9 stream, we will provide Future interface so that these operations are= =20 done asynchronously. My "outside process" would "ask to initiatiate" an outbound connection and= =20 > later ask the MINA server if any one of them had become readbable. I am= =20 > hoping the MINA code manage multiple "outbound client connections" and te= ll=20 > me when any one of them is readable? >=20 Once connection is established, all connections will be managed by a singl= e=20 selector thread in SocketIoProcessor.=20 Thanks, Trustin --=20 what we call human nature is actually human habit -- http://gleamynode.net/ ------=_Part_2874_14243008.1118387651494 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
2005/6/10, Brad Baker <bbakerman@gmail.com>:
>>MINA d= oesn't have any traffic control support for now, so you can't stop MINA fro= m reading from >>socket and firing messageReceived event.  It is= a known issue and we are going to fix it in=20 0.9 stream.

Cool .  In my case I can read and "stor= e" the data for later retreival.

>>
MINA code can have multiple outstanding "client connections&q= uot; with a "selector" thread that can "tell" >>w= hen they have become readable?=20
>>Yes, of course. :)
>>Multiple SocketConnecto= rs would be the way to do this?=20
>>You can do the same thing with single Socket= Connector. :)

My impression of SocketConnect was that you nee= ded 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?
<= /blockquote>
 
Please note that IoConnector.connect() is a blocking operation.  = It returns IoSession when socket is connected.  If once socket is conn= ect, it works asynchronously.

 
What I am trying to achieve is having the MINA process perform many ou= tbound "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, s= o you'll have to manage your own thread pool to initiate many connections.&= nbsp; In 0.9 stream, we will provide Future interface so that these operati= ons 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 b= ecome readbable.  I am hoping the MINA code manage multiple "outb= ound client connections" and tell me when any one of them is readable?
 
Once connection is established, all connections will be managed by a s= ingle selector thread in SocketIoProcessor.
 
Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
------=_Part_2874_14243008.1118387651494--