Code Monkey home page Code Monkey logo

677lablet1's Introduction

677lablet1

Open in Visual Studio Code

Lablet 1: Communication in Distributed Systems

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.

Question 1: Socket Programming

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.

Question 2: Java RMI

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.

Question 3: Python Remote Objects (pyro5)

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.

Question 4: gRPC

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.

Question 5 (Optional): RPC in the C

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.

What to submit?

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.

677lablet1's People

Contributors

zexiwang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.