Registry Service

Connect to the Registry
The namespace presented by a registry service allows users to register a service and query the registry to find out about existing services which have registered with it. A new resource may be registered with the registry service by writing a string containing the address of the service and any attributes to be associated with it to the new file. This string takes the form: address attrname attrval attrname attrval ... where attrname and attrval are the attribute names and values. A number of conventions already exist for these name, value pairs:

Attribute Name Value definitionExample values
protothe communication protocolstyx
auththe authentication requirednone, inf1
resourcethe category of the serviceCamera, Whiteboard
namethe name of the individual serviceY2K, Notepad
persistif 0, only keeps the entry in the registry as long as the new file is held open0, 1

So, for example, to register a camera service called 'Sea View' listening on the address 'tcp!12.345.67.89!1234' and expecting no authentication, the following command would be used: Note: quotes must be used to pass a string containing a space as a single argument as shown in the attribute value 'Sea View'. The new service will now be listed along with existing services in the directory, these service files may be read using cat serviceaddress to return the attributes list.

The index file may be read using cat and returns a list of all the services along with their attributes, the output is identical to reading all of the service files. The find file is used to find services which match a specified list of attributes. The use of this file is quite complex as it requires that writing the attributes to match and reading the results be done in the same open of the file. This can be simply demonstrated using the following command which returns a list of all whiteboard services: