SlideShare une entreprise Scribd logo
1  sur  41
Remote Procedure Calls Paul Krzyzanowski [email_address] [email_address] Distributed Systems Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Problems with sockets ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RPC ,[object Object],[object Object],[object Object],Goal:  it should appear to the programmer that a normal call is taking place
How do  regular  procedure calls work in programming languages?
Regular procedure calls ,[object Object],[object Object],[object Object],[object Object]
Regular procedure calls ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implementing RPC ,[object Object],[object Object],[object Object]
Implementing RPC ,[object Object],[object Object],[object Object]
Stub functions network routines server functions server stub (skeleton) network routines 1. Client calls stub (params on stack) client functions client stub client server
Stub functions server functions server stub (skeleton) network routines 2. Stub marshals params to net message client functions client stub network routines client server
Stub functions 3. Network message sent to server client functions client stub network routines server functions server stub (skeleton) network routines client server
Stub functions 4. Receive message: send to stub client functions client stub network routines server functions server stub (skeleton) network routines client server
Stub functions 5. Unmarshal parameters, call server func client functions client stub network routines server functions server stub (skeleton) network routines client server
Stub functions 6. Return from server function client functions client stub network routines server functions server stub (skeleton) network routines client server
Stub functions 7. Marshal return value and send message client functions client stub network routines server functions server stub (skeleton) network routines client server
Stub functions 8. Transfer message over network client functions client stub network routines server functions server stub (skeleton) network routines client server
Stub functions 9. Receive message: direct to stub client functions client stub network routines server functions server stub (skeleton) network routines client server
Stub functions 10. Unmarshal return, return to client code client functions client stub network routines server functions server stub (skeleton) network routines client server
Benefits ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RPC has issues
Parameter passing ,[object Object],[object Object],[object Object],[object Object]
Pass by reference? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Representing data ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Representing data ,[object Object],[object Object],[object Object],[object Object],main() { unsigned int n; char *a = (char *)&n; n = 0x11223344; printf("%02x, %02x, %02x, %02x
", a[0], a[1], a[2], a[3]); } Output on a Pentium: 44, 33, 22, 11 Output on a PowerPC: 11, 22, 33, 44
Representing data ,[object Object],[object Object],[object Object]
Representing data ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Where to bind? ,[object Object]
Where to bind? – Solution 1 Maintain centralized DB that can locate a host that provides a particular service (Birrell & Nelson’s 1984 proposal)
Where to bind? – Solution 2 ,[object Object],[object Object]
Transport protocol ,[object Object],[object Object],[object Object],[object Object]
When things go wrong ,[object Object],[object Object],[object Object],[object Object],[object Object]
When things go wrong ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RPC semantics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
More issues ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Programming with RPC ,[object Object],[object Object],[object Object],[object Object],[object Object]
Interface Definition Language ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RPC compiler IDL client code (main) server functions RPC compiler client stub headers server skeleton data conv. data conv. compiler compiler server client Code you write Code RPC compiler generates
Writing the program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RPC API ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RPC API ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The end.

Contenu connexe

Tendances

Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)
Sri Prasanna
 
Group Communication (Distributed computing)
Group Communication (Distributed computing)Group Communication (Distributed computing)
Group Communication (Distributed computing)
Sri Prasanna
 
Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)
Sri Prasanna
 
Communication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed SystemsCommunication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed Systems
guest61205606
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
Ashish Kumar
 

Tendances (20)

Dhcp
DhcpDhcp
Dhcp
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Dc ch02 : protocol architecture
Dc ch02 : protocol architectureDc ch02 : protocol architecture
Dc ch02 : protocol architecture
 
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
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Group Communication (Distributed computing)
Group Communication (Distributed computing)Group Communication (Distributed computing)
Group Communication (Distributed computing)
 
Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)
 
Snmp
SnmpSnmp
Snmp
 
Operating System Unit 1
Operating System Unit 1Operating System Unit 1
Operating System Unit 1
 
Client server model
Client server modelClient server model
Client server model
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 
Communication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed SystemsCommunication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed Systems
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
Transport layer
Transport layer Transport layer
Transport layer
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 

En vedette (6)

Remote procedure call on client server computing
Remote procedure call on client server computingRemote procedure call on client server computing
Remote procedure call on client server computing
 
Introduction to Remote Procedure Call
Introduction to Remote Procedure CallIntroduction to Remote Procedure Call
Introduction to Remote Procedure Call
 
RPC
RPCRPC
RPC
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 

Similaire à Rpc (Distributed computing)

Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
Sri Prasanna
 
Advanced driver debugging (13005399) copy
Advanced driver debugging (13005399)   copyAdvanced driver debugging (13005399)   copy
Advanced driver debugging (13005399) copy
Burlacu Sergiu
 
05 rpc-case studies
05 rpc-case studies05 rpc-case studies
05 rpc-case studies
hushu
 
