Implementation based on 'Viewstamped Replication Revisited' by Liskov and Cowling http://pmg.csail.mit.edu/papers/vr-revisited.pdf
- vr.code.service - this package contains all the VR code services including all the RPCs
- vr.code.processes - consist of asynchronous processes like polling the request queue, checking for primary's timeout, etc.
- vr.code.client - consist of the client API invoked by the service code or processes on VR code
- vr.proxy.client - consists of the vr proxy implemetation
RPC are implemented in Thrift
Features Currenlty Supported:
- Normal operation : server accepts concurrent request, buffers in a queue. Replicate it on multiple replica before commiting. Service remains up if f+1 replicas are up.
- View Change: If primary goes down, other replicas start view change protocol.
- state recovery: A new replica joining updates its state to the current log.
Todo: Efficient View Change and recovery Dynamic Reconfiguratation
-
Install Thrift: https://thrift.apache.org/docs/install/
-
Checkout code from this repo
-
Import the maven project in eclipse
-
Update Java compiler in preference to be 1.6 or above
-
Configure server.properties to specify qourom size.
-
Execute server vr.code.service.VRCodeServer with server id as argument (server id = 0,1,2 for 3 server setup )
-
execute Application Client application.client.AppClient and execute request. The application service is a dummy method responding back with the given input.