联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codehelp

您当前位置:首页 >> OS程序OS程序

日期:2020-09-22 07:36

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 -port
will spawn the client process with id 1 and connects to the server. The client can then send a message along with its id to the server.
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%

版权所有:留学生编程辅导网 2021,All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。