thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Goel <goelvivek2...@gmail.com>
Subject Re: How to keep state of client in server
Date Wed, 12 Sep 2012 19:18:20 GMT
@Tarun
According to your suggestion. I will need two things first Client Unique ID
and second a way to mange the object.

   1. Is there API in thrift for getting unique Client ID ?
   2. In this case ,  I need to manually manage that map. Liking clearing
   object from map if client closes the connection in middle. Or don't send a
   reply within x seconds. Is there an API/example in thrift for doing this
   task?

regards
Vivek Goel



On Thu, Sep 13, 2012 at 12:38 AM, Tarun Goyal <join2tarun@gmail.com> wrote:

> Hi,
>
> You can have a Map<client id,last state>
>
>
> Thanks,
> Tarun
>
>
>
> On Thu, Sep 13, 2012 at 12:29 AM, Vivek Goel <goelvivek2011@gmail.com
> >wrote:
>
> > Hi,
> > My application process is divided into three steps and every step depends
> > on the previous state.
> > Is there a way to keep one-one mapping object on server with client? So I
> > can keep a client state on server side.
> >
> > What I want to do.
> >
> >    1. Client sends a request foo state1 . Server create a new object Foo
> >    with default state and do some processing return result of processing
> to
> >    client and store state on server.
> >    2. Based on state1 result client do some processing and it send state2
> >    to server. Now server action on state2 is depending on the state1
> > stored on
> >    the server of the same client.
> >
> >
> > regards
> > Vivek Goel
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message