UP | HOME
2020-01-21, 2020-04-28 | ../../

Distributed Computing Course Projects

Table of Contents

1 Prerequisites

  1. We will try to fill you in on the missing prerequisites. Please fill out the following survey ../Overview/survey.html

1.1 Languages

  1. It is assumed that you are fluent in Java, and C++/C.
  2. It is not assumed that you are familiar with either RPC or RMI, Scala or Akka.

1.2 Programs v Processes

  1. Conceptually you must have a pretty good understanding of Programs-v-Processes.
  2. Both theory and (Linux) practice.

1.3 Linux

  1. We use Linux – any distro. We will not be using Windows.
  2. This course expects that you are already comfortable in the use of networked machines based on Linux and X GUI.
  3. Be able to remote login via ssh into a machine without having to give a password each time. Set up pub/private keys for your self.
  4. Linux process-related system calls, in particular, alarm, fork, pipes, signals and some bash scripting.

1.4 Assertions

  1. This course uses assertions written in logic (generalized Boolean exp) heavily.
  2. There will be lecture(s) on assertions; see ../FormalMethods/.
  3. But, do become familiar on your own with assert.h of C/C++ https://en.wikipedia.org/wiki/Assert.h.

2 Overview

  1. The projects are required. Not producing demonstrable (even if faulty) projects will award you a grade no better than an F in the whole course regardless of your performance in the exams.
  2. The projects must be work done by you as a single individual. Do not use code from other sources, not even if it was given by the instructor in a past term.
  3. The projects are evaluated both by a demo and by skimming the source code and associated documentation.

3 The Idea of a Digital WhiteBoard

  1. Our whiteboard (WB) is a digital interactive version of a typical class room whiteboard mounted on a wall but allowing multiple people, geographically distant, to simultaneously use the board. There are many open source and commercial implementations of this idea.
  2. To keep our project size within 1500 lines of code, we drastically simplified the WBs to (i) draw no more than zig-zag lines, and (ii) no text display. The multiple people are just you remotely working from multiple (virtual) machines.

3.1 WhiteBoard #1

  1. A whiteboard, say b0, is a window of colored zig-zag lines produced by different clients who are on the board. Clients can join/leave an existing board, or create a new board.
  2. A server S1 handles all the clients that share a given board b0, and has in general multiple boards, b0, b1,… There can be many servers, S1, S2, …
  3. A whiteboard is not shared among servers. For load balancing or whatever, a server may transfer a board (and all clients on it) to another server.

3.2 WhiteBoard #2

  1. Conceptually, the servers and clients are on whatever network nodes you wish. Obviously, firewalls etc, should permit communication among our nodes.
  2. We will give a demo, during the first week, to make all this familiar.

4 Project P0: Tasks 5% weight

We will give a P0.tar.gz (A Startup WhiteBoard Src Code Bundle) by Dr Mateti. Depending on the background of the students registered, this will be in one of C++, Java/Kotlin, or Go.

The P0 will be a tiny collection of client-server programs using

  1. C++ and RPC
  2. Java RMI and/or Jini, JavaSpaces
  3. Distributed PLs: Erlang, Go, and/or Scala

that implement the WB client-server paradigm, depending on the PL. These, as given, have only one server, but can have multiple boards and clients.

In P0, we are not using "threads". We do use multiple processes. And, several "machines".

4.1 Getting Started with P0

  1. For now, we assume P0 was given in C++. See ./WB-C-RPC/ to get an overview of the directory.
  2. Here is a ./WB-C-RPC/html/ web-browse-able version of the P0 source generated by http://www.doxygen.com .
  3. Study the source code closely. P0 is 800+ lines. You should become so familiar with it as if you wrote it. Read through this entire page: ../Projects/WB-C-RPC/0README.html

4.2 First Task: Build P0

  1. Your first task is to make the C++/X/RPC version so that the server is on one machine (node), and there are at least four clients on four different nodes (different CPUs?) and two different whiteboards.
  2. Read the ./WB-C-RPC/0README.html to get an overview. You are given a working version bundle of source code of the P0. Untar this (tar xvvf tarBall.tbz), and do a make.
  3. We expect no errors inherently present in the bundle. Any errors you run into are likely to be due to your build environment.
  4. You will find ./WB-C-RPC/wbadmin.c useful after you have begun working with P1.

