1nns_intro(n)                 Name service facility                nns_intro(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       nns_intro - Name service facility, introduction
9

DESCRIPTION

11       nns  (short  for  nano nameservice) is a facility built for the package
12       comm, adding a simple name service to it.  It is also built on  top  of
13       comm,  using  it  for  the  exchange of messages between the client and
14       server parts.
15
16       This name service facility has nothing to do with the Internet's Domain
17       Name  System,  otherwise  known  as DNS. If the reader is looking for a
18       package dealing with that please see either of  the  packages  dns  and
19       resolv, both found in Tcllib too.
20
21       Tcllib  provides  2  applications  and  4  packages  which  are working
22       together and provide access to the facility at different levels.
23

APPLICATIONS

25       The application nnsd provides a simple name server which can be run  by
26       anybody anywhere on their system, as they see fit.  It is also an exam‐
27       ple on the use of the server-side package nameserv::server.
28
29       Complementing this server is the nns client application.   A  possible,
30       but  no  very  sensible use would be to enter name/port bindings into a
31       server from a shell script. Not sensible, as shell scripts normally  do
32       not provide a comm-based service.
33
34       The  only  case  for this to make some sense would be in a shell script
35       wrapped around a Tcl script FOO which is using comm,  to  register  the
36       listening port used by FOO.  However even there it would much more sen‐
37       sible to extend FOO to use the nameservice directly. And in  regard  on
38       how  to that nns can be used as both example and template.  Beyond that
39       it may also  be  useful  to  perform  nameservice  queries  from  shell
40       scripts.
41
42       The third application, nnslog is a stripped down form of the nns client
43       application. It is reduced to  perform  a  continuous  search  for  all
44       changes and logs all received events to stdout.
45
46       Both  clients use the nameserv::auto package to automatically hande the
47       loss and restoration of the connection to the server.
48

PACKAGES

50       The two main packages implementing the service are nameserv  and  name‐
51       serv::server,  i.e.  client  and  server. The latter has not much of an
52       API, just enough to start, stop, and configure it. See the  application
53       nnsd on how to use it.
54
55       The basic client, in package nameserv, provides the main API to manipu‐
56       late and query the service. An example of its use  is  the  application
57       nns.
58
59       The  second  client  package,  nameserv::auto  is API compatible to the
60       basic client, but provides the additional functionality  that  it  will
61       automatically  restore data like bound names when the connection to the
62       name service was lost and then  reestablished.  I.e.  it  automatically
63       detects  the  loss of the server and re-enters the data when the server
64       comes back.
65
66       The package nameserv::common is of no  interest  to  users.  It  is  an
67       internal package containing code and definitions common to the packages
68       nameserv and nameserv::server.
69
70       All packages use the uevent package for the reporting of  special  cir‐
71       cumstances  via  events,  and reserve the uevent-tag nameserv for their
72       exclusive use. All their events will be posted to that tag.
73

INTERNALS

75       The document Name service facility,  client/server  protocol  specifies
76       the protocol used by the packages nameserv and nameserv::server to talk
77       to each other. It is of no interest to users of either the packages  or
78       applications.
79
80       Developers  wishing  to  modify and/or extend or to just understand the
81       internals of the nameservice facility however are strongly  advised  to
82       read it.
83

BUGS, IDEAS, FEEDBACK

85       This  document,  and the package it describes, will undoubtedly contain
86       bugs and other problems.  Please report such in the  category  nameserv
87       of  the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist].  Please
88       also report any ideas for enhancements you may have for either  package
89       and/or documentation.
90
91       When proposing code changes, please provide unified diffs, i.e the out‐
92       put of diff -u.
93
94       Note further that  attachments  are  strongly  preferred  over  inlined
95       patches.  Attachments  can  be  made  by  going to the Edit form of the
96       ticket immediately after its creation, and  then  using  the  left-most
97       button in the secondary navigation bar.
98

SEE ALSO

100       nameserv(n),  nameserv::auto(n),  nameserv::common(n), nameserv::proto‐
101       col(n), nameserv::server(n), nnsd(n), nss(n)
102

KEYWORDS

104       client, name service, server
105

CATEGORY

107       Networking
108
110       Copyright (c) 2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>
111
112
113
114
115tcllib                                1.0                         nns_intro(n)
Impressum