4-Aug-99
Chapter 11
by David G. Messerschmitt
4-Aug-99
Algorithm
Specified sequence of steps that
accomplish a designated task in a finite number of steps
Representation:
simple algorithm: flowchart complicated algorithm: program
A First Course
Yes
Land on go to jail? No
Finish turn
A First Course
4-Aug-99
Start
Start
Programming languages support these three building blocks
Action
Test Action
Finish Sequence
Finish Selection
Protocol
Distributed algorithm realized by two or more modules to coordinate their actions or accomplish some shared task Module interoperability requires a protocol
Prescribed order of method invocations Part of interface documentation
A First Course
4-Aug-99
One-turn algorithm
Time 7
A First Course
A First Course
4-Aug-99
A First Course
Client
send request
Server
receive
Time
Understanding Networked Applications
10
A First Course
4-Aug-99
Example: HTTP
User activates URL HTTP request
HTTP server
Customer
StockTrader
12
A First Course
4-Aug-99
Locating things
by David G. Messerschmitt
Address
1299 Hearst St, Berkeley, CA
Reference
Postmaster of Berkeley CA
14
A First Course
4-Aug-99
Name
Symbolic (character string) representation Easy for people to remember or guess Identifies but does not locate directly
Distinction important for mobile entities
Not unique: entities can have more than one name (called aliases)
15
A First Course
Hierarchical names
Hierarchy makes names easier to remember or guess Host domain names:
info.sims.berkeley.edu designates administrative hierarchy
File names:
c:\My Documents\Docs\Resume.doc designates folder hierarchy
Understanding Networked Applications
16
A First Course
4-Aug-99
Address
Route or path to entity
is directly specified, or can be inferred
17
A First Course
Example
4 3 2 Path from to is (1,2,2,2,1,1,1,1) 1
18
A First Course
4-Aug-99
Example
(1,1) (1,2) (1,3) (1,4) (1,4) (2,1) (2,2) (2,3) (2,4) (2,5) Address of Route from is (2,5) can be inferred 19
A First Course
Reference
Abstract representation of an entity Interaction is with representation
infrastructure arranges redirection to actual entity especially appropriate for things that move
20
A First Course
10
4-Aug-99
address
21
A First Course
Name services
1. name 2. address or reference Name service 3. interaction
22
A First Course
11