On Thursday 11 November 2010 4:47:36 pm am am wrote: > Thank you Dan, Ron for your suggestions. I will follow them, but I have one > last question. > Using these approaches how can we discriminate between a client crash and a > network outage (client is running, we just can not connect temporarily) > Either using call backs, or "I am here messages" approach (from client), if > client is up and network fails, client is assumed crashed. Is there a > mechanism to discriminate between outage and process crash?
With a non-persistent connection protocol like HTTP, there really isn't a way to distinguish between the two at all. :-( Dan > > Thank you > > > > > > > > ________________________________ > From: Daniel Kulp <[email protected]> > To: [email protected] > Cc: am am <[email protected]> > Sent: Thu, November 11, 2010 11:14:23 PM > Subject: Re: Using CXF asynchronously > > On Thursday 11 November 2010 9:10:32 am am am wrote: > > This is a good idea. But I was thinking that this way the records will be > > kept for a long time. Until the application restarts. If there is no > > standard mechanism to detect client failure (and also distinction between > > client failure and network failure), I will use your idea > > With normal HTTP or even JMS, that really is the only option. If you write > your own TCP transport or something, it might be possible. But then things > would be getting pretty complex. > > Dan > > > ________________________________ > > From: Ron Wheeler <[email protected]> > > To: [email protected] > > Sent: Thu, November 11, 2010 2:47:03 PM > > Subject: Re: Using CXF asynchronously > > > > On client startup can you not send a message to the server? > > If the server has outstanding records, it deletes them. > > If not, it ignores the message and return an "I am ready" message. > > > > On 11/11/2010 1:59 AM, am am wrote: > > > Hi, > > > > > > I have a web service that needs to keep some kind of session with the > > > web clients. > > > > > > I.e. a client sends request to the web service, the service makes some > > > > internal > > > > > records and can associate the client's requests with the records. > > > Additionally the web service makes call backs to the client according > > > to internal events, > > > > > >and > > > > > > sends notifications to the client according to the internal > > > records.I.e. > > > > server > > > > > acts also as a client. > > > My problem is, if the client restarts, then these records become stale. > > > This means that the client and the server are inconsistent and the > > > client will receive notifications based on the stale records. > > > Is there a standard approach to solve this? I was thinking of sending > > > some > > > > kind > > > > > of specific request to the client by the server, in the callbacks, and > > > if I > > > > get > > > > > an HTTP 500 I clear the records, but I do not know if this is a good > > > idea. Can anyone make a suggestion on this please? > > > > > > Thanks! -- Daniel Kulp [email protected] http://dankulp.com/blog
