
CS102: Distributed Applications
Copyright © 1999,
Kenneth J. Goldman
Introduction
-
In a distributed application we have:
- a collection of processes that
- communicate with each other
- sending and recieving of messages (over a network)
- cooperation toward a common goal
Each application defines its own protocol,
namely what kind of messages it sends around and what they mean.
For example,
if you were defining a "distributed whiteboard" application for
a group of people at different locations to share and edit a
drawing,
you would have the application send around mesages like
"CREATE_A_RECTANGLE x=10,
y=20,
w=50,
h=75".
These messages could be simple data (like Strings) or entire
objects with whatever instance you want to define
Types of Distributed Applications
-
There are many kinds of distributed applications:
- distributed databases (distributed name servers, for
example)
- network of workstations for running parallel
computations
- distributed applications
- collaborative applications
- etc.
To work,
these applications sometimes need to run a computation that
spans multiple machines.
Algorithms for such computaions are called Distributed
Algorithms.
In a distributed algorithm,
you have the same issues as in concurrent algorithms
(synchronization,
deadlock,
etc.),
plus you hvae the issue of latency: it takes time
for a message to get from one place to another.
In a distributed algorithm,
it is usually the case that no single process knows the state of
the entire system.
By the time you recieve a message,
the state of the sender might have changed.
This challenge must be faced by distributed algorithms for:
- leader election (finding a coordinator for a group of
processes)
- mutual exclusion (locking)
- distributed transaction commitment
- global snapshot
- etc.
