SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Communication in
Distributed Systems
CS4262 Distributed Systems
Dilum Bandara
Dilum.Bandara@uom.lk
Some slides extracted from Dr. Srinath Perera & Dr. Rajkumar Buyya’s
Presentation Deck
Outline
 Network Programming
 Remote Procedure Calls
 Remote Method Invocation
 Message Oriented Communication
2
Network Programming
 Communication is typically over IP
 HPC Clusters may use Infiniband or Myrinet
 Unicast, multicast, anycast, broadcast
 Only unicast is globally routable
 2 main approaches
 TCP – connection oriented
 UDP – connection less
 Lot more popular than you think!
3
End-to-End Communication
4Source: Communication Networks by
Alberto Leon-Garcia (Author), Indra Widjaja, 2000
TCP Socket Calls
5
Source: Communication Networks by Alberto Leon-
Garcia (Author), Indra Widjaja, 2000
UDP Socket Calls
6
• No “handshake”
• No simultaneous close
• No fork() for concurrent servers
Source: Communication
Networks by Alberto Leon-
Garcia (Author), Indra Widjaja,
2000
Messages
 Used to convey data among nodes
 Has a limited size
 Typically has a header
 Multiple messages may be send through same
connection
 Identify message boundaries based on size, unique
symbol patterns, etc.
 Messages can be clear text, binary, XML, JSON,
etc.
7
Communication in Distributed Systems
– History
 Started with RPC
 Went to distributed objects
 Come back to RPC + Message Oriented
Communication
8
Remote Procedure Calls (RPCs)
 Extend local procedure calls to work across computers
 Call a procedure on a remote machine “just” as you would on
local machine
 Send the call as a message & get response/fault as a
message
9
Source: http://pubs.opengroup.org/onlinepubs/9629399/chap6.htm
RPC in Action…
10Source: Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007
RPC – Steps
1. Client procedure calls client stub in normal way
2. Client stub builds message, calls Middleware
3. Middleware sends message to remote Middleware
4. Remote Middleware gives message to server Skeleton
5. Server stub unpacks parameters, calls local
implementation
6. Local implementation does work, returns result to
Skeleton
7. Skeleton packs it in message, calls local Middleware
8. Server's Middleware sends message to client's
Middleware
9. Client's Middleware gives message to client stub
10. Stub unpacks result, returns to client 11
RPCs
 Introduced by Birrell & Nelson in 1984
 Pre-RPC – Most applications were built directly over Internet
primitives
 Initial idea – Mask distributed computing system using a
“transparent” abstraction
 Looks like normal procedure call
 Hides all aspects of distributed interaction
 Supports an easy programming model
 Today, RPC is the core of many distributed systems,
e.g., Web Services
 But now acknowledge other aspects like failures &
asynchronous nature, communication latency more
12
RPCs (Cont.)
13
Source - wikipedia.org
Message Exchange Patterns
 With local calls, you call, & wait for response
 But with RPC, there are other possibilities
 Send/Receive
 Send Only (Fire & Forget)
 Send with Ack (Send Robust)
 There are 2 models for client API
 Polling
 Callback
14
RPC Concerns
 How to make RPC similar to a local procedure
call?
 Communications
 Location transparency
 Parameter passing
 Heterogeneity
 OS, arch., language
 Failures
 Failure transparency
 Stubs
15
Source: http://technet.microsoft.com/en-
us/library/cc738291%28v=ws.10%29.aspx
Data in Messages
 Data is “marshalled (encoded)” into a message &
“demarshalled (decoded)” from it
 Data structures
 Flattened on transmission
 Rebuilt upon reception
 Data types
 Base types – Ints, floats
 Flat types – structures, arrays
 Complex types – pointers
 With Web services we convert them to XML
 Issues
 Big-endian vs. little-endian, strings may require padding,
alignment (16/32/64-bits), Floating point representations 16
Asynchronous & Deferred
Synchronous RPC
17
Source: Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007
Directory Service
 Directory service or a UUDI registry
 UDDI - Universal Description, Discovery & Integration
18
Source: Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007
RPC – What Can Go Wrong?
 Failures
 Network failure
 Client failure
 Server failure
 Assuming only network idiosyncrasies for now…
 Ignoring possibility of process & machine crashes
 …Need to overcome
 Limited levels of message loss
 Message disorder/reorder
 Message duplication
