Re: [Openslp-users] How does an application know to re-register?
Brought to you by:
jcalcote
From: mclellan, d. <dav...@em...> - 2013-09-11 17:16:47
|
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, dav...@em...<mailto:dav...@em...> +-+-+-+-+-+-+-+-+- From: John Calcote [mailto:joh...@gm...] Sent: Wednesday, September 11, 2013 12:59 PM To: mclellan, dave; ope...@li... 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:dav...@em...] Sent: Wednesday, September 11, 2013 7:17 AM To: ope...@li...<mailto:ope...@li...> 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, dav...@em...<mailto:dav...@em...> +-+-+-+-+-+-+-+-+- |