SlideShare a Scribd company logo
1 of 31
REMOTE PROCEDURE
CALL
NAME:- MANOJ PARIHAR
SCHOOL:- SITAICS - M.TECH CS
RASHTRIYA RAKSHA UNIVERSITY
INTRODUCTION
● Remote Procedure Call (RPC) is a high-level model for
client-server communication.
● A remote procedure call is an interprocess
communication technique that is used for client-
server based applications. It is also known as a
subroutine call or a function call.
INTRODUCTION
● A client has a request message that the RPC
translates and sends to the server. This request may
be a procedure or a function call to a remote server.
When the server receives the request, it sends the
required response back to the client. The client is
blocked while the server is processing the call and
only resumed execution after the server is finished.
● Examples: File service, Authentication service.
INTRODUCTION
❖ Why we need Remote Procedure Call (RPC)?
● The client needs a easy way to call the procedures of
the server to get some services.
● RPC enables clients to communicate with servers by
calling procedures in a similar way to the
conventional use of procedure calls in high-level
languages.
● RPC is modeled on the local procedure call, but the
called procedure is executed in a different process
and usually a different computer.
INTRODUCTION
❖ How to operate RPC?
● When a process on machine A calls a procedure on
machine B, the calling process on A is suspended,
and the execution of the called procedure takes place
on B.
● Information can be transported from the caller to the
callee in the parameters and can come back in the
procedure result.
● No message passing or I/O at all is visible to the
programmer.
TYPES OF RPC
❖ Three types of RPC are:
➔ Callback RPC
➔ Broadcast RPC
➔ Batch-mode RPC
CALLBACK RPC
➔ This type of RPC enables a P2P paradigm
between participating processes. It helps a
process to be both client and server
services.
FUNCTIONS OF CALLBACK RPC:
★ Remotely processed interactive application
problems
★ Offers server with clients handle
★ Callback makes the client process wait
★ Manage callback deadlocks
★ It facilitates a peer-to-Peer paradigm among
participating processes.
BROADCAST RPC
➔ Broadcast RPC is a client’s request, that is
broadcast on the network, processed by all
servers which have the method for
processing that request.
FUNCTIONS OF BROADCAST RPC:
★ Allows you to specify that the client’s
request message has to be broadcasted.
★ You can declare broadcast ports.
★ It helps to reduce the load on the physical
network.
BATCH-MODE RPC
➔ Batch-mode RPC helps to queue, separate
RPC requests, in a transmission buffer, on
the client-side, and then send them on a
network in one batch to the server.
FUNCTIONS OF BATCH-MODE RPC:
★ It minimizes overhead involved in sending a
request as it sends them over the network in
one batch to the server.
★ This type of RPC protocol is only efficient for
the application that needs lower call rates.
★ It needs a reliable transmission protocol.
THE RPC MODEL
DESIGN ISSUES
★ Exception handling
➔ Necessary because of possibility of network
and nodes failures;
➔ RPC uses return value to indicate errors;
★ Transparency
➔ Syntactic - achievable, exactly the same
syntax as a local procedure call.
➔ Semantic - impossible because of RPC
limitation: failure (similar but not exactly the
same).
RPC MECHANISM
● Based on concepts of stubs
● Stub is a code used for converting parameter
used in procedure call
● RPC involves Client & Server Process
★ Mechanism involves following five elements:
❏ The Client
❏ The Client Stub
❏ The RPCRuntime
❏ The Server Stub
❏ The Server
RPC MECHANISM
Steps of a Remote Procedure Call
➢ Client procedure calls client stub in normal way
➢ Client stub builds message, calls local OS
➢ Client's OS sends message to remote OS
➢ Remote OS gives message to server stub
➢ Server stub unpacks parameters, calls server
➢ Server does work, returns result to the stub
➢ Server stub packs it in message, calls local OS
➢ Server's OS sends message to client's OS
➢ Client's OS gives message to client stub
➢ Stub unpacks result, returns to client
★ Client:
➢ Initiates RPC
➢ Makes a local call that invokes a
corresponding procedure in the client stub
★ Client Stub:
1. Receiving a call request from client:
➢ Packs the specification of the target
procedure & the arguments into a message
➢ Asks local RPCRuntime to send it to server
stub
1. Receiving result of procedure execution
➢ Unpacks the result & passes it to the client
RPCRuntime:
★ Client Machine
1. Receive call request message from Client
Stub & sends to server machine
2. Receives the message containing the result
of procedure execution from the server
machine & sends to client stub
★ Server Machine
1. Receives the message containing the result
of procedure execution from the server stub
& sends it to client machine
2. Receive call request message from the client
machine & sends it to server stub
★ Server Stub:
1. Receiving a call request from local
RPCRuntime:
● Unpacks & makes a normal call to
invoke the appropriate procedure in
Server
● Receiving result of procedure
execution
I. Packs the result into a message
II. Asks local RPCRuntime to send it to
client stub
★ Server:
1. Receiving a call request from the server
stub
● Executes the appropriate procedure
● Returns the result of execution to the
server stub
STUB GENERATION
★ Manually
1. The RPC implementor provides a set of
translation functions from which a user
can construct his/her own stubs
2. It is simple to implement and can
handle very complex parameter types
★ Automatically
1. Uses Interface Definition Language(IDL)
MARSHALING ARGUMENTS & RESULT
❏ The transfer of message data between
two computers requires encoding &
decoding of the message data
❏ This operation in RPCs is known as
Marshaling
➔ Actions involved in Marshaling
1. Taking the arguments
2. Encoding the message data on sender’s
computer
3. Decoding the message data on
receiver’s computer
CHARACTERISTICS
★ The called procedure is in another
process which may reside in another
machine.
★ The processes do not share address
space.
★ Parameters are passed by values.
CHARACTERISTICS
★ The called remote procedure executes
within the environment of the server
process.
1. The called procedure does not have
access to the calling procedure environment.
FEATURES
➔ Simple call syntax
➔ Familiar semantics
➔ Well defined interface
➔ Ease of use
➔ Efficient
Can communicate between processes on
the same machine or different machines
ADVANTAGE OF REMOTE PROCEDURE CALL
Some of the advantages of RPC are as
follows −
➔ Remote procedure calls support
process oriented and thread oriented
models.
➔ The internal message passing
mechanism of RPC is hidden from the
user.
➔ The effort to re-write and re-develop the
code is minimum in remote procedure
calls.
ADVANTAGE OF REMOTE PROCEDURE CALL
➔ Remote procedure calls can be used in
distributed environment as well as the
local environment.
➔ Many of the protocol layers are omitted
by RPC to improve performance.
DISADVANTAGE OF REMOTE PROCEDURE CALL
Some of the disadvantages of RPC are as follows
−
➔ The remote procedure call is a concept that
can be implemented in different ways. It is not
a standard.
➔ There is no flexibility in RPC for hardware
architecture. It is only interaction based.
➔ There is an increase in costs because of
remote procedure call.
● PROGRAMMING
● CLOUD
● DEVOPS
APPLICATION WHERE RPC IS USE
THANK YOU

