当前位置:主页 > 资讯 > 正文
代写EE450 Socket留学生程序、EE450 实验作业
来源:未知作者:快讯2019-11-25 08:37:28

代写EE450 Socket留学生程序、EE450 Socket tcp实验作业代写代做、代做ocket Programming作业

EE450 Socket Programming Project
Fall 2019
Due Date:
Friday, November 29, 2019 11:59 PM
(Hard Deadline, Strictly Enforced)
The deadline is for both on-campus and DEN off-campus students.
1
ACADEMIC INTEGRITY
All students are expected to write all their code on their own.
Copying code from friends is called plagiarism not collaboration and will result in an “F” for the 
entire course. Any libraries or pieces of code that you use and you did not write must be listed in 
your README file. All programs will be compared with automated tools to detect similarities; 
examples of code copying will get an “F” for the course. 
IF YOU HAVE ANY QUESTIONS ABOUT WHAT IS OR ISN’T ALLOWED ABOUT 
PLAGIARISM, TALK TO THE TA. “I didn’t know” is not an excuse.
2
OBJECTIVE
The objective of this assignment is to familiarize you with UNIX socket programming. This 
assignment is worth 10% of your overall grade in this course. It is an individual assignment and 
no collaborations are allowed. Any cheating will result in an automatic F in the course (not 
just in the assignment).
If you have any doubts/questions, post your questions on Piazza. You must discuss all project 
related issues on Piazza. We will give those who actively help others out by answering questions 
on Piazza up to 10 bonus points to the project.
You can ask TAs any question about the content of the project but TAs have right to reject 
your request for debugging.
3
PROBLEM STATEMENT

file named map.txt storing the map information of the city. The AWS server interfaces with the 
client to receive his query and to return the computed answer. The backend servers, A and B,
perform the actual shortest path and transmission delay computation based on the message
forwarded by AWS server. 


The map information of the city is stored in a file named map.txt, stored in ServerA. The map.txt 
file contains information of multiple maps (i.e. graphs), where each map can be considered as a 
community of the city. Within each map, the edge and vertex information are further specified, 
where an edge represents a communication link. We assume edges belonging to the same map 
have identical propagation speed and transmission speed. 
The format of map.txt is defined as follows:
Example: A
10
10
0 1 10
0 2 15
1 2 20
B
20
1

10
A 0 1 2 15 20 20 B 0 1 2 153
25
Note:
1. For each map, number of vertices is between 1 and 10
2. We consider undirected, simple graphs:
a. There are no repeated edges or self-loops
b. An edge (p,q) in the graph means p and q are mutual neighbors
3. Units:
a. Propagation speed: km/s
b. Transmission speed: Bytes/s
c. Distance: km
We provide a sample map.txt for you as a reference. We will use another map.txt for grading, so 
you are advised to prepare your own map files for testing purposes.
Source Code Files
Your implementation should include the source code files described below, for each component 
of the system.
1. AWS: The server can be viewed as a much simplified Amazon Web Service server. You must 
name your code file: aws.c or aws.cc or aws.cpp (all small letters). Also you must name the 
corresponding header file (if you have one; it is not mandatory) aws.h (all small letters).
2. Backend-Server A and B: You must use one of these names for this piece of code: server#.c
or server#.cc or server#.cpp (all small letters except for #). Also you must name the 
corresponding header file (if you have one; it is not mandatory) server#.h (all small letters, 
except for #). The “#” character must be replaced by the server identifier (i.e. A or B).
3. Client: The name for this piece of code must be client.c or client.cc or client.cpp (all small 
letters) and the header file (if you have one; it is not mandatory) must be called client.h (all 
small letters).
Note: Your compilation should generate separate executable files for each of the components listed 
above.
6
DETAILED EXPLANATION
Phase 1 (10 points)
Boot up: 5 points

(Between two input arguments, there should be a space)
For example, if the client wants to calculate the end to end delay of each shortest path from source 
vertex 1 to any other vertices in Map A, with file size of 10 bits, then the command should be:

After booting up, the client establishes TCP connections with AWS. After successfully 
establishing the connection, the client sends the input (map ID, source vertex index and file size)
to AWS. Once this is sent, the client should print a message in a specific format. This ends Phase 
1 and we now proceed to Phase 2.
7
Phase 2 (40 points+20 points)
In Phase 1, you read the input arguments from the client and send them to the AWS server over a 
TCP connection. Now in phase 2, this AWS server will send selected input value(s) to the back￾server A and B, depending on their functionalities. 
The communication between the AWS server and both the backend servers is via UDP. The port 
numbers used by servers A and B are specified in Table 3. Since both the servers will run on the 
same machine in our project, both have the same IP address (the IP address of localhost is usually 
127.0.0.1).
In Phase 2A, {map construction} operation will be implemented. In Phase 2B, the {path finding} 
operation will be implemented. In Phase 2C, the {calculation} operation will be implemented (see 
Table. 2).
Note that all messages required to be printed for the client, AWS server and backend server A, B 
can be found in the format given in the ON SCREEN MESSAGES table. You can also check the 
example output in the following part for reference. Please try your best to follow the exact format 
when you print out the result.
You are not required to have exact named functions (map construction, path finding, and 
calculation) in your code. These operation is named and divided to make the process clear. And 
as shown in the instruction, Phase 2A and 2B will together contribute to 40 points when your 
project is graded.
Phase 2A (2A + 2B = 40 points)
Phase 2A begins when the backend server A boots up. Afterwards, server A will execute the {map 
construction} operation and read the map data file (map.txt, see the problem statement section).
Reading this file will allow A to construct a list of maps. Every map will be identified by its unique 
ID. After Phase 2A, backend server A will keep this list so that the client can query on any map in 
this list. AWS will then wait for appropriate user input to let server A perform the {path finding}
operation.
Phase 2B (2A + 2B = 40 points)
Phase 2B is initiated when AWS receives all required data from the client. The AWS will forward 
t
d

因为专业,所以值得信赖。如有需要,请加QQ:99515681或邮箱:99515681@qq.com 微信:codehelp


[责任编辑:快讯]