This lablet has 4 required questions and one optional question. This is a hands-on tutorial style homework where the goal is to get familiar with distributed systems concepts covered in class (client-server communication using sockets, rpc, rmi and gRPC). We have provided example code for all questions. You can use your own laptop or desktop to run this code. You have also been given accounts on the CICS computer lab called "Edlab" These are linux machines that you can access remotely over ssh. Please use Edlab machines if you have issues running the sample code on your machine or need two machines to run the client and server code.
To understand Berkeley network socket programming, consider the sample code in the socket directory. Modify the client and server code to send a "Hello World" string to the server, receive a reply from the server indicating the string was received (e.g., "Received Hello World"). Run the client and server code on the same machine (e.g., your laptop or desktop) and then use the Edlab machines, or any other second machine available to you, to run the client and server on 2 different machines. You may need to make minor changes to the code to specify the correct server IP address or host name and choose a different port if the one in the sample code is in use.
Look at the sample code in the rmi directory. Using the web page in the readme.txt, go through the getting started tutorial. Follow the steps to run the HelloWorld Server and Client java code in the sample files. First run both the client and server on the same machine. Next, try to run them on two different machines.
Look at the sample code in the pyro5 directory. First, install pyro5
as noted in the
readme file. Then run the simple versions of client and server without a name server as described in
the Pyro tutorial web page in the readme. Finally start the pyro name server and run the
getting-server.py and getting-client.py version as discussed in the tutorial.
Look at the sample code in the gRPC folder. You can either look at the Python version or the Java version. First install gRPC using pip (for Python version) or build the project using gradle (for Java version) as noted in the readme file. Then run the client and server for gRPC as discussed in the readme file.
This is an optional question. Look at the sample code in the rpc folder. Compile the code using the makefile. Observe how rpcgen generates the stub code and then compiles it with the client and server. View the auto generated code (C files that are generated by make) to get a sense of what the stub code looks like (you don't need to understand it, just get a sense of the process). Finally run the client and the server.
This is a tutorial-style assignment where we have provided most of the code for you. The goal is to learn the concepts by reading the code and running it. In some cases, minor modifications may be needed to get the code to run in your environment.
You can turn in your modified github repo via github classroom. In each folder, you should include the modified code (if modifications were needed) and an output.txt file should be present showing the sample text output produced by your program for that question. In addition, you will make a submission on gradescope once done. You will get full credit if you simply complete the required questions.