Server Smalltalk Guide
SstDgcConfiguration objects are used to configure instances
of SstDgc. As with other configuration objects, they are
used to instantiate SstDgc. There are six aspects which may
be configured:
- automaticInitiation
- Controls whether the DGC automatically requests iteration initiation once
a threshold is passed. The default is true.
- initiationThreshold
- Specifies the amount by which the number of exports may grow after an
iteration concludes before a new iteration is automatically requested.
The default is 100.
- iterationTimeout
- Specifies the maximum number of seconds one DGC iteration can take.
This is used to prevent iterations lasting indefinitely and to detect
failure. If an iteration is not completed inside this time period, it
is assumed to have failed and each participant enacts its failure recovery
mechanisms. The setting of this parameter must allow for normal
iteration completion times which depend on the number of participating spaces
and the communications characteristics. The default setting is 120
seconds.
-
- Set the iterationTimeout well in excess of twice the
messageArrivalDelay. If this is not done, iterations may
timeout and fail while DGC objects are still delayed awaiting message
arrival. It is your responsibility to ensure that these options are set
correctly.
- messageArrivalDelay
- Specifies the time, in milliseconds, to wait for messages before going to
the next phase of the DGC algorithm. Delaying in order to await message
arrival from other DGC participants at various points in the algorithm can
reduce the number of messages required to complete the iteration. A
rough heuristic to use in setting this parameter is: (average message
time) * 5. Note that this delay is only an optimization, it does not
affect the correctness or efficiency of the algorithm. The default is
1501 milliseconds, which has been determined by tests to be the optimum
delay.
- registrationAttempts
- Specifies the number of times to try to register with the coordinator
during startup. The value must be a positive integer. The
default setting is 6.
- registrationInterval
- Specifies the total time, in seconds, allowed for each registration
attempt. If registration succeeds then startup returns
immediately. Otherwise, if a response has not been received in the time
set by this option, the attempt is aborted and retried (if allowed by the
registrationAttempts option). The integer value of this
option must be >= 1. The default setting is 10 seconds.
An example of using a SstDgcConfiguration object and
instantiating the DGC system is given in the following code:
| context coordinatorSpace configuration |
context := "You supply this".
coordinatorSpace := "You supply this too".
(configuration := SstDgcConfiguration new)
automaticInitiation: true;
initiationThreshold: 50;
messageArrivalDelay: 2000;
iterationTimeout: 60;
registrationAttempts: 2;
registrationInterval: 30.
configuration instantiateIn: context coordinatorSpace: coordinatorSpace.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]