nns_intro(3tcl)
π nns_intro β Name service facility, introduction π
okay bestie, welcome to the nns_intro(3tcl) page, part of the Tcllib manual set π this is the little intro doc that tells you what the whole name service situation is about before you dive into the actual package pages. grab a snack, we're doing a tour πΈ
β¨ NAME β¨
nns_intro β Name service facility, introduction π
π DESCRIPTION π
so. nns β short for nano nameservice, iconic name honestly β is a facility built for the package comm, and what it does is add a simple name service to it π¦ it's also built on top of comm, using it to do the actual exchange of messages between the client and server parts. so comm is literally the whole vibe underneath π
β οΈ real talk: this name service facility has nothing to do with the Internet's Domain Name System, aka DNS. zero. none. not the same thing, don't mix them up π if you're looking for a package that deals with that, please go check out either of the packagesdnsandresolv, both found in Tcllib too π«Ά
Tcllib provides 2 applications and 4 packages which are working together and provide access to the facility at different levels β¨
π APPLICATIONS π
- the application
nnsdprovides a simple name server which can be run by anybody anywhere on their system, as they see fit π it's also an example on the use of the server-side packagenameserv::server. two jobs, main character energy fr - complementing this server is the
nnsclient application. a possible, but no very sensible use would be to enter name/port bindings into a server from a shell script π not sensible, as shell scripts normally do not provide acomm-based service
the only case for this to make some sense would be in a shell script wrapped around a Tcl script FOO which is using comm, to register the listening port used by FOO π however even there it would much more sensible to extend FOO to use the nameservice directly. and in regard on how to that nns can be used as both example and template π
beyond that it may also be useful to perform nameservice queries from shell scripts
- the third application,
nnslogis a stripped down form of thennsclient application πΈ it is reduced to perform a continuous search for all changes and logs all received events tostdoutβ¨
both clients use the nameserv::auto package to automatically hande the loss and restoration of the connection to the server π¦
π§ PACKAGES π§
the two main packages implementing the service are nameserv and nameserv::server, i.e. client and server π the latter has not much of an API, just enough to start, stop, and configure it. see the application nnsd on how to use it π
- the basic client, in package
nameserv, provides the main API to manipulate and query the service π an example of its use is the applicationnns - the second client package,
nameserv::autois API compatible to the basic client, but provides the additional functionality that it will automatically restore data like bound names when the connection to the name service was lost and then reestablished π₯ i.e. it automatically detects the loss of the server and re-enters the data when the server comes back. that's the self-healing queen behavior, we stan π - the package
nameserv::commonis of no interest to users π βοΈ it is an internal package containing code and definitions common to the packagesnameservandnameserv::server
all packages use the uevent package for the reporting of special circumstances via events, and reserve the uevent-tag nameserv for their exclusive use β¨ all their events will be posted to that tag πΈ
π INTERNALS π
the document Name service facility, client/server protocol specifies the protocol used by the packages nameserv and nameserv::server to talk to each other π¬ it is of no interest to users of either the packages or applications π
π developers wishing to modify and/or extend or to just understand the internals of the nameservice facility however are strongly advised to read it. no cap, go read it
π BUGS, IDEAS, FEEDBACK π
this document, and the package it describes, will undoubtedly contain bugs and other problems π not me being honest about it. please report such in the category nameserv of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist π«Ά please also report any ideas for enhancements you may have for either package and/or documentation π
when proposing code changes, please provide unified diffs, i.e the output of diff -u β¨
note further that attachments are strongly preferred over inlined patches π attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar π
π SEE ALSO π
nameserv(3tcl)nameserv::auto(3tcl)nameserv::common(3tcl)nameserv::protocol(3tcl)nameserv::server(3tcl)nnsd(3tcl)nss(3tcl)
π KEYWORDS π
client, name service, server π¦
π CATEGORY π
Networking β
π COPYRIGHT π
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users.sourceforge.net> π
and that's the whole page bestie, you ate it π
this was tcllib 1.0, iykyk β¨ mwah, go forth and name your services πΈπ«Ά
π¦ where this page comes from
- debian bookworm: tcllib 1.21+dfsg-1 Β· BSD
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu jammy: tcllib 1.20+dfsg-1 Β· BSD
- ubuntu noble: tcllib 1.21+dfsg-1 Β· BSD
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms