Dave
In answer to your second question - the daemon treats SLP_LIFETIME_MAXIMUM as
being registered for the life of the calling process. Assuming your using the
pid watch functionality, this will cleanup if the process exits without
deregistering. If not, you'd have 'stale' registrations in the daemon.
cheers
Matt
From: mclellan, dave [mailto:dave.mclel...@emc.com]
Sent: 11 September 2013 18:16
To: John Calcote; openslp-users@lists.sourceforge.net
Subject: Re: [Openslp-users] How does an application know to re-register?
Thank you very much John. A couple of notes inline below.
+-+-+-+-+-+-+-+-+-
Dave McLellan, VMAX Software Engineering, EMC Corporation, 176 South St.
Mail Stop 176-V1 1/P-36, Hopkinton, MA 01749
Office: 508-249-1257, Mobile: 978-500-2546,
dave.mclel...@emc.com<mailto:dave.mclel...@emc.com>
+-+-+-+-+-+-+-+-+-
From: John Calcote [mailto:john.calc...@gmail.com]
Sent: Wednesday, September 11, 2013 12:59 PM
To: mclellan, dave;
openslp-users@lists.sourceforge.net<mailto:openslp-users@lists.sourceforge.net>
Subject: RE: [Openslp-users] How does an application know to re-register?
Hi Dave,
First of all, the application "handle" represents a network (domain socket,
actually) connection to the SA. Any attempt to communicate using that handle
while the SA is down will return a network-level error to the application. It
can then do whatever failover is needed in a domain-specific manner.
[Dave] this is what I expected, so I could use SLPFindScopes or some other
passive call to see if the system is working. But then I read the next
paragraph...
Secondly, applications are responsible for re-registering their service with
the SA on a regular interval defined by the application. The SLPReg call has a
usLifetime argument that represents a number of seconds (less than or equal to
SLP_LIFETIME_MAXIMUM). The registration expires in the SA after usLifetime
seconds has passed since SLPReg was called.
[Dave] we will use SLP_LIFETIME_MAXIMUM, but now I see that is 18 hours in
slp.h. But I was confused by the assertion at
http://www.openslp.org/doc/html/ProgrammersGuide/SLPReg.html
that "If lifetime is set to
SLP_LIFETIME_MAXIMUM<http://www.openslp.org/doc/html/ProgrammersGuide/SLPTypes.html#SLPURLLifetime>,
it will remain registered for the life of the calling process." So this is
not how it works, you are saying.
Often, this number is something like 300 seconds, so about every 5 minutes the
application should call SLPReg again. This means that a registration will never
be down for more than 5 minutes. If the service is mission-critical, it would
be prudent to specify a shorter lifetime value and re-register more often, but
it would seem, in light of the nature of advertised network services, that once
a minute is sufficient, even for mission-critical applications.
Regards,
John
From: mclellan, dave [mailto:dave.mclel...@emc.com]
Sent: Wednesday, September 11, 2013 7:17 AM
To:
openslp-users@lists.sourceforge.net<mailto:openslp-users@lists.sourceforge.net>
Subject: [Openslp-users] How does an application know to re-register?
Hi all. Novice question alert; we are fairly new to use of OpenSLP.
Suppose an application has registered using SLPReg successfully in an
environment without the Directory agent. If the local Service Agent fails for
whatever reason and must be restarted, all registrations held by that Service
Agent are lost.
How does the application get notified, if at all, that it should close its
handle, open a handle and register again? Is there any notification provided
via the registration callback? I don't think so, from what I have read. My
conclusion is that there isn't a way for a registered process to know if the
openSLP infrastructure on which it depends fails and has been re-initialized.
Such notification would have to be done by some other monitoring entity,
presumably the same entity which notices the SLP infrastructure failure and
recovers it. Are these correct assumptions?
Thanks very much for any advice.
+-+-+-+-+-+-+-+-+-
Dave McLellan, VMAX Software Engineering, EMC Corporation, 176 South St.
Mail Stop 176-V1 1/P-36, Hopkinton, MA 01749
Office: 508-249-1257, Mobile: 978-500-2546,
dave.mclel...@emc.com<mailto:dave.mclel...@emc.com>
+-+-+-+-+-+-+-+-+-
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Openslp-users mailing list
Openslp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-users