Distributed Systems : Workshop 1

This is the proposed workplan for the Thursday workshop 6.9.2012.

(Note for posteriority: the time estimate was optimistic; we managed to spend 2 hours total on these and not everything got done even then.)

Discussion warmup tasks: work in groups of 2-4.

1. Take turns to teach other members of the group the following terms; provide
examples for increased clarity where you can:
a) transparency
b) heterogeneity
c) openness
d) scalability
e) consistency.

2. Recall the definition of a distributed system given on the course
slides. What kinds of systems does it cover and what is not covered?

3. You will run into these quality of service requirement terms repeatedly, so
take turns to explain them and give examples for each of how a service is
affected when one of the given requirement is not fulfilled (or is fulfilled
only partially):
f) availability,
g) reliability,
h) performance,
i) adaptability,
j) security,
k) correctness

Remember to ask each other questions if the explanation is not clear; you are
probably not the only one who is confused, and a more detailed explanation may
bring up additional questions even to the one making the explanation.

4. Survival skills: IRC and the Scientific Method

A. Set yourself up on the #distsys course channel on IRCnet. Local students can
be very helpful with this task, since many of them got taught this on their
first year.

The popular method is

1) Connect with ssh to one of the interactive servers of the department
(e.g. melkki.cs.helsinki.fi)
2) Run the command 'screen' (user manual: 'man screen')
3) Start the command 'irssi' ('man irssi')
4) In irssi, run the following commands:
(if you are connecting automatically to a server, wait for the server
connection to be set up; if nothing happens run /connect irc.cc.tut.fi )
/join #distsys
Hello world!

B. Learn interesting things about distributed systems while at it:

5) Detach your screen: Press Ctrl+A, then d. (Or alternatively close the
terminal window.)
6) Use Webchat (http://chat.ircnet.org/) to connect to the same IRCnet
channel, #distsys.
7) Find yourself already there, greet yourself confusedly.
8) Close the browser to sign off from webchat.
9) Reattach your screen: ssh to melkki again, and run 'screen -dx' ('d' is
optional).
10) Amaze at the miracle of interprocess communication that just took place.

You may scan http://fuksiwiki.tko-aly.fi/IRC-ohjeet (in Finnish) for potential
useful commands. English instruction pages are welcome.

C. Take a moment to analyze what goes on under the hood.

How was the irssi process able to show what you said on webchat? What does it
take for your second ssh session to be able to show the results of what you did
in the first session and whatever happened in between? What is the role of the
'screen' software here? Formulate your own theories of what went on during this
exercise (consider if you can experimentally test them) and discuss them in the
group.

Survival skills learned:

Ssh (Secure SHell) is a simple but powerful software and protocol for
remotely connecting to other computers. We will be using it again during
this course (and after it).

Linux basics: You should get familiar with the Linux/Unix console, because you
will be needing it repeatedly while here. Manual 'man' pages are generally
available for all command-line software, so it pays to learn to read
them. 'screen' you may find use for later on as well, although it is probably
mostly used as together with IRC clients here... If you have not seen to it
already, you should take the course "Tietokone työvälineenä", "Introduction to
the Use of Computers" that provides a self-study introduction to the department
computer environment.

http://www.cs.helsinki.fi/en/courses/581324/2012/s/k/1

IRC: Internet Relay Chat is popular among the local students, and it is
essentially where help and venting possibilities can be found particularly when
you are working with exercises late at night (or have last-minute issues with
assignments, because your contingency plans for not missing the strict course
deadlines have failed).

5. Survival skills: Your first shell script.

Create a new text file (say, helloworld.sh) and input the following content
into it:

#!/bin/sh

x=5

echo Hello world!

Then save the file, make it executable ('chmod u+x helloworld.sh') and run it
(./helloworld.sh).

Now open the file again, and find out how to make a 'for' loop (to echo 'hello
world' x times) and an 'if' clause in it (to echo 'hello world' only if the
variable x equals 4). Alternatively, you can do this part in Python or whatever
scripting language you are familiar with.

If you find you have problems with this exercise, you should join the C
Programming course as soon as possible to ensure you have the necessary skills
to do the programming exercises on the course. The language used does not matter
so much as the basic coding skills.

Survival skills learned:

Shell scripting: Script languages are interpreted on the fly, which makes them
more portable than, say, compiled C programs. (Java is somewhere between a
scripted and compiled language.) You will have use of these in future exercises.

Programming skills: This exercise does not teach much of them, but it is mostly
there to remind you that you will need these skills and should join the C course
to acquire them now rather than later.

Once you are done with these, you can start work on the weekly exercises.