Table of Contents
The Cascade NameServer (nserve) provides network name services, information about queues and domains for all registered tasks, and alert messages to registered tasks whenever another task starts or stops on the network. The name server must be started after the Cascade QueueServer, qserve, usually through the sysinit.N startup file. Both of these utilities are started automatically by most Cogent products on startup, if they are not running already.
nserve is used to maintain information about currently running tasks in the Cascade DataHub universe. All names registered on the name server are considered global within the system network, and all names should be unique on the network. This facility cannot be used as a global semaphore due to the race conditions associated with more than one task attempting to use the same name. Tasks whose names do not particularly matter can be made up of a combination of node number and task id.
When a task starts up, it must register a name, queue, and domain with the name server in order to make itself available to other tasks in the system. A task is not strictly obligated to have a queue name, but it will not be able to receive asynchronous messages without one. This initialization is performed through the IP_NserveInit function. The domain of a task may be changed at any time using the IP_TaskSetDomain function.
QNX Note: nserve provides facilities not available through the QNX nameloc program. It uses nameloc to identify itself to the QNX operating system and any Cascade DataHub processes, but the Cascade DataHub processes themselves do not need to register with nameloc. The nserve facility extends nameloc with:
All tasks using nserve must declare a domain. This is a character string of up to 15 characters that differentiates groups of cooperating processes. All processes with the same domain name are considered to be running in the same domain. This differentiation generally only affects the manner in which processes retrieve information from the Cascade DataHub.
Tasks do not need to specify a domain name for points in the DataHub running in that domain. In order to access points in another domain, a process must prepend the domain name followed by a colon to the point name. Similarly, the Cascade DataHub will transmit a point name with the domain name attached when delivering an exception to a task in another domain. For example, if a task is running in the default domain and wishes to read a point, water_level in the control domain's DataHub, it must access that point as control:water_level.
Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.