2.2 The Remoteable pattern

Objects whose methods can be called from objects residing in other processes must be instances of remoteable subpatterns. Remoteable provides a nested pattern, the entry, to be used as a prefix for remotely called methods. For example, a remotely accessible calculator could be defined as follows:

calculator: remoteable
  (# plus: entry
       (# a,b,c: @Integer;
       enter (a,b)
       do a+b -> c
       exit c
       #);
     ...
  #);

In order for a distributed BETA program to provide a calculator service, or some other network service, the program must create an instance of the calculator the usual way. Afterwards the calculator reference can be registered in some nameserver or sent directly to a client shell.


Distributed Objects in BETA - Reference Manual
© 1993-2002 Mjølner Informatics
[Modified: Monday October 23rd 2000 at 11:16]