Server Smalltalk Guide


Getting started with SST

Most object-oriented languages use message passing as the basis for object interaction. Message passing is also used for distributed computing. SST combines these to enable remote messages to be sent between Smalltalk images or other components of a distributed system. In that sense, SST is similar to systems such as CORBA and Java RMI.

SST differs in that it addresses distributed architectures which vary more widely as to the following:

SST enables all of these capabilities within a common coding infrastructure or framework. The key components of the framework include--

The figure below shows the roles of these components in message passing. In the figure, a message is being sent from the upper system to an object in the lower system. On detecting an attempt to send a message to a remote system, SST asks an invocation handler to invoke the desired method on the desired machine. The handler asks its associated dispatcher for the best way to send the message. Having determined this the handler passes the message to its marshaler which converts the objects into a series of bytes. During marshaling the object space is used to manage such things as object identity. The marshaled bytes are then passed by the handler to be sent by its transport to the system hosting the ultimate receiver of the Smalltalk message.

A similar algorithm is followed on the receiving side. When the receiving system detects the arrival of an incoming message it passes the received bytes to an invocation handler for processing. The handler asks its marshaler to convert the bytes to objects (that is, a Smalltalk message object) in conjunction with its object space. The dispatcher is used to find the best process for handling the message. Having made all the correct preparations, the received message is sent to the intended receiver within the handler's running image and a result is obtained. The interactions for sending a reply are similar, but with the direction of the arrows reversed.
hssst1

The invocation handler is the core of the framework. It ties the SST mechanism together, and coordinates the activities of the marshaler, transport and dispatcher components. You implement varying behaviors by plugging different components into the framework. For example, using a marshaler which dumps whole object graphs (for example, the Swapper) effects a pass-by-value system. In contrast, a different marshaler might trim the object graph replacing subgraphs with remote references. Using such a marshaler results in a pass-by-reference messaging system.

SST supports a number of different communications mechanisms or transports for transmitting and receiving messages. These are typically orthogonal to the other components and so can be mixed and matched freely. For example by-reference messaging over TCP is one such communications mechanisms.

This high degree of flexibility makes SST useful, but more challenging to use. To address this, SST provides explicit configuration objects which manage combinations of components and parameter settings (configuration options). Major SST components such as spaces and invocation handlers have corresponding specialized configuration objects. SST provides examples and defaults for these configurations so the burden on you is limited. In fact, most users will never have to deal directly with the configuration settings but rather will simply use pre-built configurations.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]