thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sid <itis...@gmail.com>
Subject Re: Usage of TAsyncClient
Date Fri, 01 Feb 2013 23:39:29 GMT
Umm no I am not using the
TNonblockingTransport(TNonblockingSocket to be precises) I used the
connection pool from the apache-blur which also uses that. I got the client
to work when I switched to a TNonblockingServerSocket.  Perhaps its a bug?
I am using thrift 0.6. (If there is a bug that was fixed o so long ago
please let me know.)

-Best
Sid

On Fri, Feb 1, 2013 at 6:22 PM, Aaron McCurry <amccurry@gmail.com> wrote:

> Hmm. Are you using a tframedtransport?  Async only works with tframe.
>
> Aaron
>
> Sent from my iPhone
>
> On Feb 1, 2013, at 6:08 PM, Sid <itissid@gmail.com> wrote:
>
> > Ok so this is really perplexing me. I am trying to get
> > my TThreadPoolServer  and my client which is based on TAsyncClient to
> > work, TAsyncClient ofcourse uses the TNonblocking transport. I keep
> getting
> > the "timeout exception" in my Async callback.
> >
> > Now my server works fine with the Regular client(With TSocket) works just
> > fine. Why is this?
> >
> > -Sid
> >
> > On Thu, Jan 31, 2013 at 11:06 PM, Aaron McCurry <amccurry@gmail.com>
> wrote:
> >
> >> I'm assuming you are using java.
> >>
> >> Sent from my iPad
> >>
> >> On Jan 31, 2013, at 10:43 PM, Sid <itissid@gmail.com> wrote:
> >>
> >>> So two things have become clear to me while using these. Can some one
> >> tell
> >>> me if I am wrong on these?
> >>> 1) I will need to create a new TAsyncClient instance per request? This
> is
> >>> idiomatic to making 1 request per socket connection.
> >>
> >> Correct.
> >>
> >>>
> >>> 2) It looks like I will need new TAsyncClientManager and the
> >>> TProtocolFactory as well? Or can I use the old objects?
> >>
> >> You only need one of each.
> >>
> >> Here's a mostly generic asynchronous pool implementation so you don't
> have
> >> to manage everything yourself.  Should give you a good starting point.
> >>
> >>
> >>
> https://git-wip-us.apache.org/repos/asf?p=incubator-blur.git;a=blob;f=src/blur-thrift/src/main/java/org/apache/blur/thrift/AsyncClientPool.java;h=3d58af0082e710a8348b8e2c388984343e8838d4;hb=0.2-dev
> >>
> >>>
> >>> -Best
> >>> Sid
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message