Re: Presence service
"Mark S. Petrovic" <[email protected]> Tue, 5 Dec 2006 08:47:20 -0800
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <20061205164720.GB5275@false> |
On Tue, Dec 05, 2006 at 05:37:56PM +0100, [email protected] wrote: > Thanks for your response! > If I am using the propagate pipe I only need to create it by using the > peer groups pipeservice, there is no need to publish it in the group or > create it on the Rdv first, right? Correct. What you are describing is essentially the technique of using a "well-known PipeID", whose analogue I'm sure you've heard of with things like SMTP, HTTP, and other important Internet standard services. There, they are call well-known port numbers. Well-known in our case means all peers know the PipeID a priori to its use. Meaning it is available as an application constant or declaratively configured somewhere in a config file. There is no point publishing it for the sake of discovery - just hard code it somewhere in your app --- because you already know you will need it. hth Mark > Vince > > > Mark S. Petrovic wrote: > >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] > >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] -- Mark S. Petrovic Pasadena, CA http://www.petrovic.org