Chapter 3: Network and Communication: Distributed Systems 1
Chapter 3: Network and Communication: Distributed Systems 1
Chapter 3: Network and Communication: Distributed Systems 1
What is a network?
What types of network are there?
What networking standards are there?
How do you represent information?
What is communication protocol?
What are communication models? (message-
passing, stream communication and RPC)
Distributed Systems 1
Anatomy of a network
A set of interconnected
resources
Hosts that run network
applications software
Clients and servers
Set of peers
The network infrastructure that
interconnects the hosts
The networking hardware
and software
Network node devices
connectors, network
interfaces
Distributed Systems 2
Transmission links
Convey bits, bytes, packets
Physical medium
Copper (or aluminium)
Optical fibre
Glass, plastic
Free-space optical
Laser
Radio
Satellite, microwave link, mobile, wireless LAN,
‘Bluetooth’
Mode
Point-to-point
Shared medium (multicast)
Broadcast
Distributed Systems 3
Representing data: bits and bytes
Bits
Different codes used in different interface standards
Images, multi-media
Require special bit pattern as delimiter
Bytes
Text is usually ASCII or Unicode characters
Text files, documents
Character set includes special control characters
Bits Bytes
node)
Trailer (if present) carries error check
Used for detecting errors in received frame
Distributed Systems 6
Types of network
Main types:
LAN, WAN, MAN, and Internet
LAN (Local Area Network) is mainly private
Ether net, Token ring
Or interconnected
WAN (Wide Area Network) can be private or public
Interconnected
MAN (Metropolitan Area Network) is mainly public
Interconnected by Optical fibre
Global Network is public
The internet
The telephone network
Distributed Systems 7
Interconnecting LANs and WANs
Distributed Systems 8
OSI: The International Standards Model
Distributed Systems 9
OSI: A Seven Layer Protocol
Distributed Systems 10
The OSI and IETF Protocol Suites
Layer 7- Application
application
layers 5/6/7: Layer 6 - Presentation protocols
Application
Layer 5 - Session
Distributed Systems 11
Protocol Data Encapsulation
101011100101
Distributed Systems 12
A Typical Message on the Network
Distributed Systems 13
Protocol Data Flow
Addresses Addresses
Distributed Systems 14
Communication Models
• Message Passing
lowest level of communication, e.g. sockets
unstructured peer-peer IPC
varieties of communication patterns
• Data Stream
continuous media
satisfy real time data services
• Request / Reply semantics
basis of Client-Server
RPC (Remote Procedure Call)
RMI (Remote Method Invocation)
Distributed Systems 15
Message Passing Definitions(1)
Procedures: send, receive, accept, create, connect, locate , reply,
acknowledge
Multiplicity: point-to-point, broadcast, multicast
Message Content: data or instruction, by value or by reference
(address)
Channels:
- link, port, mailbox
- direction can be uni-diection or bi-direction
- capacity can be unbounded (i.e. asynchronous, no
blocking)
or null (implies synchronous) or fixed (implies
buffering)
Message Receipt:
explicit receive – receiver can select message
implicit receive – receiver must receive from sender
Distributed Systems 16
Message Passing Definitions(2)
Synchronous/Asynchronous
Synchronous – receiver waits ready for sender message and responds in
real time (e.g. phone call). Both sender and receiver return when transfer
is complete. No buffer is required.
Asynchronous – sender sends message into buffer, message picked
up later at receivers convenience (e.g. mailbox). Sender process
returns whether or not a message is received. Receiver blocks until
the message is available
Blocking/Non-Blocking
Blocking – sender cannot proceed after sending message until receiver
picks up message
Non Blocking – sender can continue as soon as message send is done
(e.g. added to buffer)
Sender/Receiver Naming
Static – sender and receiver names (location) fixed
Dynamic – names may change (e.g. ask a static name server
Distributed Systems 17
Message Passing Definitions(3)
Connection Link
Connection Oriented – link is established and held for duration of
service. Guaranteed link but bandwidth may be wasted.
Connectionless – connection not established until message send
occurs e.g. different packets sent by different routes
Transient
message is only stored by system while sender and receiver are
executing (e.g. MSN messenger)
Persistent
message is stored and delivered by system, even if receiver is not
executing (e.g. email)
Distributed Systems 18
Persistence and Synchronicity in Communication (1)
Distributed Systems 19
Persistence and Synchronicity in Communication (2)
Distributed Systems 20
Persistence and Synchronicity in Communication (3)
Distributed Systems 21
Persistence and Synchronicity in Communication (4)
Distributed Systems 22