More Related Content

What's hot

Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)Respa Peter
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram ProtocolPeter R. Egli
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmBushra M
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure callsAshish Kumar
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layertmavroidis
 
Point To Point Protocol
Point To Point ProtocolPoint To Point Protocol
Point To Point ProtocolPhan Vuong
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distributionRiya Choudhary
 
Congestion control
Congestion controlCongestion control
Congestion controlAman Jaiswal
 
resource management
  resource management  resource management
resource managementAshish Kumar
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSADr.Florence Dayana
 

What's hot (20)

Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram Protocol
 
Web Security
Web SecurityWeb Security
Web Security
 
Multicast routing
Multicast routingMulticast routing
Multicast routing
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
IP Multicasting
IP MulticastingIP Multicasting
IP Multicasting
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Routing
RoutingRouting
Routing
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layer
 
Point To Point Protocol
Point To Point ProtocolPoint To Point Protocol
Point To Point Protocol
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Network software
Network softwareNetwork software
Network software
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
 
Congestion control
Congestion controlCongestion control
Congestion control
 
resource management
  resource management  resource management
resource management
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSA
 

Similar to Remote procedure call

Similar to Remote procedure call (20)

Remote procedure calls
Remote procedure callsRemote procedure calls
Remote procedure calls
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMI
 
Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020
 
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
 