4.3 Second Task: Run P0

  1. Your second task is to run the C++/X/RPC version so that the server is on one machine (node), and there are at least four clients on four different nodes (different CPUs?) and two different whiteboards.
  2. The P0 C++/RPC version of our WB project expects that the Linux setup is as follows. See Linux Setup for further details.
  3. rpcbind is running with option -i. Read the man page for details.
  4. Xorg/X server must not disable listening to TCP – The option -nolistentcp should not be present.
  5. Be able to remote login via ssh into a machine without having to give a password each time. Set up pub/private keys for your self.

4.4 Second Task: Assertions

  1. Your second task is to write entry- and exit assertions for most of the procedures and functions of P0. First, in English prose, and then in PL Boolean expressions.

5 C-RPC-WhiteBoard Project P1 10%

  1. Extend P0 to P1. Extend the clients and server(s) as follows. The percentages shown below are the associated weights in grading.
  2. WB server now responds to messages from a new ``client'' that we call wbadmin. A simple example of wbadmin.c is included in the source code. 10%
  3. Server must respond to a query with full information (name of the board, names of the host machines where the boards are in use, etc.) regarding all its whiteboards. 15%
  4. Server must respond to a request to initiate a new server on a given node. The newly given node may be the same node as that of an existing server. The newly created server begins its life with no boards to serve. 25%
  5. A server must respond to a request to transfer a given whiteboard (and hence all clients on it) from one server to another. This transfer should be transparent to the users of the clients. 25%
  6. Add usable pre- post-conditions to all (old and new) functions/ procedures/ methods. 25%
  7. Further clarifications, as needed, will be found on our discussion board.
  8. Design and implement the extensions described above in C++ and RPC. We are naming this version P1.

6 Java RMI: P2 10%

  1. Re-do/ re-design the P1 above but using Java, and RMI.
  2. ../RPC+RMI/java-rmi.html Further details. Required Readings listed there.

7 Scala + Akka: P3 10%

  1. Ideal Goal: Re-do/ re-design the P1 above but using [Scala and] Akka Actors.
  2. But, we had to face Covid-19 driven campus shutdown, lockdowns, etc. So, here are the new choices. The 10% of this project is divided as shown.
  3. 5% Learn some amount of Scala. Install a recent version of Scala. Show that (i) the well-known "Hello World" works in the REPL. (ii) The code given at https://rosettacode.org/wiki/Sort_an_integer_array#Scala works when compiled and run. (iii) Rewrite this using your own Quick Sort. That is, without using the scala.util.Sorting.quickSort(array) or any other sorting library method. Read my lecture notes on Scala. ../Languages/Scala/index.html
  4. 5% Learn some amount of Akka via Scala. Install version 2.6.4 or later of Akka. Show that the well-known Dining Philosophers Problem works in Akka. A web search will show that there are many blogs "solving" this problem. Fix their code so that it (first the problem, and then a solution) works in current Akka. You may use FSM or some other technique. Read my lecture notes on Akka. ../Akka/index.html

8 Turnins and Demos

8.1 Demos

  1. When you are done you must give me a demo of your program. You will get just one chance. It is over in about 5 minutes, typically. I may ask you to rebuild the program prior to the demo, but have it ready-to-run. We expect some of our class students as audience. Read through the acceptance test linked below.
  2. This is not a software engineering class. Bugs are tolerated. There is no teamwork.
  3. But your project must be demonstrable and must satisfy the acceptance test.
  4. Graded on a very coarse (not fine) basis.

8.2 Turnins

  1. The due dates and project weights are on the course home page. For each of the above, turn in a brief PDF report, with an overview of how you did it. Include screenshots that show that the WB Acceptance Test was passed. Also, turnin the tar ball of your source code.
  2. Applicable at WSU {Login to thor.cs.wright.edu. Using the command line ~ceg737000/turnin P1 fileNames. Change P1 to P0, P2 or P3 as needed.}
  3. Revised to suit IIIT-Delhi. Submit to the Google Classroom.
  4. Submit files with your changes clearly pointed out/ marked/ highlighted.
  5. Submit your ReadMe.txt, not my 0README.*. Include this in your PDF.

9 Links

  1. ./Linux-Setup.html Linux Setup. Help with Linux for our WhiteBoard RPC projects (P0 and P1).
  2. ./7370-WB-C-RPC/ of the WhiteBoard C RPC projects P0, the src code bundle expanded for use in lectures. Download ./WB-C-RPC-2020.tbz
  3. ./WB-Java-RMI/ Java RMI version of P0. Download ./WB-Java-RMI-2020.tbz
  4. ./accept-test.html Acceptance Test. Before the demo, verify that it will pass this text.

Copyright © 2020 • pmateti@iiitd.ac.in • 2020-01-21, 2020-04-28