19
Overcoming Only Communication
Failures
 Each message carry
 Unique sequence number
 Timestamp from a global clock (in most RPC protocols)
 Global clock assumed to return roughly same value throughout
network, up to clock synchronization limits
 Enables server to detect & discard
 Very old messages
 Duplicate copies
 RPCs use acknowledgements
 If timeout with no ack  resend packet
 Leads to the issue of replayed requests
20
Overcoming Lost Packets
21
Client Server
Time out
Sends request
Retransmit
Ack for request
Reply
Ack for reply
Overcoming Lost Packets (Cont.)
 Acks are expensive
 Retransmissions are costly
 For big messages, send
packets in bursts & Ack a
burst at a time
22
Machines Could Fail Too…
 What does a failed request mean?
 Network failure, machine failure or both!
 If a process fails, but machine remains
operational, OS will provide sufficient status
information to accurately determine “process
failure”
 Client that issued request would not know, if
server processed the request or not
23
RPC  RMI Evolution
 By expanding RPCs to invocation on remote
objects
 Object-oriented equivalent of RPC
 Distribution transparency is enhanced
 Separation between interfaces & objects
implementing these interfaces is crucial for
distributed systems
 State of remote objects is not distributed
 Only interfaces implemented by the object are
distributed (available on other machines)
24
RMI in Action
25
RMI in Action (Cont.)
26
Source: Introduction to Java Programming, Comprehensive Version (7th Edition) by Y. Daniel Liang
RMI in Action (Cont.)
 Client binds to a distributed object residing at a server
machine
 An implementation of object’s interface, called a proxy, is
loaded to the client’s address space
 Proxy – Analogous to a client stub in RPC
 Marshals message invocations into messages – object
serialization
 Unmarshals reply messages to return method invocation result to
client
 On server side
 Incoming invocation requests are passed to a server stub, called a
skeleton
 Unmarshals invocation request into proper method invocations
 Marshals replies & forwards reply messages to client side proxy27
Remote Objects & Remote Interfaces
 RMI is interface-oriented
 Remote interface implemented by remote object
 Only methods specified by remote interfaces can be
accessed via RMI
 A remote object may implement several sets of
remote interfaces simultaneously
28Source: Introduction to Java Programming,
Comprehensive Version (7th Edition) by Y. Daniel Liang
Remote Exceptions
 If a remote method throws an exception
 Remote side
 Catch all uncaught exceptions thrown from remote methods
 Find the caller
 Map to network request
 Client side
 Keep listening
 Any time an exception could be sent from a remote side
 Unmarshall network requests to exception objects
 Re-throw remote exception objects locally, as if exception
was thrown from current method
29
Remote Exceptions (Cont.)
 RMI software itself can also throw exceptions
 Network timeout
 Other system related
 They have accepted those failures & have decided to
expose it
30
Web Services
 RPC like Distributed Communication medium
that supports interoperability
 Not that much different from RMI, RPC, etc.,
except interoperability & lack of distributed
objects
 Use XML to communicate
 Request messages, description, & discovery all use
standard XML based formats
31
Web Services (Cont.)
 Publish, find, & use
32
UDDI – Universal Description,
Discovery & Integration
Web Services (Cont.)
 Are described using WSDL
 Web Service Description Language standard
 Published & found through a UUDI registry
 Invoked through SOAP standard
 XML based protocol for accessing Web Services
 Can transmit through any transport
 HTTP most common
 SMTP, JMS, UDP, TCP, VFS are known
33
Web Services Fundamentals
34
Summary
35

Weitere ähnliche Inhalte

Was ist angesagt?

distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architectureMaulik Togadiya
 
file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada umardanjumamaiwada
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocolsZongYing Lyu
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSKathirvel Ayyaswamy
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure callsAshish Kumar
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software conceptsPrajakta Rane
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
Foult Tolerence In Distributed System
Foult Tolerence In Distributed SystemFoult Tolerence In Distributed System
Foult Tolerence In Distributed SystemRajan Kumar
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating SystemsDr Sandeep Kumar Poonia
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating systemudaya khanal
 

Was ist angesagt? (20)

distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
 
11. dfs
11. dfs11. dfs
11. dfs
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Stream oriented communication
Stream oriented communicationStream oriented communication
Stream oriented communication
 
file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocols
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Foult Tolerence In Distributed System
Foult Tolerence In Distributed SystemFoult Tolerence In Distributed System
Foult Tolerence In Distributed System
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
6.Distributed Operating Systems
6.Distributed Operating Systems6.Distributed Operating Systems
6.Distributed Operating Systems
 
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
 

Ähnlich wie Communication Methods in Distributed Systems

Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.pptsirajmohammed35
 
Communication in Distributed System.ppt
Communication in Distributed System.pptCommunication in Distributed System.ppt
Communication in Distributed System.pptSELVAVINAYAGAMG
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
20CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 220CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 2Kathirvel Ayyaswamy
 
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYDistributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYreginamutio48
 
Intrebari si raspunsuri CCNA1
Intrebari si raspunsuri CCNA1Intrebari si raspunsuri CCNA1
Intrebari si raspunsuri CCNA1Adrian Preda
 
remote method invocation
remote method invocationremote method invocation
remote method invocationRavi Theja
 
Client Server Model and Distributed Computing
Client Server Model and Distributed ComputingClient Server Model and Distributed Computing
Client Server Model and Distributed ComputingAbhishek Jaisingh
 
COMMUNICATION IN DISTRIBUTED SYSTEMS
COMMUNICATION IN DISTRIBUTED SYSTEMSCOMMUNICATION IN DISTRIBUTED SYSTEMS
COMMUNICATION IN DISTRIBUTED SYSTEMSSaji banu
 
Designing Application over mobile environment
Designing Application over mobile environmentDesigning Application over mobile environment
Designing Application over mobile environmentMaulik Patel
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 
Introduction to Networks_v0.2
Introduction to Networks_v0.2Introduction to Networks_v0.2
Introduction to Networks_v0.2Sohail Gohir
 
Remote procedure calls
Remote procedure callsRemote procedure calls
Remote procedure callsimnomus
 

Ähnlich wie Communication Methods in Distributed Systems (20)

Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.ppt
 
Communication in Distributed System.ppt
Communication in Distributed System.pptCommunication in Distributed System.ppt
Communication in Distributed System.ppt
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Internet (i mcom)
Internet (i mcom)Internet (i mcom)
Internet (i mcom)
 
20CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 220CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 2
 
20CS2021 Distributed Computing
20CS2021 Distributed Computing 20CS2021 Distributed Computing
20CS2021 Distributed Computing
 
Lecture9
Lecture9Lecture9
Lecture9
 
18CS3040_Distributed Systems
18CS3040_Distributed Systems18CS3040_Distributed Systems
18CS3040_Distributed Systems
 
18CS3040 Distributed System
18CS3040 Distributed System	18CS3040 Distributed System
18CS3040 Distributed System
 
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYDistributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
 
Intrebari si raspunsuri CCNA1
Intrebari si raspunsuri CCNA1Intrebari si raspunsuri CCNA1
Intrebari si raspunsuri CCNA1
 
remote method invocation
remote method invocationremote method invocation
remote method invocation
 
Client Server Model and Distributed Computing
Client Server Model and Distributed ComputingClient Server Model and Distributed Computing
Client Server Model and Distributed Computing
 
COMMUNICATION IN DISTRIBUTED SYSTEMS
COMMUNICATION IN DISTRIBUTED SYSTEMSCOMMUNICATION IN DISTRIBUTED SYSTEMS
COMMUNICATION IN DISTRIBUTED SYSTEMS
 
Designing Application over mobile environment
Designing Application over mobile environmentDesigning Application over mobile environment
Designing Application over mobile environment
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
Introduction to Networks_v0.2
Introduction to Networks_v0.2Introduction to Networks_v0.2
Introduction to Networks_v0.2
 
Iap final
Iap finalIap final
Iap final
 
Class-note-data communications-01
Class-note-data communications-01Class-note-data communications-01
Class-note-data communications-01
 
Remote procedure calls
Remote procedure callsRemote procedure calls
Remote procedure calls
 

Mehr von Dilum Bandara

Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningDilum Bandara
 
Time Series Analysis and Forecasting in Practice
Time Series Analysis and Forecasting in PracticeTime Series Analysis and Forecasting in Practice
Time Series Analysis and Forecasting in PracticeDilum Bandara
 
Introduction to Dimension Reduction with PCA
Introduction to Dimension Reduction with PCAIntroduction to Dimension Reduction with PCA
Introduction to Dimension Reduction with PCADilum Bandara
 
Introduction to Descriptive & Predictive Analytics
Introduction to Descriptive & Predictive AnalyticsIntroduction to Descriptive & Predictive Analytics
Introduction to Descriptive & Predictive AnalyticsDilum Bandara
 
Introduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresIntroduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresDilum Bandara
 
Hard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Hard to Paralelize Problems: Matrix-Vector and Matrix-MatrixHard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Hard to Paralelize Problems: Matrix-Vector and Matrix-MatrixDilum Bandara
 
Introduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with HadoopIntroduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with HadoopDilum Bandara
 
Embarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsEmbarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsDilum Bandara
 
Introduction to Warehouse-Scale Computers
Introduction to Warehouse-Scale ComputersIntroduction to Warehouse-Scale Computers
Introduction to Warehouse-Scale ComputersDilum Bandara
 
Introduction to Thread Level Parallelism
Introduction to Thread Level ParallelismIntroduction to Thread Level Parallelism
Introduction to Thread Level ParallelismDilum Bandara
 
CPU Memory Hierarchy and Caching Techniques
CPU Memory Hierarchy and Caching TechniquesCPU Memory Hierarchy and Caching Techniques
CPU Memory Hierarchy and Caching TechniquesDilum Bandara
 
Data-Level Parallelism in Microprocessors
Data-Level Parallelism in MicroprocessorsData-Level Parallelism in Microprocessors
Data-Level Parallelism in MicroprocessorsDilum Bandara
 
Instruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware TechniquesInstruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware TechniquesDilum Bandara
 
Instruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesInstruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesDilum Bandara
 
CPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionCPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionDilum Bandara
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPDilum Bandara
 
Introduction to Content Delivery Networks
Introduction to Content Delivery NetworksIntroduction to Content Delivery Networks
Introduction to Content Delivery NetworksDilum Bandara
 
Peer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingPeer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingDilum Bandara
 

Mehr von Dilum Bandara (20)

Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Time Series Analysis and Forecasting in Practice
Time Series Analysis and Forecasting in PracticeTime Series Analysis and Forecasting in Practice
Time Series Analysis and Forecasting in Practice
 
Introduction to Dimension Reduction with PCA
Introduction to Dimension Reduction with PCAIntroduction to Dimension Reduction with PCA
Introduction to Dimension Reduction with PCA
 
Introduction to Descriptive & Predictive Analytics
Introduction to Descriptive & Predictive AnalyticsIntroduction to Descriptive & Predictive Analytics
Introduction to Descriptive & Predictive Analytics
 
Introduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresIntroduction to Concurrent Data Structures
Introduction to Concurrent Data Structures
 
Hard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Hard to Paralelize Problems: Matrix-Vector and Matrix-MatrixHard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Hard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
 
Introduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with HadoopIntroduction to Map-Reduce Programming with Hadoop
Introduction to Map-Reduce Programming with Hadoop
 
Embarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsEmbarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel Problems
 
Introduction to Warehouse-Scale Computers
Introduction to Warehouse-Scale ComputersIntroduction to Warehouse-Scale Computers
Introduction to Warehouse-Scale Computers
 
Introduction to Thread Level Parallelism
Introduction to Thread Level ParallelismIntroduction to Thread Level Parallelism
Introduction to Thread Level Parallelism
 
CPU Memory Hierarchy and Caching Techniques
CPU Memory Hierarchy and Caching TechniquesCPU Memory Hierarchy and Caching Techniques
CPU Memory Hierarchy and Caching Techniques
 
Data-Level Parallelism in Microprocessors
Data-Level Parallelism in MicroprocessorsData-Level Parallelism in Microprocessors
Data-Level Parallelism in Microprocessors
 
Instruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware TechniquesInstruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware Techniques
 
Instruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesInstruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler Techniques
 
CPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionCPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An Introduction
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
High Performance Networking with Advanced TCP
High Performance Networking with Advanced TCPHigh Performance Networking with Advanced TCP
High Performance Networking with Advanced TCP
 
