hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stack <st...@duboce.net>
Subject Re: Question on Single Connection Limitation
Date Wed, 24 Dec 2008 22:33:43 GMT
Michael Dagaev wrote:
> ...
> How should it work ?
> 0:02 C1 should release the connection after sending the request.
> 0:02 C2 should grab it and send the request while C1 is waiting
> and S1 is handling the request of C1.
> ...
> Now the connection works more and that is how good RPC implementations work.

This is how it works currently Michael.  RPC Client has one Connection 
for each target server.  This Connection is shared by all RPC Clients in 
current JVM.  Sending and receiving is synchronized.

See the call method in the RPC Client class: 

See how it gets a Connection appropriate to the address.  In base of the 
getConnection, a Call object is 'registered'.  We then send the request 
(sendParam -- see how it synchronizes on the out stream).

There is a response processor that runs reading the in stream.  Results 
are identified by an id.  The id is used to figure which of the 
registered Calls the response is for.

As is, I foresee issues if requests or responses take a long time to 
send or maybe, if cluster is small and uploader is single-process 


View raw message