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.

Computer Science & Information Technology

You might also like to view...

To implicitly overload the += operator:

a. Only the + operator needs to be overloaded. b. Only the = operator needs to be overloaded. c. Both the + and = operators need to be overloaded. d. The += operator cannot be overloaded implicitly.

Computer Science & Information Technology

What is the guideline for calculating an acceptable line measure?

What will be an ideal response?

Computer Science & Information Technology

When copying information from Excel and pasting it into PowerPoint, you can keep only the text and eliminate the worksheet grid

Indicate whether the statement is true or false

Computer Science & Information Technology

The ____ is one of Photoshop's greatest features because it allows you to segregate various art components onto different virtual layers within a single document.

A. Tools panel B. Layers panel C. Photos panel D. Document panel

Computer Science & Information Technology