Re: Presence service
"Mark S. Petrovic" <[email protected]> Tue, 5 Dec 2006 06:12:18 -0800
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <20061205141218.GU5275@false> |
Vince, your propagate pipe idea is a good basis for a presence service. I travelled the same path you did, first wanting to use advertisements, then concluding that I wanted something more deterministic. A propagate pipe is the price you pay for knowing quickly peers are out there, rather than assuming they are not on some unknown timescale if you cannot discover their advertisements. On Tue, Dec 05, 2006 at 11:37:15AM +0100, [email protected] wrote: > I implemented a presence service for my application a few weeks ago but > it is much too slow and unreliable and I want to implement it different > this time and would like to hear your comments. > > My current implementation is based on advertisements that are published > every 5 minutes using a timer task such as Brendon J. Wilson is doing it > in his book. Other peers are searching for these advertisments with a > timer task. So the problem with this is that it can take up to a few > minutes until a peer is found to be online and a peer could go offline > and it is not recognized. So I definitely need to change this. > > My new approach would be a mix of advertisments and a propagate pipe. > The advertisment is published to the peer group with an application > specific description of the peer. This advertisment for example holds a > pipeadvertisment for a JxtaSocket which is later used to transfer files. > When a peer enters my peer group it searches for the advertisments of > other peers so that they can be displayed in the GUI as offline. It also > sends a "hello" message to all other peers in the peer group with its > status such as "online" and gets a response from all other devices that > are online too. > > Do you have any other ideas on implementing a presence service? > How did other applications solve this? > > thanks in advance, > Vince > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] -- Mark S. Petrovic Pasadena, CA http://www.petrovic.org