Re: Presence service
Walter Barnes <[email protected]> Tue, 5 Dec 2006 17:52:03 -0800 (PST)
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
This is interesting....=0A=0AI think I understand the part about the propag= ate pipe being well-known so that new peers can announce their presence. Bu= t how do the other peers reply? Do they use the same progate pipe (I don't = think so, not sure) or some other well-known pipe?=0A=0AAlso, this takes ca= re of when a new peer comes online, but what about when a peer goes away? S= hould peers use the propagate pipe to send a "heartbeat signal" or should p= eers periodically check in on the peers they know about?=0A=0AThanks,=0AWal= ter=0A=0A----- Original Message ----=0AFrom: Mark S. Petrovic <mark@petrovi= c.org>=0ATo: [email protected]=0ASent: Wednesday, December 6, 2006 12:47:20 AM= =0ASubject: Re: [JXTA user] Presence service=0A=0A=0AOn Tue, Dec 05, 2006 a= t 05:37:56PM +0100, [email protected] wrote:=0A> Thanks for your response!= =0A> If I am using the propagate pipe I only need to create it by using the= =0A> peer groups pipeservice, there is no need to publish it in the group = or =0A> create it on the Rdv first, right?=0A=0ACorrect. What you are desc= ribing is essentially the technique of using a=0A"well-known PipeID", whose= analogue I'm sure you've heard of with things=0Alike SMTP, HTTP, and other= important Internet standard services. There,=0Athey are call well-known p= ort numbers.=0A=0AWell-known in our case means all peers know the PipeID a = priori to its=0Ause. Meaning it is available as an application constant or= declaratively=0Aconfigured somewhere in a config file. There is no point = publishing it=0Afor the sake of discovery - just hard code it somewhere in = your app ---=0Abecause you already know you will need it.=0A=0Ahth=0A=0AMar= k=0A=0A> Vince=0A> =0A> =0A> Mark S. Petrovic wrote:=0A> >Vince, your propa= gate pipe idea is a good basis for a presence service.=0A> >I travelled the= same path you did, first wanting to use advertisements,=0A> >then concludi= ng that I wanted something more deterministic. A propagate=0A> >pipe is th= e price you pay for knowing quickly peers are out there,=0A> >rather than a= ssuming they are not on some unknown timescale if you cannot=0A> >discover = their advertisements.=0A> >=0A> >On Tue, Dec 05, 2006 at 11:37:15AM +0100, = [email protected] wrote:=0A> > =0A> >>I implemented a presence service for= my application a few weeks ago but =0A> >>it is much too slow and unreliab= le and I want to implement it different =0A> >>this time and would like to = hear your comments.=0A> >>=0A> >>My current implementation is based on adve= rtisements that are published =0A> >>every 5 minutes using a timer task suc= h as Brendon J. Wilson is doing it =0A> >>in his book. Other peers are sear= ching for these advertisments with a =0A> >>timer task. So the problem with= this is that it can take up to a few =0A> >>minutes until a peer is found = to be online and a peer could go offline =0A> >>and it is not recognized. S= o I definitely need to change this.=0A> >>=0A> >>My new approach would be a= mix of advertisments and a propagate pipe. =0A> >>The advertisment is publ= ished to the peer group with an application =0A> >>specific description of = the peer. This advertisment for example holds a =0A> >>pipeadvertisment for= a JxtaSocket which is later used to transfer files. =0A> >>When a peer ent= ers my peer group it searches for the advertisments of =0A> >>other peers s= o that they can be displayed in the GUI as offline. It also =0A> >>sends a = "hello" message to all other peers in the peer group with its =0A> >>status= such as "online" and gets a response from all other devices that =0A> >>ar= e online too.=0A> >>=0A> >>Do you have any other ideas on implementing a pr= esence service?=0A> >>How did other applications solve this?=0A> >>=0A> >>t= hanks in advance,=0A> >>Vince=0A> >>=0A> >>--------------------------------= -------------------------------------=0A> >>To unsubscribe, e-mail: user-un= [email protected]=0A> >>For additional commands, e-mail: [email protected]= g=0A> >> =0A> >=0A> > =0A> =0A> ---------------------------------------= ------------------------------=0A> To unsubscribe, e-mail: user-unsubscribe= @jxta.org=0A> For additional commands, e-mail: [email protected]=0A=0A-- = =0AMark S. Petrovic=0APasadena, CA =0Ahttp://www.petrovic.org=0A=0A--------= -------------------------------------------------------------=0ATo unsubscr= ibe, e-mail: [email protected]=0AFor additional commands, e-mail: u= [email protected]=0A=0A=0A =0A_____________________________________________= _______________________________________=0AAny questions? Get answers on any= topic at www.Answers.yahoo.com. Try it now.