Grpc present
Grpc presentGrpc present
Grpc present
 
Remote invocation
Remote invocationRemote invocation
Remote invocation
 
Lecture9
Lecture9Lecture9
Lecture9
 
Byte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptxByte Ordering - Unit 2.pptx
Byte Ordering - Unit 2.pptx
 
Rpc
RpcRpc
Rpc
 
5. Distributed Operating Systems
5. Distributed Operating Systems5. Distributed Operating Systems
5. Distributed Operating Systems
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
 
Rpc
RpcRpc
Rpc
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
 
Cs 704 d rpc
Cs 704 d rpcCs 704 d rpc
Cs 704 d rpc
 
Communication primitives
Communication primitivesCommunication primitives
Communication primitives
 
Rpc
RpcRpc
Rpc
 

Recently uploaded

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
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 Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
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
 
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
 
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
 
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
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
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
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
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
 
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
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Recently uploaded (20)

(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
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 Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
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
 
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
 
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...
 
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
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
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...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
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
 
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...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 

Remote procedure call

  • 1. REMOTE PROCEDURE CALL NAME:- MANOJ PARIHAR SCHOOL:- SITAICS - M.TECH CS RASHTRIYA RAKSHA UNIVERSITY
  • 2. INTRODUCTION ● Remote Procedure Call (RPC) is a high-level model for client-server communication. ● A remote procedure call is an interprocess communication technique that is used for client- server based applications. It is also known as a subroutine call or a function call.
  • 3. INTRODUCTION ● A client has a request message that the RPC translates and sends to the server. This request may be a procedure or a function call to a remote server. When the server receives the request, it sends the required response back to the client. The client is blocked while the server is processing the call and only resumed execution after the server is finished. ● Examples: File service, Authentication service.
  • 4. INTRODUCTION ❖ Why we need Remote Procedure Call (RPC)? ● The client needs a easy way to call the procedures of the server to get some services. ● RPC enables clients to communicate with servers by calling procedures in a similar way to the conventional use of procedure calls in high-level languages. ● RPC is modeled on the local procedure call, but the called procedure is executed in a different process and usually a different computer.
  • 5. INTRODUCTION ❖ How to operate RPC? ● When a process on machine A calls a procedure on machine B, the calling process on A is suspended, and the execution of the called procedure takes place on B. ● Information can be transported from the caller to the callee in the parameters and can come back in the procedure result. ● No message passing or I/O at all is visible to the programmer.
  • 6. TYPES OF RPC ❖ Three types of RPC are: ➔ Callback RPC ➔ Broadcast RPC ➔ Batch-mode RPC
  • 7. CALLBACK RPC ➔ This type of RPC enables a P2P paradigm between participating processes. It helps a process to be both client and server services.
  • 8. FUNCTIONS OF CALLBACK RPC: ★ Remotely processed interactive application problems ★ Offers server with clients handle ★ Callback makes the client process wait ★ Manage callback deadlocks ★ It facilitates a peer-to-Peer paradigm among participating processes.
  • 9. BROADCAST RPC ➔ Broadcast RPC is a client’s request, that is broadcast on the network, processed by all servers which have the method for processing that request.
  • 10. FUNCTIONS OF BROADCAST RPC: ★ Allows you to specify that the client’s request message has to be broadcasted. ★ You can declare broadcast ports. ★ It helps to reduce the load on the physical network.
  • 11. BATCH-MODE RPC ➔ Batch-mode RPC helps to queue, separate RPC requests, in a transmission buffer, on the client-side, and then send them on a network in one batch to the server.
  • 12. FUNCTIONS OF BATCH-MODE RPC: ★ It minimizes overhead involved in sending a request as it sends them over the network in one batch to the server. ★ This type of RPC protocol is only efficient for the application that needs lower call rates. ★ It needs a reliable transmission protocol.
  • 14. DESIGN ISSUES ★ Exception handling ➔ Necessary because of possibility of network and nodes failures; ➔ RPC uses return value to indicate errors; ★ Transparency ➔ Syntactic - achievable, exactly the same syntax as a local procedure call. ➔ Semantic - impossible because of RPC limitation: failure (similar but not exactly the same).
  • 15. RPC MECHANISM ● Based on concepts of stubs ● Stub is a code used for converting parameter used in procedure call ● RPC involves Client & Server Process ★ Mechanism involves following five elements: ❏ The Client ❏ The Client Stub ❏ The RPCRuntime ❏ The Server Stub ❏ The Server
  • 17. Steps of a Remote Procedure Call ➢ Client procedure calls client stub in normal way ➢ Client stub builds message, calls local OS ➢ Client's OS sends message to remote OS ➢ Remote OS gives message to server stub ➢ Server stub unpacks parameters, calls server ➢ Server does work, returns result to the stub ➢ Server stub packs it in message, calls local OS ➢ Server's OS sends message to client's OS ➢ Client's OS gives message to client stub ➢ Stub unpacks result, returns to client
  • 18. ★ Client: ➢ Initiates RPC ➢ Makes a local call that invokes a corresponding procedure in the client stub ★ Client Stub: 1. Receiving a call request from client: ➢ Packs the specification of the target procedure & the arguments into a message ➢ Asks local RPCRuntime to send it to server stub 1. Receiving result of procedure execution ➢ Unpacks the result & passes it to the client
  • 19. RPCRuntime: ★ Client Machine 1. Receive call request message from Client Stub & sends to server machine 2. Receives the message containing the result of procedure execution from the server machine & sends to client stub ★ Server Machine 1. Receives the message containing the result of procedure execution from the server stub & sends it to client machine 2. Receive call request message from the client machine & sends it to server stub
  • 20. ★ Server Stub: 1. Receiving a call request from local RPCRuntime: ● Unpacks & makes a normal call to invoke the appropriate procedure in Server ● Receiving result of procedure execution I. Packs the result into a message II. Asks local RPCRuntime to send it to client stub
  • 21. ★ Server: 1. Receiving a call request from the server stub ● Executes the appropriate procedure ● Returns the result of execution to the server stub
  • 22. STUB GENERATION ★ Manually 1. The RPC implementor provides a set of translation functions from which a user can construct his/her own stubs 2. It is simple to implement and can handle very complex parameter types ★ Automatically 1. Uses Interface Definition Language(IDL)
  • 23. MARSHALING ARGUMENTS & RESULT ❏ The transfer of message data between two computers requires encoding & decoding of the message data ❏ This operation in RPCs is known as Marshaling ➔ Actions involved in Marshaling 1. Taking the arguments 2. Encoding the message data on sender’s computer 3. Decoding the message data on receiver’s computer
  • 24. CHARACTERISTICS ★ The called procedure is in another process which may reside in another machine. ★ The processes do not share address space. ★ Parameters are passed by values.
  • 25. CHARACTERISTICS ★ The called remote procedure executes within the environment of the server process. 1. The called procedure does not have access to the calling procedure environment.
  • 26. FEATURES ➔ Simple call syntax ➔ Familiar semantics ➔ Well defined interface ➔ Ease of use ➔ Efficient Can communicate between processes on the same machine or different machines
  • 27. ADVANTAGE OF REMOTE PROCEDURE CALL Some of the advantages of RPC are as follows − ➔ Remote procedure calls support process oriented and thread oriented models. ➔ The internal message passing mechanism of RPC is hidden from the user. ➔ The effort to re-write and re-develop the code is minimum in remote procedure calls.
  • 28. ADVANTAGE OF REMOTE PROCEDURE CALL ➔ Remote procedure calls can be used in distributed environment as well as the local environment. ➔ Many of the protocol layers are omitted by RPC to improve performance.
  • 29. DISADVANTAGE OF REMOTE PROCEDURE CALL Some of the disadvantages of RPC are as follows − ➔ The remote procedure call is a concept that can be implemented in different ways. It is not a standard. ➔ There is no flexibility in RPC for hardware architecture. It is only interaction based. ➔ There is an increase in costs because of remote procedure call.
  • 30. ● PROGRAMMING ● CLOUD ● DEVOPS APPLICATION WHERE RPC IS USE