Assume the Election service isimplemented in RMI and must ensure that all votes are safely stored even when the server process crashes. Explain how this can be achieved.
What will be an ideal response?
The state of the server must be recorded in persistent storage so that it can be recovered when the server is restarted. It is essential that every successful vote is recorded in persistent storage before the client request is acknowledged.
A simple method is to serialize the Vector of votes to a file after each vote is cast. A more efficient method would append the serialized votes incrementally to a file. Recovery will consist of de-serializing the file and recreating a new vector.
You might also like to view...
Which of the following is NOT true about adding and stacking fields?
A) When a control is selected, Access outlines the control in yellow. B) When you add an existing field, Access adds two controls. C) If you use your pointer to move the control, without clicking on the move handle, you will move both controls at the same time. D) If you click the move handle, you will move just one control.
To combine several effects, use the Effect class's __________ method.
a. setInput b. combineEffect c. addEffect d. Effects cannot be combined.