SlideShare a Scribd company logo
Remote
Procedure Calls
By
P.SAHITHI CHAITANYA (1551210075)
A.RAMPRAKASH REDDY(1551210077)
G.V.R.SHASHANK(1551210080)
Introduction
 Inter-process communication (IPC).
 Another virtual address space.
 Another process on the same machine.
 Another process on different machine.
 Hides remote interaction.
 Network programming standard 1980s
 Builds on named pipes or Winsock.
 Remote Method Invocation (RMI)
How RPC Operates
Cont….
 When client code calls a remote
procedure, the client stub code
 Retrieves the required parameters from the
client address space.
 Marshals1
the parameters as needed into a
standard NDR2
format for transmission over the
network.
 Calls functions in the RPC client run-time
library to send the request and its parameters
to the server.
1 Marshalling (similar to serialization) is the process of transforming the memory
representation of an object to a data format suitable for storage or transmission
2 Network Data Representation (NDR) is an implementation of the presentation layer in
the OSI model.
Cont…
 The server performs the following steps to
call the remote procedure:
 The server RPC run-time library functions
accept the request and call the server stub
procedure.
 The server stub retrieves the parameters from
the network buffer and converts (i.e.
unmarshals) them from the network
transmission format to the format the server
needs.
 The server stub calls the actual procedure on
the server.
Stubs
 Client stub
 Packs parameter into message.
 Calls : Send & Receive.
 Server Stub
 Calls : Receive & Send.
 Unpacks parameter from the message.
 Details of message passing are hidden – two
libraries.
Cont…
Steps
1. The client procedure calls the client stub in the normal way.
2. The client stub builds a message and traps to the kernel.
3. The kernel sends the message to the remote kernel.
4. The remote kernel gives the message to the server stub.
5. The server stub unpacks the parameters and calls the server.
6. The server does the work and returns the result to the stub.
7. The server stub packs it in a message and traps to the kernel.
8. The remote kernel sends the message to the clients kernel.
9. The client’s kernel gives the message to the client stub.
10. The stub unpacks the result and returns to the client.
Parameter Passing
 Parameter Marshaling.
 Ex: Remote procedure “sum( i, j)”.
 Identical machines.
Problems - Parameter Passing
 Different Machine Types
 Ex: IBM mainframes (EBCDIC) & IBM PCs(ASCII).
 Different representation of Integers (1s
compliment & 2s Compliment), Floating point
numbers.
 Numbering of bytes
 Right to Left (Ex: Intel 486) – Little Endian.
 Left to Right (Ex: Sun SPARC) – Big Endian.
Example - 1
Example - 2
Representation of Information
 Canonical Form
 Convert internal representation while
marshaling.
 Ex:
 2’s compliment for integers.
 0 for ASCII.
 1 for Boolean.
 IEEE format for floating point no.
Pointer Passing
 One way is to forbid the pointers & reference parameters in
general. – Highly undesirable
 One strategy is copying the whole array/structure (simple)
into message.
 Call by reference is replaced by copy/restore.
 Optimization – Buffer knows if stub is an input / output
parameter. (Twice as efficient).
 Pointer is followed (dereferenced) by putting it in the
register. – Highly Inefficient.
Dynamic Binding
 Hardwiring network add. of server into client –
Extremely Inflexible
 To avoid problems like
 Replication of server
 Relocation
 Migration
 Interface Change
Terms
 Exports Interface
 Imports Interface
 Binder
 Registering
 Unique Id – Typically 32 bit long
 Handle
 System Dependent
 IP Add. , Ethernet Add. , etc.
Disadvantages
 Overhead Exporting & Importing
 Costs Time
 Many short lived client process may have to start over
again.
 Binder may act as bottleneck in distributed system.
 Registering / Deregistering of interfaces creates more
overhead.
RPC semantics-presence of failures
 Unable to locate the server
 Lost request message
 Lost reply message
 Server crashes
 Client crashes