Introduction to Content Delivery Networks
Introduction to Content Delivery NetworksIntroduction to Content Delivery Networks
Introduction to Content Delivery Networks
 
Peer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and StreamingPeer-to-Peer Networking Systems and Streaming
Peer-to-Peer Networking Systems and Streaming
 
Mobile Services
Mobile ServicesMobile Services
Mobile Services
 

Kürzlich hochgeladen

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 

Kürzlich hochgeladen (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 

Communication Methods in Distributed Systems

  • 1. Communication in Distributed Systems CS4262 Distributed Systems Dilum Bandara Dilum.Bandara@uom.lk Some slides extracted from Dr. Srinath Perera & Dr. Rajkumar Buyya’s Presentation Deck
  • 2. Outline  Network Programming  Remote Procedure Calls  Remote Method Invocation  Message Oriented Communication 2
  • 3. Network Programming  Communication is typically over IP  HPC Clusters may use Infiniband or Myrinet  Unicast, multicast, anycast, broadcast  Only unicast is globally routable  2 main approaches  TCP – connection oriented  UDP – connection less  Lot more popular than you think! 3
  • 4. End-to-End Communication 4Source: Communication Networks by Alberto Leon-Garcia (Author), Indra Widjaja, 2000
  • 5. TCP Socket Calls 5 Source: Communication Networks by Alberto Leon- Garcia (Author), Indra Widjaja, 2000
  • 6. UDP Socket Calls 6 • No “handshake” • No simultaneous close • No fork() for concurrent servers Source: Communication Networks by Alberto Leon- Garcia (Author), Indra Widjaja, 2000
  • 7. Messages  Used to convey data among nodes  Has a limited size  Typically has a header  Multiple messages may be send through same connection  Identify message boundaries based on size, unique symbol patterns, etc.  Messages can be clear text, binary, XML, JSON, etc. 7
  • 8. Communication in Distributed Systems – History  Started with RPC  Went to distributed objects  Come back to RPC + Message Oriented Communication 8
  • 9. Remote Procedure Calls (RPCs)  Extend local procedure calls to work across computers  Call a procedure on a remote machine “just” as you would on local machine  Send the call as a message & get response/fault as a message 9 Source: http://pubs.opengroup.org/onlinepubs/9629399/chap6.htm
  • 10. RPC in Action… 10Source: Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007
  • 11. RPC – Steps 1. Client procedure calls client stub in normal way 2. Client stub builds message, calls Middleware 3. Middleware sends message to remote Middleware 4. Remote Middleware gives message to server Skeleton 5. Server stub unpacks parameters, calls local implementation 6. Local implementation does work, returns result to Skeleton 7. Skeleton packs it in message, calls local Middleware 8. Server's Middleware sends message to client's Middleware 9. Client's Middleware gives message to client stub 10. Stub unpacks result, returns to client 11
  • 12. RPCs  Introduced by Birrell & Nelson in 1984  Pre-RPC – Most applications were built directly over Internet primitives  Initial idea – Mask distributed computing system using a “transparent” abstraction  Looks like normal procedure call  Hides all aspects of distributed interaction  Supports an easy programming model  Today, RPC is the core of many distributed systems, e.g., Web Services  But now acknowledge other aspects like failures & asynchronous nature, communication latency more 12
  • 13. RPCs (Cont.) 13 Source - wikipedia.org
  • 14. Message Exchange Patterns  With local calls, you call, & wait for response  But with RPC, there are other possibilities  Send/Receive  Send Only (Fire & Forget)  Send with Ack (Send Robust)  There are 2 models for client API  Polling  Callback 14
  • 15. RPC Concerns  How to make RPC similar to a local procedure call?  Communications  Location transparency  Parameter passing  Heterogeneity  OS, arch., language  Failures  Failure transparency  Stubs 15 Source: http://technet.microsoft.com/en- us/library/cc738291%28v=ws.10%29.aspx
  • 16. Data in Messages  Data is “marshalled (encoded)” into a message & “demarshalled (decoded)” from it  Data structures  Flattened on transmission  Rebuilt upon reception  Data types  Base types – Ints, floats  Flat types – structures, arrays  Complex types – pointers  With Web services we convert them to XML  Issues  Big-endian vs. little-endian, strings may require padding, alignment (16/32/64-bits), Floating point representations 16
  • 17. Asynchronous & Deferred Synchronous RPC 17 Source: Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007
  • 18. Directory Service  Directory service or a UUDI registry  UDDI - Universal Description, Discovery & Integration 18 Source: Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007
  • 19. RPC – What Can Go Wrong?  Failures  Network failure  Client failure  Server failure  Assuming only network idiosyncrasies for now…  Ignoring possibility of process & machine crashes  …Need to overcome  Limited levels of message loss  Message disorder/reorder  Message duplication 19
  • 20. Overcoming Only Communication Failures  Each message carry  Unique sequence number  Timestamp from a global clock (in most RPC protocols)  Global clock assumed to return roughly same value throughout network, up to clock synchronization limits  Enables server to detect & discard  Very old messages  Duplicate copies  RPCs use acknowledgements  If timeout with no ack  resend packet  Leads to the issue of replayed requests 20
  • 21. Overcoming Lost Packets 21 Client Server Time out Sends request Retransmit Ack for request Reply Ack for reply
  • 22. Overcoming Lost Packets (Cont.)  Acks are expensive  Retransmissions are costly  For big messages, send packets in bursts & Ack a burst at a time 22
  • 23. Machines Could Fail Too…  What does a failed request mean?  Network failure, machine failure or both!  If a process fails, but machine remains operational, OS will provide sufficient status information to accurately determine “process failure”  Client that issued request would not know, if server processed the request or not 23
  • 24. RPC  RMI Evolution  By expanding RPCs to invocation on remote objects  Object-oriented equivalent of RPC  Distribution transparency is enhanced  Separation between interfaces & objects implementing these interfaces is crucial for distributed systems  State of remote objects is not distributed  Only interfaces implemented by the object are distributed (available on other machines) 24
  • 26. RMI in Action (Cont.) 26 Source: Introduction to Java Programming, Comprehensive Version (7th Edition) by Y. Daniel Liang
  • 27. RMI in Action (Cont.)  Client binds to a distributed object residing at a server machine  An implementation of object’s interface, called a proxy, is loaded to the client’s address space  Proxy – Analogous to a client stub in RPC  Marshals message invocations into messages – object serialization  Unmarshals reply messages to return method invocation result to client  On server side  Incoming invocation requests are passed to a server stub, called a skeleton  Unmarshals invocation request into proper method invocations  Marshals replies & forwards reply messages to client side proxy27
  • 28. Remote Objects & Remote Interfaces  RMI is interface-oriented  Remote interface implemented by remote object  Only methods specified by remote interfaces can be accessed via RMI  A remote object may implement several sets of remote interfaces simultaneously 28Source: Introduction to Java Programming, Comprehensive Version (7th Edition) by Y. Daniel Liang
  • 29. Remote Exceptions  If a remote method throws an exception  Remote side  Catch all uncaught exceptions thrown from remote methods  Find the caller  Map to network request  Client side  Keep listening  Any time an exception could be sent from a remote side  Unmarshall network requests to exception objects  Re-throw remote exception objects locally, as if exception was thrown from current method 29
  • 30. Remote Exceptions (Cont.)  RMI software itself can also throw exceptions  Network timeout  Other system related  They have accepted those failures & have decided to expose it 30
  • 31. Web Services  RPC like Distributed Communication medium that supports interoperability  Not that much different from RMI, RPC, etc., except interoperability & lack of distributed objects  Use XML to communicate  Request messages, description, & discovery all use standard XML based formats 31
  • 32. Web Services (Cont.)  Publish, find, & use 32 UDDI – Universal Description, Discovery & Integration
  • 33. Web Services (Cont.)  Are described using WSDL  Web Service Description Language standard  Published & found through a UUDI registry  Invoked through SOAP standard  XML based protocol for accessing Web Services  Can transmit through any transport  HTTP most common  SMTP, JMS, UDP, TCP, VFS are known 33

Hinweis der Redaktion

  1. Big-endian vs. little-endian - http://h71000.www7.hp.com/doc/82final/6443/zk-6654a.gif
  2. DCE RPC is a facility for calling a procedure on a remote machine as if it were a local procedure call
  3. UDDI a platform-independent, XML-based registry by which businesses worldwide can list themselves on the Internet, and a mechanism to register and locate web service applications.
  4. JMS – Java Message Service VFS – Virtual File System