416 Distributed Systems: Assignment 1Due: Jan 13th at 9PMWinter 2017 |
This assignment is intended to get you started with programming in the Go language. To solve this assignment you will need to install Go, figure out how to compile, run, and debug a Go program, and implement a UDP-based protocol described below. High-level protocol descriptionThere are two kinds of nodes in the system: a client (that you will implement) and a server (that we will implement). The server listens to connections from clients and expects UDP packets containing a single uint32 integer (between 0 and max size of uint32). It responds to each UDP packet with one UDP packet containing a string. This string can have one of three values:
The communication steps for an example run of this protocol are
illustrated in the following space-time diagram: The client's goal is to programatically find the right number that gets the server to return the fortune string. The client should print to standard out the found fortune string followed by a newline and then exit. The client should not print anything else. You will test and debug your solution against the running server instance -- the client is run with two arguments, the UDP IP:port to use locally, and the UDP IP:port of the server. You will not have access to the server's code. Implementation requirements
Solution specWrite a single go program called client.go that acts as a client in the protocol described above. Your program must implement the following command line usage: go run client.go [local UDP ip:port] [server ip:port]
Starter code and testing serverDownload the starter code. The server is running at IP:port 198.162.52.206:4116. SolutionDownload the solution code. Rough grading rubric
Make sure to follow the course collaboration policy and refer to the assignments instructions that detail how to submit your solution. |
|