RMC-Remote Procedure Call
M.Jagadeesh, Assistant Professor, Information Technology,
MNM Jain Engineering College, Chennai
Styles of exchange protocols
Request (R) protocol-
No requirement of reply or acknowledgment .
Soon after request, the client carries out with
the other application. Implemented over
datagram protocol.
Request- reply protocol(RR) –
No ACK required because reply acts as ACK.
Implemented on UDP.
Request- reply- ACK protocol(RRA)-
The ACK message contains requestId from the
reply message being acknowledged. The arrival
of requestId in ACK is interpreted as ACK
receipt of all reply messages with lower
requestId.
Definition of Remote Procedure Call
When a process on machine A
calls a procedure on machine B,
the calling process on A is
suspended, and 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. This method
is known as Remote Procedure
Call.
A procedure call is also
sometimes known as a function
call or a subroutine call.
Message passing is hidden to the
programmer.
RPC Model
It is similar to commonly used procedure call
model. RPC is generally implemented over a
request- reply protocol. It works in the following
manner:
1. For making a procedure call, the caller places
arguments to the procedure in some well specified
location.
2. Control is then transferred to the sequence of
instructions that constitutes the body of the
procedure.
3. The procedure body is executed in a newly created
execution environment that includes copies of the
arguments given in the calling instruction.
4. After the procedure execution is over, control
returns to the calling point, returning a result.
Difference between local and
remote procedure call
 Local procedure call is done either by call by value
or call by address/ reference.
 Disjoint Address Space-In remote procedure call ,
this is not possible because the address space of
procedure calling and one that is called are
different.
 So RPC can be done by *stubs- proxies, Flattening-
marshalling.
 *Stubs- A stub is a piece of code that is used to
convert parameters during a RPC. Since RPC
allows a client computer to call remote procedures
on server as local procedures, the parameters
used in function call have to be converted. Stub
libraries are installed on the client and server.
Remote Procedure Call
Steps in a remote procedure call
 The client calls a local procedure, called the client stub. To the client process,
this appears to be the actual procedure, because it is a regular local
procedure. It just does something different since the real procedure is on the
server. The client stub packages the parameters to the remote procedure
(this may involve converting them to a standard format) and builds one or
more network messages. The packaging of arguments into a network
message is called marshaling and requires serializing all the data elements
into a flat array-of-bytes format.
 Network messages are sent by the client stub to the remote system (via a
system call to the local kernel using sockets interfaces).
 Network messages are transferred by the kernel to the remote system via
some protocol (either connectionless or connection-oriented).
 A server stub, sometimes called the skeleton, receives the messages on the
server. It unmarshals the arguments from the messages and, if necessary,
converts them from a standard network format into a machine-specific form.
 The server stub calls the server function (which, to the client, is
the remote procedure), passing it the arguments that it received
from the client.
 When the server function is finished, it returns to the server stub
with its return values.
 The server stub converts the return values, if necessary, and
marshals them into one or more network messages to send to the
client stub.
 Messages get sent back across the network to the client stub.
 The client stub reads the messages from the local kernel.
 The client stub then returns the results to the client function,
converting them from the network representation to a local one if
necessary.
 The client code then continues its execution.
Transparency of RPC
1. Syntactic Transparency means that the
remote procedure call should have exactly
the same syntax as a local procedure call.
2. Semantic Transparency means that the
semantics of a remote procedure call are
identical to those of a local procedure call
 RPC procedure call semantics
RPC supports 3 different “call semantics” that
define the level of guarantee of requests:
1. maybe call semantics.
2. at-least-once call semantics.
3. at-most-once call semantics.
maybe call semantics:
 No retransmission of request messages.
 Client is not certain whether the procedure has been executed or
not.
 No fault-tolerance measures (RPC call may or may not be
successful).
 Generally not acceptable (low level of guarantee).
at-least-once call semantics:
 The message module repeatedly resends request messages after
timeouts occur until it either gets a reply message or a
maximum number of retries have been made.
 No duplicate request message filtering.
 The remote procedure is called at least once if the server is not
down.
 The client does not know how many times the remote procedure
has been called. This could produce undesirable results (e.g.,
money transfer) unless the called procedure is “idempotent” (=
repeatable with the same effect as a single call).
at-most-once call semantics:
 Retransmission of request messages.
 Duplicate request message filtering.
 If the server does not crash and the client receives the
result of a call, then the procedure has been called
exactly once. Otherwise, an exception is reported and
the procedure will have been called either once or not at
all.
 Works for both idempotent and non-idempotent
operations.
 More complex support required due to the need for
request message filtering and for keeping track of
replies.
Comparison

More Related Content

