4.3 The shell pattern

The shell pattern is a subpattern of remoteable describing executables whose instances are processes. Shells should only be instantiated through ensemble.createShell or as part of distributed BETA programs started from the commandline [6]. The shell pattern adds the following attributes to remoteable:

The shellType virtual attribute of shellEnv may be further bound in an application program. shellType is used as the type of the static theShell partobject of shellEnv. This instance should be the only shell instance created in a distributed BETA program. Exporting a reference to theShell to a remote shell gives the remote shell the ability to kill the local process by calling the kill attribute of theShell. Furthermore, theShell is the object whose reference is returned from ensemble.createShell after the creation of a new shell process. A distributed BETA program is not obliged to further bind the shellType virtual unless it is going to export a reference to theShell offering more functionality than the standard Shell pattern [7].

The INNER part of a shell has to pause once in a while for shellEnv to be able to handle incoming requests from distribution partners. This is due to the non-preemptive multitasking used. Even if INNER terminates, the process will not terminate before kill has been called.


[6] In practice, these cases boil down to the same thing
[7] Neither xtalk nor any of the calcClients further bind shellType


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