1nns_intro(n) Name service facility nns_intro(n)
2
3
4
5______________________________________________________________________________
6
8 nns_intro - Name service facility, introduction
9
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
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
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
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
85 This document, will undoubtedly contain bugs and other problems.
86 Please report such in the category nameserv of the Tcllib SF Trackers
87 [http://sourceforge.net/tracker/?group_id=12883]. Please also report
88 any ideas for enhancements you may have for either package and/or docu‐
89 mentation. Please also report any ideas for enhancements you may have.
90
92 nameserv(n), nameserv::auto(n), nameserv::common(n), nameserv::proto‐
93 col(n), nameserv::server(n), nnsd(n), nss(n)
94
96 client, name service, server
97
99 Copyright (c) 2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>
100
101
102
103
104nns 1.0 nns_intro(n)