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 with reference to the
implementation outline in your answer to Exercise 5.16.

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.

Computer Science & Information Technology

You might also like to view...

A parameter query displays a dialog box that prompts the user to enter one or more values when the query is run. ____________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

____ Web sites provide access to specic types of useful information, such as maps and driving directions.

A. Educational B. Reference C. News D. Product information

Computer Science & Information Technology