2020/9/19 CS 2510 Distributed Operating Systems
CS 2510 Computer Operating Systems
Fall 2020 Assignment 1: Group Communication
Description
You will implement a simple client-server “group chat” system with n clients/1-server configuration. Let’s say Alice, Bob and Chad (the three client processes) wants to talk to each other. Alice sends a message to the server, and when Bob and Chad is online, they connect to the server and download the “unread” messages. Your program should allow the clients to send/receive messages from the server. The server keeps track of the clients that has received the messages and only sends the unread messages.
Implementation
You will need a server program (e.g., server.py) that spawns the server process.
For example,
python server.py -client_ids 1,2,3 -port XXXX
will spawn the server and create a group with three clients having client id 1, 2 and 3. Starting server on port XXXX with clients 1, 2, 3
You will also implement a client program (e.g. client.py) that will spawn the client process
For example,
python client.py -client_id 1 -server_ip
Testing
You will provide multiple test cases for your system as driver-test program (e.g., run_test_1.py). The program will spawn the client and server process, and send/receive messages. Sample scenarios to test:
Alice sends a single message. Chad and Bob comes online after a 5 second delay, and receives all messages from Alice. (Log the message in the console)
Alice, Bob, and Chad are online. Bob sends a message to all, Chad and Alice receives the message (The sender Bob doesnt receive the message from the server). Alice sends a message to all, Bob and Chad receives it (but not Alice). Doug, not part of the group, joins the server but receives no message.
Please put appropriate print statements.
Extra credit (10%)
Package your application using docker. You should submit a Dockerfile that will create a container. The docker file will create an image that will have the necessary environment for running the test case. Basically, it will pull an image from the repository, copy your code, and execute the test files. When the docker container is deployed, it will automatically run all the test cases. Submit the Dockerfile as part of your assignment.
Submission
Please your code and your report on Gradescope. Your submission should contain all the code including test cases, and log files of your execution. Your report should document your design choices and implementation and possible improvements to the system (not more than two pages).
Grading criteria
Component %
Implementation 50% Testing and ease of running 30% Code documentation 5% Report 15% Extra credit 10%
https://people.cs.pitt.edu/~stl86/courses/cs2510/assignment1.html 1/1