Startup, shutdown, and restart
SST provides a common interface for startup and shutdown as described in
Startup and shutdown. The interface for components which support startup and shutdown is found in the
IuSstStartable interface.
The start up and shut down of parts of a running distributed system is difficult if not impossible to define in a general way. Each application has different requirements as to its execution state once an image is up and running. The problem is exacerbated by the fact that in Smalltalk, immediately after saving an image the virtual machine may exit or continue processing. That is, very little clean up work can be done at image save time.
Note:
SST does not require that any particular clean up be done at image shutdown time. It is assumed that underlying components such as transport subsystems perform all the correct clean up independently.
To assist in the management of distributed applications, various SST components define options allowing you to control how the components are treated at image restart time. These controls are available on invocation handlers, object spaces, and application contexts.
While the details of each component's options can be found in the relevant section, in general they adhere to the following pattern. The configuration object associated with the component defines a restartMode. The setting of this mode determines the action taken at image restart time. Roughly speaking, the possible actions are:
cleanup
Ensures that any remaining component state does not interfere with the safe restart and running of the image.
clear
Clears out all objects and resources related to the component.
restart
Attempts to restart the component using startUp.
Some components are restartable when an image is saved or started up afresh. Such components conform to the IdSstRestartable interface. The two methods that a component must provide are:
cleanUpOnRestart
Cleans up the receiver from a previous image save. This method is executed during image preStartUp. All you want to do is clear or end anything which might interfere with the image startUp sequence before SST gets a chance to actually start up.
startUpOnRestart
Starts the receiver (or its related component) according to its configured restartMode. This occurs on image restart (image load).
Last modified date: 09/19/2018