Skip to content

Replicating server functions to make the system persistent and 2-fault tolerant. Third design project for CS 262 @ Harvard.

License

Notifications You must be signed in to change notification settings

hcs-t4sg/Replication

 
 

Repository files navigation

SimpleChat

A client/server application for a simple chat service. The first design project for CS 262 @ Harvard

How to Use

Preparation + Launching Server / Client

The user first clones this repository, then installs the required dependencies using pip install -r requirements.txt. Then, navigate to whichever part you want to run (part 1 is the socket implementation and part 2 is the gRPC implementation) launch run the server either in the background (python server.py) or in another terminal. Then run your client in another terminal using (python client.py [server_ip]). Note that after launching, the server will display the ip it is running on, which must be used as the argument for the script launching the client.

UI:

After you launch the client, you will be shown a menu with seven options:

  1. Create Account
  2. List all Accounts
  3. List Account by Wildcard
  4. Delete Account
  5. Login
  6. Send Message
  7. Logout + Exit

The user then types a number specifying the option they want. After that, they specify the arguments. The client sends a message to the server, the server performs the requested action, and reports back the status of the request back to the client. The user can keep on specifying options as they please. Once the user is done, they can exit by typing 7

Running Tests

You can test the client server interaction by navigating to either the part1 or part2 subdirectory and running ./launch_test.sh. The script will launch a test will simulate launching a server and client and report whether it can perform the essential functions.

About

Replicating server functions to make the system persistent and 2-fault tolerant. Third design project for CS 262 @ Harvard.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 52.0%
  • Python 47.7%
  • Shell 0.3%