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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -