2.3 The NameServer pattern

All object-oriented systems supporting multiple processes need a way to handle the exchange of object references. In distributed BETA, the approach is the provision of an abstract superpattern, the NameServer. In short, a name server simply provides a mapping between textual names and object references. The exact semantics of this mapping depends on the actual subpattern of the abstract NameServer superpattern [2].

The put operation takes a textual name and an object reference as parameters, and saves the association for later retrieval (i.e. registering the object reference).

The get operation in turn retrieves an object reference given its associated name and a pattern reference used for type checking.

Finally, remove deletes an object registration.

Example BETA code exporting a calculator reference to a name server (ns) is shown below.

c: ^calculator;
ns: ^NameServer;
...
(c[],"Simple Calculator")->ns.put;


[2] An abstract superpattern is a pattern supposed to be used only as a superpattern, and not instantiated itself


Distributed Objects in BETA - Reference Manual
© 1993-2004 Mjølner Informatics
[Modified: Monday October 23rd 2000 at 22:18]