less than 1 minute read

Server

Server interacts with Clerk.

Clerk sends RPC requests to Server. Server submits the command to Raft.

If the command is successfully committed, Server returns the result to Clerk. Else, it returns error to Clerk.

Clerk retries if it’s not sending to the leader, or if Server returns error.

Client

Client interacts with Clerk.

They send RPC requests to Clerk.

Task 1

Add RPC-sending code to the Clerk Put/Append/Get methods in client.go, and implement PutAppend() and Get() RPC handlers in server.go.

Task 2

可能有两种情况: