thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron McCurry <amccu...@gmail.com>
Subject Re: Usage of TAsyncClient
Date Fri, 01 Feb 2013 23:22:34 GMT
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
View raw message