PPT
Peer to Peer services and File systems
PPT
Remote method invocation
PPT
Distributed System-Multicast & Indirect communication
PDF
Analysis of mutual exclusion algorithms with the significance and need of ele...
PPTX
Message and Stream Oriented Communication
PPTX
Communication And Synchronization In Distributed Systems
PPTX
Message Passing Systems
PPTX
Middleware in Distributed System-RPC,RMI
Peer to Peer services and File systems
Remote method invocation
Distributed System-Multicast & Indirect communication
Analysis of mutual exclusion algorithms with the significance and need of ele...
Message and Stream Oriented Communication
Communication And Synchronization In Distributed Systems
Message Passing Systems
Middleware in Distributed System-RPC,RMI

What's hot (20)

PPT
Chapter 11
PDF
Distributed Coordination-Based Systems
PDF
5. Distributed Operating Systems
PPT
Group Communication (Distributed computing)
PPTX
Distributed Mutual Exclusion and Distributed Deadlock Detection
PPTX
Remoting and serialization
PPT
2.communcation in distributed system
PPT
Process Management-Process Migration
PPTX
Load Balancing In Distributed Computing
PPT
message passing
PDF
Task communication
PPT
Communications is distributed systems
PPTX
Message passing ( in computer science)
DOC
Distributed Mutual exclusion algorithms
PPT
remote procedure calls
PPSX
Data Replication in Distributed System
PPT
Mutual Exclusion Election (Distributed computing)
PPT
Communication primitives
PPTX
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
DOC
A new, efficiet coordinated checkpointing protocol combined with selective se...
Chapter 11
Distributed Coordination-Based Systems
5. Distributed Operating Systems
Group Communication (Distributed computing)
Distributed Mutual Exclusion and Distributed Deadlock Detection
Remoting and serialization
2.communcation in distributed system
Process Management-Process Migration
Load Balancing In Distributed Computing
message passing
Task communication
Communications is distributed systems
Message passing ( in computer science)
Distributed Mutual exclusion algorithms
remote procedure calls
Data Replication in Distributed System
Mutual Exclusion Election (Distributed computing)
Communication primitives
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
A new, efficiet coordinated checkpointing protocol combined with selective se...
Ad

Similar to Remote Procedure Call (20)

PPTX
RPC: Remote procedure call
PPTX
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
PPTX
Dos(rpc)avishek130650107020
PPT
Remote invocation
PPTX
Remote procedure call on client server computing
PPTX
Remote procedure call
DOC
Remote procedure calls
PDF
PPTX
CHP-4.pptx
PPT
DS-Chapter DDEFR2-Communication_105220.ppt
RTF
MSB-Remote procedure call
PPT
Distributes objects and Rmi
PPTX
Chapter 2- distributed system Communication.pptx
PDF
Sun RPC (Remote Procedure Call)
PDF
COMMUNICATION IN DISTRIBUTED SYSTEMS
PDF
CS9222 ADVANCED OPERATING SYSTEMS
DOCX
Remote Procedure Call
PPT
PPTX
Distributed Objects and Remote Invocation
PDF
Client Server Model and Distributed Computing
RPC: Remote procedure call
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
Dos(rpc)avishek130650107020
Remote invocation
Remote procedure call on client server computing
Remote procedure call
Remote procedure calls
CHP-4.pptx
DS-Chapter DDEFR2-Communication_105220.ppt
MSB-Remote procedure call
Distributes objects and Rmi
Chapter 2- distributed system Communication.pptx
Sun RPC (Remote Procedure Call)
COMMUNICATION IN DISTRIBUTED SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
Remote Procedure Call
Distributed Objects and Remote Invocation
Client Server Model and Distributed Computing
Ad

More from MNM Jain Engineering College (12)

DOCX
IT8602 MOBILE COMMUNICATION.docx
PDF
IT8602 Syllabus.pdf
DOC
PDF
DOC
Task assignment approach
DOC
Naming in Distributed System
PPT
Engineering Ethics
DOCX
It6312 dbms lab-ex2
DOCX
Expected questions in Artificial Intelligence
PDF
Qp mobile & pervasive 2015
DOC
It6611 mobile application development laboratory l t p c0 0 3 2
PDF
Instruction formats-in-8086
IT8602 MOBILE COMMUNICATION.docx
IT8602 Syllabus.pdf
Task assignment approach
Naming in Distributed System
Engineering Ethics
It6312 dbms lab-ex2
Expected questions in Artificial Intelligence
Qp mobile & pervasive 2015
It6611 mobile application development laboratory l t p c0 0 3 2
Instruction formats-in-8086

Recently uploaded (20)

PPTX
Education and Perspectives of Education.pptx
PPTX
DRUGS USED FOR HORMONAL DISORDER, SUPPLIMENTATION, CONTRACEPTION, & MEDICAL T...
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PPTX
Core Concepts of Personalized Learning and Virtual Learning Environments
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
Journal of Dental Science - UDMY (2022).pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
Journal of Dental Science - UDMY (2021).pdf
PDF
CRP102_SAGALASSOS_Final_Projects_2025.pdf
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
Climate Change and Its Global Impact.pptx
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Education and Perspectives of Education.pptx
DRUGS USED FOR HORMONAL DISORDER, SUPPLIMENTATION, CONTRACEPTION, & MEDICAL T...
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Core Concepts of Personalized Learning and Virtual Learning Environments
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
Journal of Dental Science - UDMY (2022).pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
B.Sc. DS Unit 2 Software Engineering.pptx
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
Journal of Dental Science - UDMY (2021).pdf
CRP102_SAGALASSOS_Final_Projects_2025.pdf
Unit 4 Computer Architecture Multicore Processor.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Climate Change and Its Global Impact.pptx
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
Introduction to pro and eukaryotes and differences.pptx
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf

Remote Procedure Call

  • 1. RMC-Remote Procedure Call M.Jagadeesh, Assistant Professor, Information Technology, MNM Jain Engineering College, Chennai
  • 2. Styles of exchange protocols Request (R) protocol- No requirement of reply or acknowledgment . Soon after request, the client carries out with the other application. Implemented over datagram protocol. Request- reply protocol(RR) – No ACK required because reply acts as ACK. Implemented on UDP. Request- reply- ACK protocol(RRA)- The ACK message contains requestId from the reply message being acknowledged. The arrival of requestId in ACK is interpreted as ACK receipt of all reply messages with lower requestId.
  • 3. Definition of Remote Procedure Call When a process on machine A calls a procedure on machine B, the calling process on A is suspended, and 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. This method is known as Remote Procedure Call. A procedure call is also sometimes known as a function call or a subroutine call. Message passing is hidden to the programmer.
  • 4. RPC Model It is similar to commonly used procedure call model. RPC is generally implemented over a request- reply protocol. It works in the following manner: 1. For making a procedure call, the caller places arguments to the procedure in some well specified location. 2. Control is then transferred to the sequence of instructions that constitutes the body of the procedure. 3. The procedure body is executed in a newly created execution environment that includes copies of the arguments given in the calling instruction. 4. After the procedure execution is over, control returns to the calling point, returning a result.
  • 5. Difference between local and remote procedure call  Local procedure call is done either by call by value or call by address/ reference.  Disjoint Address Space-In remote procedure call , this is not possible because the address space of procedure calling and one that is called are different.  So RPC can be done by *stubs- proxies, Flattening- marshalling.  *Stubs- A stub is a piece of code that is used to convert parameters during a RPC. Since RPC allows a client computer to call remote procedures on server as local procedures, the parameters used in function call have to be converted. Stub libraries are installed on the client and server.
  • 7. Steps in a remote procedure call
  • 8.  The client calls a local procedure, called the client stub. To the client process, this appears to be the actual procedure, because it is a regular local procedure. It just does something different since the real procedure is on the server. The client stub packages the parameters to the remote procedure (this may involve converting them to a standard format) and builds one or more network messages. The packaging of arguments into a network message is called marshaling and requires serializing all the data elements into a flat array-of-bytes format.  Network messages are sent by the client stub to the remote system (via a system call to the local kernel using sockets interfaces).  Network messages are transferred by the kernel to the remote system via some protocol (either connectionless or connection-oriented).  A server stub, sometimes called the skeleton, receives the messages on the server. It unmarshals the arguments from the messages and, if necessary, converts them from a standard network format into a machine-specific form.
  • 9.  The server stub calls the server function (which, to the client, is the remote procedure), passing it the arguments that it received from the client.  When the server function is finished, it returns to the server stub with its return values.  The server stub converts the return values, if necessary, and marshals them into one or more network messages to send to the client stub.  Messages get sent back across the network to the client stub.  The client stub reads the messages from the local kernel.  The client stub then returns the results to the client function, converting them from the network representation to a local one if necessary.  The client code then continues its execution.
  • 10. Transparency of RPC 1. Syntactic Transparency means that the remote procedure call should have exactly the same syntax as a local procedure call. 2. Semantic Transparency means that the semantics of a remote procedure call are identical to those of a local procedure call
  • 11.  RPC procedure call semantics RPC supports 3 different “call semantics” that define the level of guarantee of requests: 1. maybe call semantics. 2. at-least-once call semantics. 3. at-most-once call semantics.
  • 12. maybe call semantics:  No retransmission of request messages.  Client is not certain whether the procedure has been executed or not.  No fault-tolerance measures (RPC call may or may not be successful).  Generally not acceptable (low level of guarantee). at-least-once call semantics:  The message module repeatedly resends request messages after timeouts occur until it either gets a reply message or a maximum number of retries have been made.  No duplicate request message filtering.  The remote procedure is called at least once if the server is not down.  The client does not know how many times the remote procedure has been called. This could produce undesirable results (e.g., money transfer) unless the called procedure is “idempotent” (= repeatable with the same effect as a single call).
  • 13. at-most-once call semantics:  Retransmission of request messages.  Duplicate request message filtering.  If the server does not crash and the client receives the result of a call, then the procedure has been called exactly once. Otherwise, an exception is reported and the procedure will have been called either once or not at all.  Works for both idempotent and non-idempotent operations.  More complex support required due to the need for request message filtering and for keeping track of replies.