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;
Distributed Objects in BETA - Reference Manual | © 1993-2002 Mjølner Informatics |
[Modified: Monday October 23rd 2000 at 22:18]
|