1nameserv::auto(n)            Name service facility           nameserv::auto(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       nameserv::auto - Name service facility, Client Extension
9

SYNOPSIS

11       package require Tcl  8.4
12
13       package require nameserv::auto  ?0.3?
14
15       package require nameserv
16
17_________________________________________________________________
18

DESCRIPTION

20       Please read the document Name service facility, introduction first.
21
22       This  package  provides  the  exact  same API as is provided by package
23       nameserv, i.e the regular name service client. It differs from the for‐
24       mer  by  taking  measures  to ensure that longer-lived data, i.e. bound
25       names, continuous and unfulfilled async searches, survive the  loss  of
26       the connection to the name server as much as is possible.
27
28       This  means  that  the bound names and continuous and unfulfilled async
29       searches are remembered client-side and automatically  re-entered  into
30       the  server  when  the  connection comes back after its loss. For bound
31       names there is one important limitation to such restoration: It is pos‐
32       sible  that a name of this client was bound by a different client while
33       the connection was gone. Such names are fully lost, and  the  best  the
34       package can and will do is to inform the user of this.
35

API

37       The  user-visible  API  is  mainly identical the API of nameserv and is
38       therefore not described here. Please read the  documentation  of  name‐
39       serv.
40
41       The differences are explained in the sections OPTIONS and EVENTS.
42

OPTIONS

44       This package supports all the option of package nameserv, and one more.
45       The additional option allows the user to specifies  the  time  interval
46       between attempts to restore a lost connection.
47
48       -delay milliseconds
49              The value of this option is an integer value > 0 which specifies
50              the interval to wait between attempts to restore a lost  connec‐
51              tion,  in milliseconds. The default value is 1000, i.e. one sec‐
52              ond.
53

EVENTS

55       This package generates all of the events of package nameserv,  and  two
56       more. Both events are generated for the tag nameserv.
57
58       lost-name
59              This  event  is  generated when a bound name is truly lost, i.e.
60              could not be restored after the temporary loss of the connection
61              to  the  name  server. It indicates that a different client took
62              ownership of the name while this client was out of contact.
63
64              The detail information of the event will  be  a  Tcl  dictionary
65              containing  two  keys, name, and data. Their values hold all the
66              information about the lost name.
67
68       re-connection
69              This event is generated when the connection  to  the  server  is
70              restored.  The  remembered data has been restored when the event
71              is posted.
72
73              The event has no detail information.
74

DESIGN

76       The package is implemented on top of the  regular  nameservice  client,
77       i.e.   package  nameserv. It detects the loss of the connection by lis‐
78       tening for lost-connection events, on the tag nameserv.
79
80       It reacts to such events by starting a periodic  timer  and  trying  to
81       reconnect  to  the  server  whenver this timer triggers. On success the
82       timer is canceled, a re-connection event  generated,  and  the  package
83       proceeds to re-enter the remembered bound names and continous searches.
84
85       Another  loss  of the connection, be it during or after re-entering the
86       remembered information simply restarts the timer and subsequent  recon‐
87       nection attempts.
88

BUGS, IDEAS, FEEDBACK

90       This  document,  and the package it describes, will undoubtedly contain
91       bugs and other problems.  Please report such in the  category  nameserv
92       of       the       Tcllib       SF       Trackers       [http://source
93       forge.net/tracker/?group_id=12883].  Please also report any  ideas  for
94       enhancements you may have for either package and/or documentation.
95

SEE ALSO

97       nameserv(n)
98

KEYWORDS

100       automatic, client, name service, reconnect, restore
101
103       Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>
104
105
106
107
108nns                                   0.3                    nameserv::auto(n)
Impressum