Yes, I am suggesting socket pooling.

I'd accept a patch that made the transport available through the existing
interfaces.

On Thu, Jun 16, 2011 at 4:30 AM, Dinesh Pathak <[email protected]>wrote:

> Thanks Bryan. All the clients are sending requests to the server
> simultaneously. Are you talking about socket pooling between clients?
> Regarding implementing my own scheme, my Async Client, which is the class
> generated from .thrift file, cant access transport, because both
> TAsyncClient and TAsyncMethodCall have these parameters as protected. Now,
> I
> am creating 'final' objects in the callback interface, but I was expecting
> to get it from the generated Thrift classes.
>
> On Thu, Jun 16, 2011 at 10:16 AM, Surbhi Bhasin <[email protected]
> >wrote:
>
> > I tried this option also, but even this is not working. Giving:
> > apr_socket_recv: Connection reset by peer (104)
> >
> > -----Original Message-----
> > From: Bryan Duxbury [mailto:[email protected]]
> > Sent: Wednesday, June 15, 2011 10:12 PM
> > To: [email protected]
> > Subject: Re: Closing Non Blocking socket in Async Thrift Client
> >
> > You're not supposed to close your sockets after every request. You
> > should reuse them. Reusing them will have a significantly positive
> > effect on performance.
> >
> > If you really want to close after every request, then it's up to you to
> > implement a scheme that allows the onComplete method to close the
> > associated transport.
> >
> > On Wed, Jun 15, 2011 at 2:43 AM, Dinesh Pathak
> > <[email protected]>wrote:
> >
> > > Hi,
> > >   I am new to these mailing lists, so please let me know if this is
> > > the right place to ask Thrift related questions. I am writing Async
> > > Thrift Client, using Non Blocking Socket. When the client is  sending
> > > a lot of requests to server, then it dies out saying "too many open
> > > files."  It seems like AsyncClientManager does not close the socket.
> > > Is there any way for the client to close socket in onComplete of
> > > callback. Also, would like to confirm that client can send only one
> > > service at a time. Thanks in advance.
> > >
> >
>

Reply via email to