Java代写 | 18-441/741: Computer Networks Project 2: Content Distribution

本次Java代写是创建一个覆盖网络,该网络连接复制通用内容的计算机

18-441/741: Computer Networks
Project 2: Content Distribution

1. Introduction
Content in the Internet is not exclusive to one computer. For instance, an episode of your favorite
sitcom on Netflix will not be stored on one computer, but a network of multiple machines. In this project,
you will create an overlay network that connects machines that replicate common content. You will
implement a simple link-state routing protocol for the network. We could then use the obtained
distance metric to improve our transport efficiency.
2. Project Tasks
Your main goal is to create a program ./contentserver. You should feel free to implement contentserver
in C or Java but include a makefile/build.xml to ensure we can correctly compile the code.
After initial configuration, ./contentserver needs to wait for additional input via the keyboard.
3.1 Configuration File
Your node should be able to read a configuration file (by default) “node.conf” located in the same
directory in which we execute the server. Alternatively, you should be able to take any configuration file
provided with –c option when we execute the peer process (e.g. with a command-line
./contentserver –c node.conf ) Here is an example of a node.conf:
2 Computer Networks| 18-441/741
uuid = f94fc272-5611-4a61-8b27-de7fe233797f
name = node1
backend_port = 18346
peer_count = 2
peer_0 = 24f22a83-16f4-4bd5-af63-9b5c6e979dbb,pi.ece.cmu.edu ,18346,10
peer_1 = 3d2f4e34-6d21-4dda-aa78-796e3507903c,mu.ece.cmu.edu ,18346,20
These are the optional details. You could assume that the configuration file will be well-formatted.
However, all fields are optional. If the uuid option does not exist, you must generate a new UUID (see
3.1) and update the configuration file (either node.conf or those specified in –c parameter) with the
generated identifier.
– uuid – The node’s unique identifier (see 3.1, default: not-specified)
– name – A user-friendly name used to call the node
– backend_port – Back-end port of the node (UDP-Transport backend, default:18346)
– active_metric, extended_neighbors – (see extra credit, default: 0)
– peer_count – the number of neighbors specified in this configuration (default: 0) This option will
follow by exactly peer_count lines providing peer information.
– peer_x = uuid,hostname(or ip address),backend port,distance metric
A comma-separated value listing initial neighbors for this node and their distance metrics
3.2 Node Identifier
Each peer node should have a unique identification. A Universally Unique Identifier is a 16-byte (128-bit)
number, which could be used to uniquely, identified information without the need of central
coordination. The UUID should be generated upon the creation of each peer node. It should be persisted
in the configuration file so that we can identify the same node across restart.
You could execute ‘uuidgen’ command to generate a new UUID. For this project, you could use
java.util.UUID.randomUUID or uuid_generate/uuid_unparse provided by libuuid (include
/usr/include/uuid/uuid.h and compile with -luuid). The libraries are available on the cluster.
Keyboard Input:
uuid<newline>
Response: the uuid of the current node, e.g:
{“uuid”:“f94fc272-5611-4a61-8b27-de7fe233797f”}
3.3 Reachability
You should add additional message to your backend; A Keepalive message. The purpose of such
message is to notify your neighbor that you can still reach them. For example, each node could send out
a keepalive message to its neighbor every 10 seconds. A neighbor could be declared as unreachable if
we miss three consecutive keepalive messages.


程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: [email protected]  微信:itcsdx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

blank

发表评论