SCC.311 Coursework Stage 3 Specification [Revision 1]


Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due


SCC.311 Coursework Stage 3 Specification [Revision 1]

Due: Friday Week 9, 4 pm via Moodle
Total mark allocation: 45%

Level 5: Passive Replication (20%)

To ensure the dependability of the auctioning system, you are required to enhance the availability of your system by using replication techniques. You should implement a passive replication system to meet these requirements, thereby increasing dependability. Please refer to the lectures for the definition of passive replication.

The server implementation should have at least three replicas and allow the user to easily add a new replica. You must design your server program so that any replica can function as the primaryreplica. The clients will communicate with a stateless front-end program which should then simply forward client requests to the primary replica (Note: the only acceptable state to maintain by the front-end is the IDs of one or more replicas if needed). Your front end should initially pick one replica and keep using that replica as the primary replica until it fails.

The primary replica must ensure that all replicas maintain a consistent view of the auction data before responding to each request. Your front-end is required to implement the Auction interface, and you can choose for yourself exactly how the front end and replicas interact.

Requirements: Each replica must run in a separate process, and your replica server program must support a command-line parameter to assign a unique identifier (i.e., an integer) to each replica. For example, you should be able to start a replica from the command line with ID 1 as shown below:

➢ java Replica 1
Your front-end must use the exact interface as shown below (same as Level 3), which introduces a new method getPrimaryReplicaID() that returns the identifier of the replica that is the current primary.

public interface Auction extends Remote {

public int register(String email)throws RemoteException;
public AuctionItem getSpec(int itemID) throws
RemoteException;
public int newAuction(int userID, AuctionSaleItem item)
throws RemoteException;
public AuctionItem[] listItems() throws RemoteException;
public AuctionResult closeAuction(int userID, int itemID)
throws RemoteException;public boolean bid(int userID, int itemID, int price)
throws RemoteException;
public int getPrimaryReplicaID() throws RemoteException;
}

Level 6: Fault Tolerance (25%)

The server replicas may crash unexpectedly due to either hardware or software faults. Your solution should be able to handle such failures.

Your system must maintain liveness even when the automated testing system kills all but one ofthe replicas (including the primary replica). Even when the current primary replica fails, yoursystem should continue functioning correctly. Your system should also allow replicas to recoverand re-join the system.

Ideally, your system should work even with a complete replica turnover; that is, you want yoursystem to start with three replicas (say with IDs 1, 2, and 3), add another replica (with ID 4), killall original replicas (with IDs 1, 2, 3) and have the system continue to function correctly.

A recovering replica, upon re-joining, must synchronise with the system and become fully up-to date as quickly as possible. The recovery process must not depend on the arrival of client requests to trigger synchronisation. This ensures the recovered replica can seamlessly serve requests and potentially take over as the primary replica without delay. Your design should prioritise an efficient recovery process that minimises downtime and ensures the consistency and correctness of the recovered replica. Replicas must not use permanent storage (i.e., disk) to store their state.

Your front-end should initially pick a replica as the primary replica, and only in the event of a failure detection, the front-end should select a different (i.e., a working) replica as the primary.

You must make sure that getPrimaryReplicaID() returns the identifier of your current primary replica.

You should avoid mechanisms such as frequent polling, heartbeats or other periodic tests to detect replica crashes or inconsistencies. Instead, failure detection should rely on reactive mechanisms triggered by significant events during the system's normal operation. For example, a failure might be detected and acted upon when communication with a replica fails while processing a client request, rather than through periodic checks. This approach minimises unnecessary messaging overhead and ensures that your system remains efficient and scales well with the number of replicas.

Coursework submission instructions

Your coursework will be marked using an automated test system. For the test system to work properly, your submission must be contained in a zip file and have the following:

1. A shell script called server.sh in the root directory of your submission, which performs any set of operations necessary to get your front-end and at least three replicas (each with a unique ID) running.
2. An RMI service advertised with the name “FrontEnd”.
3. An RMI interface which exactly matches the specification given in this document.
4. Your entire system must be up and running within 5 seconds (our test client is launched five seconds after your server.sh script)Starting week 8, you can test if your submission is valid by uploading your code in a .zip file, to the web page http://scc-311-24-rock.lancs.ac.uk/partC. This will check whether the above basic checks pass, but does not perform any logic testing or provide any indication of your mark. If our automated testing system is unable to test your code, you would usually receive a mark of zero.

Marking Scheme:

Level 5:
Working code and the correct implementation of passive replication — 15 marks
Correctly perform all the operations, i.e. bid, list, close, etc. using 3 replicas — 5 marks
Level 6:
Handle primary replica failure — 7 marks
Handle multiple replica failures — 8 marks
Handle complete replica turnover — 10 mark

发表评论

电子邮件地址不会被公开。 必填项已用*标注