thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mayan Moudgill <ma...@bestweb.net>
Subject Re: Store client data in server thread?
Date Sat, 08 May 2010 12:09:50 GMT
I'm assuming that each client uses a unique socket to connect. In that 
case, why not store per-client information in a global socket-->data 
map? It would be a shared structure, so you would have to do read/write 
locks (or some lock-free equivalent) - or, if your load is light enough, 
a simple mutex.

Kenny MacDermid wrote:
> Is there any recommended way to store information about the connected client in Thrift?
> 
> I was looking to store the client information the way Cassandra does, using ThreadLocal<>
stores in the Server, but it appears this doesn't work. Threads will be reused by the thread
pool, so client information could be reused.
> 
> I'd like a way for clients to login() and not have to send a cookie back with all future
requests. Is this possible?
> 
> Thanks,
> 
> Kenny
> 


Mime
View raw message