Introduction

This first lecture is devoted to an introduction to the course and to the area of distributed systems. We will outline a number of examples of distributed systems and elaborate on their basic characteristics and design challenges. Finally, we introduce basic models of distributed systems.

Literature

[DS] Chapters 1-2.
You might also consider reading [DS] chapter 3 to refresh what you learned in the networking course.

Exercises
  1. Consider a client-application that collects and computes the average of an integer (eg. stock price/value) collected from a number (eg 20)  remote servers .
    1. Determine how long time it will take the client to deliver an answer to its user, assuming serial requests to each server, and 1) an average response time of 200 ms, 2) 10 ms, and 3) 1 ms. Compare this to the situation where all values are present in the local memory of the client.
    2. What consequences does that have on the information that one computer of a distributed systems knows about the others? What consequence does it have on the way we design a distributed system, and use of remote access. 
  2. Consider a simple distributed bank application where a bank-account server accepts messages on a tcp connection to withdraw, or add money. Assume that the client code looks like the following pseudo code:

    1     socket= new Socket("MyBank");
    2     sent_bytes=socket.send("Add 10",7); 
    3      ...
    4     socket.close();

    The second argument of the send call indicates the number of bytes that should be sent, thus in this case 7 bytes, including zero-termination of the string. The send call returns the number of bytes actually successfully sent. Assume now that the call has returned the value 7, and that we are currently executing line 3. If the bank account initially contained 100 DKK, are you now sure that the account contains 110 DKK???  

    Hints: Consider Figure 2.9 and Table 2.10 in the textbook, and read the fine print of manual pages describing send on tcp sockets, eg.

    • http://msdn2.microsoft.com/en-us/library/w93yy28a.aspx
    • http://www.penguin-soft.com/penguin/man/2/send.html?manpath=/man/man2/send.2.inc
  3. You are given the task to construct a small distributed program that can measure the network performance between two computers. Sketch a method that allows you to measure latency (informally the transmission delay of a small message) and throughput (average bits per second that can be transmitted from sender to receiver) of a tcp connection.
  4. [DS] 1.7-1.9, 2.5, 2.6, 2.14