Unable to locate the server
 When server is down it intimate the value
-1
 Client is unable to locate the server
Lost request message
 Message send from client to server is lost
Lost reply message
 Reply message from server to client is lost
Server crashes
 Server crashes after receiving a request
 Solutions
 Atleast one semantic
 Atmost one semantic
 Exactly one semantic
Client crashes
 Client crashes after sending a request
 Solution is extermination
Protocols for RPCs
1. Request protocol
2. Request / Reply protocol
3. Request /Reply /Acknowledge-Reply
protocol
Request (R) protocol
Client Server
First
RPC
Next
RPC
Request message
Request message Procedure
execution
Procedure
execution
Request / Reply (RR) protocol
Client Server
First
RPC
Next
RPC
Request message
Request message
Procedure
execution
Procedure
execution
Reply message
Reply message
Also serves as acknowledgement
for the request message
Also serves as acknowledgement
for the request message
Also serves as acknowledgement
for the reply of the previous RPC
Request / Reply / Ack. (RRA) protocol
Client Server
First
RPC
Next
RPC
Request message
Request message
Procedure
execution
Procedure
execution
Reply message
Reply message
Reply acknowledgement message
Reply acknowledgement message
Rpc

More Related Content

What's hot

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
Satya P. Joshi
 
message passing
 message passing message passing
message passing
Ashish Kumar
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
Ashish Kumar
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
Sunita Sahu
 
Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)
Peter R. Egli
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
VIKASH MAINANWAL
 
Rpc
RpcRpc
RPC communication,thread and processes
RPC communication,thread and processesRPC communication,thread and processes
RPC communication,thread and processes
shraddha mane
 
Remote Procedure Call (RPC) Server creation semantics & call semantics
Remote Procedure Call (RPC) Server creation semantics & call semanticsRemote Procedure Call (RPC) Server creation semantics & call semantics
Remote Procedure Call (RPC) Server creation semantics & call semantics
svm
 
Rpc mechanism
Rpc mechanismRpc mechanism
Rpc mechanism
vaishali_singh
 
Internet
InternetInternet
Internet
Jack Nicole
 
Remote method invocation (RMI)
Remote method invocation (RMI)Remote method invocation (RMI)
Remote method invocation (RMI)
AbdolNaser Dorgalaleh
 
13 tm adv
13 tm adv13 tm adv
13 tm adv
ashish61_scs
 
5. Distributed Operating Systems
5. Distributed Operating Systems5. Distributed Operating Systems
5. Distributed Operating Systems
Dr Sandeep Kumar Poonia
 
communication Mechanism in Client Server Model
communication Mechanism in Client Server Model communication Mechanism in Client Server Model
communication Mechanism in Client Server Model
Junaid Lodhi
 
Group Communication (Distributed computing)
Group Communication (Distributed computing)Group Communication (Distributed computing)
Group Communication (Distributed computing)
Sri Prasanna
 
Data Replication in Distributed System
Data Replication in  Distributed SystemData Replication in  Distributed System
Data Replication in Distributed System
Ehsan Hessami
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01
Zaigham Abbas
 
transport layer
transport layer transport layer
transport layer
usman19
 

What's hot (19)

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
 
message passing
 message passing message passing
message passing
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Rpc
RpcRpc
Rpc
 
RPC communication,thread and processes
RPC communication,thread and processesRPC communication,thread and processes
RPC communication,thread and processes
 
Remote Procedure Call (RPC) Server creation semantics & call semantics
Remote Procedure Call (RPC) Server creation semantics & call semanticsRemote Procedure Call (RPC) Server creation semantics & call semantics
Remote Procedure Call (RPC) Server creation semantics & call semantics
 
Rpc mechanism
Rpc mechanismRpc mechanism
Rpc mechanism
 
Internet
InternetInternet
Internet
 
Remote method invocation (RMI)
Remote method invocation (RMI)Remote method invocation (RMI)
Remote method invocation (RMI)
 
