Download Distributed (Operating) Systems -Architectures-

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Deep packet inspection wikipedia , lookup

Distributed firewall wikipedia , lookup

Distributed operating system wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Internet protocol suite wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Distributed (Operating) Systems
-Communication in Distributed SystemsComputer Engineering Department
Distributed Systems Course
Asst. Prof. Dr. Ahmet Sayar
Kocaeli University - Fall 2014
Communication
• Communication is at the heart of all distributed
systems
• Examining the ways that processes on different
machines can exchange information.
• IPC – Inter Process Communication
• Communication through message passing is harder
than using primitives based on shared memory
• Communication in distributed systems is always based
on low-level message passing as offered by underlying
network
Outline of Next 3 Lessons
• Underlying network layer communication
protocols
– OSI Model (ISO/OSI)
– Internet Protocol Suit TCP/IP
• Widely used models for communication, also
called middleware communication services :
– Remote Procedure Call (RPC)
– Message Oriented Middleware (MOM)
– RTP: Streams for transferring real-time data, such as
needed for multimedia applications
OSI Model -Layered Protocols
• Communication messaging rules are defined in
protocols
• Due to the absence of shared memory, all
communication in distributed systems is based on
sending and receiving (low-level) messages
• Many different agreements
–
–
–
–
IBM’s EBCDIC and ASCII
How many volts should be used to signal 0
How does the receiver know which is the last bit
How can the receiver detect if a message has been
damaged
Layered Protocols 2
• ISO/OSI is never widely used and are
essentially dead
• In the OSI model, communication is divided up
into 7 layers
• OSI layers were never popular. In contrast,
protocols developed for the internet, such as
TCP and IP, are mostly used
Communication Protocols
• There are some rules that communicating processes must adhere to –
known as protocols
• Protocols are agreements/rules on communication
• Protocols could be connection-oriented or connectionless
Layered Protocols
• A typical message as it appears on the network.
Physical and Data-Link Layers
• Physical layer
–
–
–
–
Transmitting 0s and 1s
How many bits per sec can be sent
Can transmission take place in both direction
Standardizing the electrical, mechanical and signaling
interfaces.
• Data Link Layer
– Group the bits into units, frames, and see if each frame is
correctly received.
– Puts special bit pattern on the start and end of each frame
– Computing checksum
Network Layer
• Routing
• It is important in WAN
• Shortest path is not always the best route
– Depends on amount of delay, on a given route, amount of traffic
and the number of messages queued up.
• Some routing algorithms.
• Most widely used network protocol is IP
• An IP packet can be sent without any setup. I.E. each IP
packet is routed to its destination independent of all
others.
Transport Layer
• Turns the underlying network into something that an application
developer can use
• Messages from the application is broken into small pieces-packets
• TCP packed header concerns - which packets have been sent, which
have been received, which should be retransmitted
• Connection-oriented: messages arrive in the same order (as in TCP)
- reliable
• Connectionless: message can arrive in different order (as in UDP) unreliable
• Another example of transport protocol is RTP
• The combination of TCP/IP is now used as a de facto standard for
network communication
Client-Server TCP
3-way TCP hand-shake
RTP
•
•
•
•
Actually a transport protocol
Real-Time Transport Protocol
Support real time data transfers
A framework protocol - it specifies packet
formats for real-time data without providing
the actual mechanisms for guaranteeing data
delivery.
Session and Presentation Layers
• Session Layer
– Enhanced version of transport layer
– Keeps track of which party is currently talking and it
provides a synchronization
– Puts checking points – in case of crash going to the last
check point,
• Instead of going to the starting point
• Presentation Layer
– Concerned with the meaning of the bits
– Structure information such as people’s names, addresses
etc.
OSI Model summary
• Missing in this model: A clear distinction between
applications, application-specific protocols and general
purpose protocols.
• Application-specific protocol
– FTP – protocol for transferring files between client and server
– HTTP – protocol is implemented by applications such as web
browsers and web servers.
• General-purpose protocols
– Useful to many applications but cannot be qualified as transport
protocols. These protocols fall into the category of
middleware protocols.
Middleware Protocols
• Middleware: Layer that resides between an OS and an
application
– May implement general-purpose protocols that warrant their
own layers
Middleware Protocols 1
• Some services are not tied to any specific
applications, but instead can be integrated into a
middleware system as a general service
– Authentication protocols
• Proof of claimed identity
– Atomicity protocols
• Distributed commit protocols
• Widely applied in transactions
– Distributed locking protocols
• Resources can be protected against simultaneous accesses
– Mail delivery system (SMTP)
Middleware Protocols 2
• HIGH level middleware communication
services:
– Remote Procedure Call (RPC)
– Message Oriented Middleware (MOM)
– RTP: Streams for transferring real-time data, such
as needed for multimedia applications
Communication in Distributed Systems
• Communication is done through message passing
• Expressing communication through message passing is
harder than using primitives based on shared memory
• Remote Procedure Calls
– Transparency but poor for passing references
– Ideal for client server applications
• Message-oriented Communication
• Stream-oriented Communication
– Continuous media
Communication Between Processes
• Unstructured communication
– Use shared memory or shared data structures
• Structured communication
– Use explicit messages (IPCs)
• Distributed Systems: Both need low-level
communication support
Types of Communication -1
• Transient Communication
– A message is stored by the communication system only as
long as the sending and the receiving application are
executing
– Typically all transport level communication is transient
communication
• Persistent Communication
– A message that has been submitted for transmission is
kept by middleware as long as it takes to deliver it to the
receiver
– Receiving application don’t need to be executing when the
message is submitted
Types of Communication -2
• Asynchronous Communication
– Sender continues immediately after it has submitted
its message for transmission
– It means, message is temporarily stored in
middleware upon submission
• Synchronous Communication
– Sender is blocked until its request is known to be
accepted
– Three points
• Received based
• Delivery based
• Response based
Types of Communication -3
• Connection-oriented (telephone)
– With connection-oriented protocols, before
exchanging data, the sender and receiver first
explicitly establish a connection
– TCP
• Connectionless (mailbox – dropping a letter)
– No setup in advance is needed
– IP, UDP
Persistence and Synchronicity in
Communication: RPC
Persistence
• Persistent communication
– Messages are stored until the next receiver is ready to receive that
message
– Examples: Email, pony express
– Network buffers are not persistent they are transient
Transient Communication
• Transient communication
– Message is stored only so long as
sending/receiving application are executing
– Discard message if it can’t be delivered to next
server/receiver
– Example: Transport-level communication services
offer transient communication
– Example: Typical network router
– Example: Chatting
Synchronicity
• Asynchronous communication
– Sender continues immediately after it has submitted
the message
– Need a local buffer at the sending host
– Also called nonblocking
• Synchronous communication
– Sender blocks until message is stored in a local buffer
at the receiving host or actually delivered to receiver
– Variant: Block until receiver processes the message
– Also called blocking
NOW we have 4 combinations
Persistence vs. Transient
Asynchronous vs. Synchronous
Persistence and Synchronicity
Combinations
a) Persistent asynchronous communication (e.g., email)
b) Persistent synchronous communication
Persistence and Synchronicity
Combinations
c) Transient asynchronous communication (e.g., UDP)
d) Receipt-based transient synchronous communication
Persistence and Synchronicity
Combinations
e) Delivery-based transient synchronous communication at message
delivery (e.g., asynchronous RPC)
f) Response-based transient synchronous communication (RPC)