Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet.

Similar presentations


Presentation on theme: "Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet."— Presentation transcript:

1 Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2015

2 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

3 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

4 Messages in Communication 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

5 OSI Model-Layered Protocol 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

6 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

7 Layered Protocols A typical message as it appears on the network.

8 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

9 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.

10 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 (just IP with some additions) The combination of TCP/IP is now used as a de facto standard for network communication

11 Client-Server TCP 3-way TCP hand-shake

12 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.

13 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. – SMTP - Mail delivery system General-purpose protocols – Useful to many applications but cannot be qualified as transport protocols. These protocols fall into the category of middleware protocols.

14 Middleware Protocols Middleware: Layer that resides between an OS and an application – May implement general-purpose protocols that warrant their own layers

15 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

16 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

17 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

18 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

19 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

20 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

21 Persistence and Synchronicity in Communication: RPC 1 Received Based 2 Delivery Based3 Response Based

22 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

23 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

24 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

25 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

26 NOW we have 4 combinations Persistence vs. Transient Asynchronous vs. Synchronous

27 Persistence and Synchronicity Combinations a) Persistent asynchronous communication (e.g., email) b) Persistent synchronous communication

28 Persistence and Synchronicity Combinations c) Transient asynchronous communication (e.g., UDP) d) Receipt-based transient synchronous communication

29 Persistence and Synchronicity Combinations e) Delivery-based transient synchronous communication at message delivery (e.g., asynchronous RPC) f) Response-based transient synchronous communication (RPC)

30

31 Back Up

32 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.


Download ppt "Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet."

Similar presentations


Ads by Google