Project 2: Raft Revisions and Replicated Shell

This project has two components. First, you will revise the code you wrote for Project 1 based on the feedback you received in code reviews. Second, you will add a persistent log to your Raft implementation and use the replicated log to build a simple replicated state machine that executes shell commands.

Code revisions

Modify and refactor your Raft implementation based on the feedback you received from code reviews. I expect you to fix all of the issues that I raised in my code review (check with me if you don't think it is possible or reasonable to deal with some of my requests). My overall review comments include a few larger tasks as well. You should also incorporate most or all of the suggestions you received from other students. If you get conflicting comments from different reviewers, you can decide how to handle them (but check with me before going against any of my suggestions). You will need to make many small changes, such as improving comments, but most of you will also need to make significant changes to some of your interfaces, which will have more global ramifications.

Your overall goal should be to make your code as clean and simple as possible. Now that you've gotten feedback and had a chance to hear how other groups solved the same problems, you should have lots of ideas for how to improve your design. For example, you should refactor your abstractions to provide the simplest possible interfaces to your classes, with the best possible information hiding. Also, make your code as easy to read as possible; to do this you will need good documentation as well as a clean class structure.

Before refactoring your existing code, I recommend doing at least a rough design for the new features described below: their needs may suggest additional changes to make in the structure of your code.

Create a file changes in the top-level directory of your repository, which briefly describes the most significant ways in which you improved your Project 1 code for Project 2 (what you changed, at a high level, and why you did it). This file can be relatively short (10-20 lines): it's intended to make it easier for reviewers to find the most important changes.

Replicated shell

In addition to revising your code based on the Project 1 reviews, you will also add new features to your Raft implementation; this will give you a opportunity to apply some of the design lessons you learned during Project 1. In this project you will create a simple replicated shell: when a user types shell commands in a client application, they will be forwarded to the Raft state machine, replicated in all of the logs, and then executed as shell commands on each of the Raft servers. The new code for this project must include the following:

Additional Notes and Requirements

Submitting Your Project

To submit your project, push all of your changes to GitHub on the project2 branch and then create a pull request. The base for the pull request should be your master branch (which now contains all of your work up through Project 1) and the comparison branch should be the head of your project2 branch. Use "Project 2" as the title for your pull request. If your project is not completely functional at the time you submit, describe what is and isn't working in the comments for the pull request. Don't forget to include a changes file as described above.

Late Days

If you are planning to use late days for this project (or any project) please send me an email before the project deadline so that I know how many late days you plan to use.