13 tm adv
13 tm adv13 tm adv
13 tm adv
 
5. Distributed Operating Systems
5. Distributed Operating Systems5. Distributed Operating Systems
5. Distributed Operating Systems
 
communication Mechanism in Client Server Model
communication Mechanism in Client Server Model communication Mechanism in Client Server Model
communication Mechanism in Client Server Model
 
Group Communication (Distributed computing)
Group Communication (Distributed computing)Group Communication (Distributed computing)
Group Communication (Distributed computing)
 
Data Replication in Distributed System
Data Replication in  Distributed SystemData Replication in  Distributed System
Data Replication in Distributed System
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01
 
transport layer
transport layer transport layer
transport layer
 

Similar to Rpc

Lecture9
Lecture9Lecture9
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
sehrish saba
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMI
Prajakta Rane
 
DS-Chapter DDEFR2-Communication_105220.ppt
DS-Chapter DDEFR2-Communication_105220.pptDS-Chapter DDEFR2-Communication_105220.ppt
DS-Chapter DDEFR2-Communication_105220.ppt
menoralemu03
 
Byte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptxByte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptx
RockyBhai46825
 
Communication in Distributed System.ppt
Communication in Distributed System.pptCommunication in Distributed System.ppt
Communication in Distributed System.ppt
SELVAVINAYAGAMG
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.ppt
sirajmohammed35
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
Gd Goenka University
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptxDistributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptx
ssuser376193
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptxDistributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptx
ssuser376193
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
FamiDan
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
Mayank Jain
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
Nadia Nahar
 
MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
MOHD. SHAHRUKH BHATI
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
MNM Jain Engineering College
 
Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020
Avishek Sarkar
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
sanjoysanyal
 
Socket Programming
Socket ProgrammingSocket Programming
Socket Programming
CEC Landran
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
Sri Prasanna
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
DBU
 

Similar to Rpc (20)

Lecture9
Lecture9Lecture9
Lecture9
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMI
 
DS-Chapter DDEFR2-Communication_105220.ppt
DS-Chapter DDEFR2-Communication_105220.pptDS-Chapter DDEFR2-Communication_105220.ppt
DS-Chapter DDEFR2-Communication_105220.ppt
 
Byte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptxByte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptx
 
Communication in Distributed System.ppt
Communication in Distributed System.pptCommunication in Distributed System.ppt
Communication in Distributed System.ppt
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.ppt
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptxDistributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptx
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptxDistributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptx
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
 
Socket Programming
Socket ProgrammingSocket Programming
Socket Programming
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 

Recently uploaded

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 

Recently uploaded (20)

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 

