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 packages dns and resolv, 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 nnsd provides 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 package nameserv::server. two jobs, main character energy fr
  • complementing this server is the nns client 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 a comm-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, nnslog is a stripped down form of the nns client application 🌸 it is reduced to perform a continuous search for all changes and logs all received events to stdout ✨

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 application nns
  • the second client package, nameserv::auto is 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::common is of no interest to users πŸ™…β™€οΈ it is an internal package containing code and definitions common to the packages nameserv and nameserv::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 (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