java - Best way to fetch a global variable for a thrift service from a client -
i have client server architecture set through thrift. service has been written in java, while client in php. now, clients might many, want introduce concept of unique client id.
the current structure such clients have same client code @ end. hence, way me determine client id when request made.
as service has lot of exposed functions(>50), not add client id parameter in functions (as mean changes clients).
is there clean way - when client makes service object first time, sends id, becomes global object service thread. subsequent calls exposed functions, client id becomes global object service thread. please guide.
you can use client ip address reference.
"how can client's thrift server"
it looks subclassing tserversocket/tnonblockingserversocket (and chosen server class) allow access ip address (or hostname) pretty right sockets manage...
Comments
Post a Comment