Rpc

  • 1. Remote Procedure Calls By P.SAHITHI CHAITANYA (1551210075) A.RAMPRAKASH REDDY(1551210077) G.V.R.SHASHANK(1551210080)
  • 2. Introduction  Inter-process communication (IPC).  Another virtual address space.  Another process on the same machine.  Another process on different machine.  Hides remote interaction.  Network programming standard 1980s  Builds on named pipes or Winsock.  Remote Method Invocation (RMI)
  • 4. Cont….  When client code calls a remote procedure, the client stub code  Retrieves the required parameters from the client address space.  Marshals1 the parameters as needed into a standard NDR2 format for transmission over the network.  Calls functions in the RPC client run-time library to send the request and its parameters to the server. 1 Marshalling (similar to serialization) is the process of transforming the memory representation of an object to a data format suitable for storage or transmission 2 Network Data Representation (NDR) is an implementation of the presentation layer in the OSI model.
  • 5. Cont…  The server performs the following steps to call the remote procedure:  The server RPC run-time library functions accept the request and call the server stub procedure.  The server stub retrieves the parameters from the network buffer and converts (i.e. unmarshals) them from the network transmission format to the format the server needs.  The server stub calls the actual procedure on the server.
  • 6. Stubs  Client stub  Packs parameter into message.  Calls : Send & Receive.  Server Stub  Calls : Receive & Send.  Unpacks parameter from the message.  Details of message passing are hidden – two libraries.
  • 8. Steps 1. The client procedure calls the client stub in the normal way. 2. The client stub builds a message and traps to the kernel. 3. The kernel sends the message to the remote kernel. 4. The remote kernel gives the message to the server stub. 5. The server stub unpacks the parameters and calls the server. 6. The server does the work and returns the result to the stub. 7. The server stub packs it in a message and traps to the kernel. 8. The remote kernel sends the message to the clients kernel. 9. The client’s kernel gives the message to the client stub. 10. The stub unpacks the result and returns to the client.
  • 9. Parameter Passing  Parameter Marshaling.  Ex: Remote procedure “sum( i, j)”.  Identical machines.
  • 10. Problems - Parameter Passing  Different Machine Types  Ex: IBM mainframes (EBCDIC) & IBM PCs(ASCII).  Different representation of Integers (1s compliment & 2s Compliment), Floating point numbers.  Numbering of bytes  Right to Left (Ex: Intel 486) – Little Endian.  Left to Right (Ex: Sun SPARC) – Big Endian.
  • 13. Representation of Information  Canonical Form  Convert internal representation while marshaling.  Ex:  2’s compliment for integers.  0 for ASCII.  1 for Boolean.  IEEE format for floating point no.
  • 14. Pointer Passing  One way is to forbid the pointers & reference parameters in general. – Highly undesirable  One strategy is copying the whole array/structure (simple) into message.  Call by reference is replaced by copy/restore.  Optimization – Buffer knows if stub is an input / output parameter. (Twice as efficient).  Pointer is followed (dereferenced) by putting it in the register. – Highly Inefficient.
  • 15. Dynamic Binding  Hardwiring network add. of server into client – Extremely Inflexible  To avoid problems like  Replication of server  Relocation  Migration  Interface Change
  • 16. Terms  Exports Interface  Imports Interface  Binder  Registering  Unique Id – Typically 32 bit long  Handle  System Dependent  IP Add. , Ethernet Add. , etc.
  • 17. Disadvantages  Overhead Exporting & Importing  Costs Time  Many short lived client process may have to start over again.  Binder may act as bottleneck in distributed system.  Registering / Deregistering of interfaces creates more overhead.
  • 18. RPC semantics-presence of failures  Unable to locate the server  Lost request message  Lost reply message  Server crashes  Client crashes
  • 19. Unable to locate the server  When server is down it intimate the value -1  Client is unable to locate the server
  • 20. Lost request message  Message send from client to server is lost
  • 21. Lost reply message  Reply message from server to client is lost
  • 22. Server crashes  Server crashes after receiving a request  Solutions  Atleast one semantic  Atmost one semantic  Exactly one semantic
  • 23. Client crashes  Client crashes after sending a request  Solution is extermination
  • 24. Protocols for RPCs 1. Request protocol 2. Request / Reply protocol 3. Request /Reply /Acknowledge-Reply protocol
  • 25. Request (R) protocol Client Server First RPC Next RPC Request message Request message Procedure execution Procedure execution
  • 26. Request / Reply (RR) protocol Client Server First RPC Next RPC Request message Request message Procedure execution Procedure execution Reply message Reply message Also serves as acknowledgement for the request message Also serves as acknowledgement for the request message Also serves as acknowledgement for the reply of the previous RPC
  • 27. Request / Reply / Ack. (RRA) protocol Client Server First RPC Next RPC Request message Request message Procedure execution Procedure execution Reply message Reply message Reply acknowledgement message Reply acknowledgement message

Editor's Notes

  1. Extended Binary Coded Decimal Interchange Code  ( EBCDIC ) American Standard Code for Information Interchange(ASCII)