Use perl creating web services with xml rpc
Use perl creating web services with xml rpcUse perl creating web services with xml rpc
Use perl creating web services with xml rpc
Johnny Pork
 

Similaire à Rpc (Distributed computing) (20)

Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
 
Rpc
RpcRpc
Rpc
 
Rpc
RpcRpc
Rpc
 
5. Distributed Operating Systems
5. Distributed Operating Systems5. Distributed Operating Systems
5. Distributed Operating Systems
 
Advanced driver debugging (13005399) copy
Advanced driver debugging (13005399)   copyAdvanced driver debugging (13005399)   copy
Advanced driver debugging (13005399) copy
 
Lecture9
Lecture9Lecture9
Lecture9
 
FMS Administration Seminar
FMS Administration SeminarFMS Administration Seminar
FMS Administration Seminar
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
05 rpc-case studies
05 rpc-case studies05 rpc-case studies
05 rpc-case studies
 
03 sockets
03 sockets03 sockets
03 sockets
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Driver Configuration Webinar
Driver Configuration WebinarDriver Configuration Webinar
Driver Configuration Webinar
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 
Use perl creating web services with xml rpc
Use perl creating web services with xml rpcUse perl creating web services with xml rpc
Use perl creating web services with xml rpc
 
layering.pdf
layering.pdflayering.pdf
layering.pdf
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
jkljklj
jkljkljjkljklj
jkljklj
 
What I learned about APIs in my first year at Google
What I learned about APIs in my first year at GoogleWhat I learned about APIs in my first year at Google
What I learned about APIs in my first year at Google
 

Plus de Sri Prasanna

Plus de Sri Prasanna (20)

Qr codes para tech radar
Qr codes para tech radarQr codes para tech radar
Qr codes para tech radar
 
Qr codes para tech radar 2
Qr codes para tech radar 2Qr codes para tech radar 2
Qr codes para tech radar 2
 
Test
TestTest
Test
 
Test
TestTest
Test
 
assds
assdsassds
assds
 
assds
assdsassds
assds
 
asdsa
asdsaasdsa
asdsa
 
dsd
dsddsd
dsd
 
About stacks
About stacksAbout stacks
About stacks
 
About Stacks
About  StacksAbout  Stacks
About Stacks
 
About Stacks
About  StacksAbout  Stacks
About Stacks
 
About Stacks
About  StacksAbout  Stacks
About Stacks
 
About Stacks
About  StacksAbout  Stacks
About Stacks
 
About Stacks
About  StacksAbout  Stacks
About Stacks
 
About Stacks
About StacksAbout Stacks
About Stacks
 
About Stacks
About StacksAbout Stacks
About Stacks
 
Introduction & Parellelization on large scale clusters
Introduction & Parellelization on large scale clustersIntroduction & Parellelization on large scale clusters
Introduction & Parellelization on large scale clusters
 
Mapreduce: Theory and implementation
Mapreduce: Theory and implementationMapreduce: Theory and implementation
Mapreduce: Theory and implementation
 
Other distributed systems
Other distributed systemsOther distributed systems
Other distributed systems
 
Distributed file systems
Distributed file systemsDistributed file systems
Distributed file systems
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Rpc (Distributed computing)

  • 1. Remote Procedure Calls Paul Krzyzanowski [email_address] [email_address] Distributed Systems Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
  • 2.
  • 3.
  • 4. How do regular procedure calls work in programming languages?
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Stub functions network routines server functions server stub (skeleton) network routines 1. Client calls stub (params on stack) client functions client stub client server
  • 10. Stub functions server functions server stub (skeleton) network routines 2. Stub marshals params to net message client functions client stub network routines client server
  • 11. Stub functions 3. Network message sent to server client functions client stub network routines server functions server stub (skeleton) network routines client server
  • 12. Stub functions 4. Receive message: send to stub client functions client stub network routines server functions server stub (skeleton) network routines client server
  • 13. Stub functions 5. Unmarshal parameters, call server func client functions client stub network routines server functions server stub (skeleton) network routines client server
  • 14. Stub functions 6. Return from server function client functions client stub network routines server functions server stub (skeleton) network routines client server
  • 15. Stub functions 7. Marshal return value and send message client functions client stub network routines server functions server stub (skeleton) network routines client server
  • 16. Stub functions 8. Transfer message over network client functions client stub network routines server functions server stub (skeleton) network routines client server
  • 17. Stub functions 9. Receive message: direct to stub client functions client stub network routines server functions server stub (skeleton) network routines client server
  • 18. Stub functions 10. Unmarshal return, return to client code client functions client stub network routines server functions server stub (skeleton) network routines client server
  • 19.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. Where to bind? – Solution 1 Maintain centralized DB that can locate a host that provides a particular service (Birrell & Nelson’s 1984 proposal)
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. RPC compiler IDL client code (main) server functions RPC compiler client stub headers server skeleton data conv. data conv. compiler compiler server client Code you write Code RPC compiler generates
  • 38.
  • 39.
  • 40.