SlideShare ist ein Scribd-Unternehmen logo
1 von 6
1
Remote Procedure Calls (RPC)
Introduction:
IPC part of distributed system can often be conveniently handled by message-passing model.
It doesn't offer a uniform panacea for all the needs.RPC emerged as a result of this. It can be
said as the special case of message-passing model.
Remote Procedure Call (RPC) is an inter process communication technique to allow client
and server software to communicate. RPC is a powerful technique for constructing
distributed, client-server based applications. It is based on extending the notion of
conventional or local procedure calling, so that the called procedure need not exist in the
same address space as the calling procedure. The two processes may be on the same system,
or they may be on different systems with a network connecting them. By using RPC,
programmers of distributed applications avoid the details of the interface with the network.
It has become widely accepted because of the following features:
 Simple call syntax and similarity to local procedure calls.
 It specifies a well defined interface and this property supports compile-time
type checking and automated interface generation.
 Its ease of use, efficiency and generality.
 It can be used as an IPC mechanism between
 Processes on different machines and also between different processes
on the same machine.
Transparency of RPC:
A transparent RPC is one in which the local and remote procedure calls are
indistinguishable.
 Types of transparencies:
 Syntactic transparency: A remote procedure call should have
exactly the same syntax as a local procedure call.
2
 Semantic transparency: The semantics of a remote procedure call
are identical to those of a local procedure call.
 Syntactic transparency is not an issue but semantic transparency is difficult.
Remote procedure calls vs. Local procedure calls:
Difference between remote procedure calls and local procedure calls:
1. Unlike local procedure calls, with remote procedure calls,
i. Disjoint Address Space
ii. Absence of shared memory.
iii. Meaningless making call by reference, using addresses in arguments and
pointers.
2. RPC’s are more vulnerable to failure because of:
i. Possibility of processor crashes or
ii. communication problems of a network.
3. RPC’s are much more time consuming than LPC’s due to the involvement of
communication network.
Due to these reasons, total semantic transparency is impossible.
RPC Model:
It is similar to commonly used procedure call model. It works in the following manner:
 For making a procedure call, the caller places arguments to the procedure in
some well specified location.
 Control is then transferred to the sequence of instructions that constitutes the
body of the procedure.
 The procedure body is executed in a newly created execution environment
that includes copies of the arguments given in the calling instruction.
 After the procedure execution is over, control returns to the calling point,
returning a result.
The RPC enables a call to be made to a procedure that does not reside in the address space of
the calling process. Since the caller and the callee processes have disjoint address space, the
remote procedure has no access to data and variables of the caller’s environment. RPC
3
facility uses a message-passing scheme for information exchange between the caller and the
callee processes. On arrival of request message, the server processes the following tasks:
 extracts the procedure’s parameters,
 computes the result,
 sends a reply message, and
 then awaits the next call message.
Implementing RPC Mechanism:
To achieve semantic transparency, implementation of RPC mechanism is based on the
concepts of stubs.
 Stubs: It Provide a normal / local procedure call abstraction by concealing the
underlying RPC mechanism. A separate stub procedure is associated with both the
client and server processes. To hide the underlying communication network, RPC
communication package known as RPC Runtime is used on both the sides.
4
 Thus implementation of RPC involves the five elements of program:
o Client
o Client Stub
o RPC Runtime
o Server stub
o Server
 The client, the client stub, and one instance of RPCRuntime execute on the client
machine.
 The server, the server stub, and one instance of RPCRuntime execute on the
server machine.
 As far as the client is concerned, remote services are accessed by the user by
making ordinary LPC
Client Stub:
It is responsible for the following two tasks:
 On receipt of a call request from the client,
5
o It packs specifications of the target procedure and the arguments
into a message and asks the local RPC Runtime to send it to the
server stub.
 On receipt of the result of procedure execution, it unpacks the result and
passes it to the client.
RPC Runtime:
It handles transmission of messages across the network between Client and the server
machine.
 It is responsible for Retransmission, Acknowledgement, Routing and
Encryption.
Server Stub:
It is responsible for the following two tasks:
 On receipt of a call request message from the local RPCRuntime, it unpacks it
and makes a perfectly normal call to invoke the appropriate procedure in the
server.
 On receipt of the result of procedure execution from the server, it unpacks the
result into a message and then asks the local RPCRuntime to send it to the
client stub.
Some special types or RPCs:
 Callback RPC: It facilitates a peer-to-Peer paradigm among participating processes. It
allows a process to be both a client and a server. Remotely processed interactive
Application
 Broadcast RPC: A client’s request is broadcast on the network and is processed by all
servers that have the procedure for processing that request.
 Batch-mode RPC: Batch-mode RPC is used to queue separate RPC requests in a
transmission buffer on the client side and then send them over the network in one
batch to the server.
6
RPC, a Practical Example:
The following steps have to be taken to establish a RPC.
 Decide what are methods that you’ll be RPC.
 Generate UUID (Universal Unique IDentifier)
o uuidgen /i /o”E:Interface.idl”
 Developing IDL file.
 Developing Application Configuration File (ACF)
 Implementing the RPC (whether in server or standalone application)
 Generating stub file (VS or MIDL)
 Developing the client side
o Adding client stub file amd generated header file.
o RpcStringBindingCompose
 Combines an object UUID, a protocol sequence, a network address, an
endpoint and other network options into a string representation of a
binding handle.
o RpcBindingFromStringBinding
 Creates a server binding handle from a string representation of a
binding handle.
o Call RPC using RpcTryExcept
o Free:
 RpcStringFree
 RpcBindingFree
 Developing the server side
o RpcServerUseProtseqEp
 Tells the RPC run-time library to use the specified protocol sequence
combined with the specified endpoint for receiving remote procedure
calls.
o RpcServerRegisterIf
 Registers an interface with the RPC run-time library
o RpcServerListen
 A server calls RpcServerListen when the server is ready to process
remote procedure calls.

Weitere ähnliche Inhalte

Was ist angesagt?

Remote Procedure Call in Distributed System
Remote Procedure Call in Distributed SystemRemote Procedure Call in Distributed System
Remote Procedure Call in Distributed SystemPoojaBele1
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure callsAshish Kumar
 
RPC communication,thread and processes
RPC communication,thread and processesRPC communication,thread and processes
RPC communication,thread and processesshraddha 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 semanticssvm
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and modelsMayank Jain
 
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8helpsoft01
 
Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Avishek Sarkar
 
Messaging With Erlang And Jabber
Messaging With  Erlang And  JabberMessaging With  Erlang And  Jabber
Messaging With Erlang And Jabberl xf
 
Interprocess Communication
Interprocess CommunicationInterprocess Communication
Interprocess CommunicationDeepak H L
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and RmiMayank Jain
 
remote method invocation
remote method invocationremote method invocation
remote method invocationRavi Theja
 
Remote invocation
Remote invocationRemote invocation
Remote invocationishapadhy
 
Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)eLink Business Innovations
 

Was ist angesagt? (20)

Remote Procedure Call in Distributed System
Remote Procedure Call in Distributed SystemRemote Procedure Call in Distributed System
Remote Procedure Call in Distributed System
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Cs 704 d rpc
Cs 704 d rpcCs 704 d rpc
Cs 704 d rpc
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
RPC communication,thread and processes
RPC communication,thread and processesRPC communication,thread and processes
RPC communication,thread and processes
 
Rpc mechanism
Rpc mechanismRpc mechanism
Rpc mechanism
 
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
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and models
 
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
 
Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020Dos(rpc)avishek130650107020
Dos(rpc)avishek130650107020
 
Remote procedure call
Remote procedure callRemote procedure call
Remote procedure call
 
Rpc
RpcRpc
Rpc
 
Messaging With Erlang And Jabber
Messaging With  Erlang And  JabberMessaging With  Erlang And  Jabber
Messaging With Erlang And Jabber
 
Interprocess Communication
Interprocess CommunicationInterprocess Communication
Interprocess Communication
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
 
remote method invocation
remote method invocationremote method invocation
remote method invocation
 
Remote invocation
Remote invocationRemote invocation
Remote invocation
 
5. Distributed Operating Systems
5. Distributed Operating Systems5. Distributed Operating Systems
5. Distributed Operating Systems
 
Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)
 

Ähnlich wie Remote procedure calls

Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIPrajakta Rane
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.pptsirajmohammed35
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3farshad33
 
Introduction to C++ Remote Procedure Call (RPC)
Introduction to C++ Remote Procedure Call (RPC)Introduction to C++ Remote Procedure Call (RPC)
Introduction to C++ Remote Procedure Call (RPC)Abdelrahman Al-Ogail
 
Topic 5- Communications v1.pptx
Topic 5- Communications v1.pptxTopic 5- Communications v1.pptx
Topic 5- Communications v1.pptxDanishMahmood23
 
Communication in Distributed System.ppt
Communication in Distributed System.pptCommunication in Distributed System.ppt
Communication in Distributed System.pptSELVAVINAYAGAMG
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middlewaresanjoysanyal
 
Distributed Objects and Remote Invocation
Distributed Objects and Remote InvocationDistributed Objects and Remote Invocation
Distributed Objects and Remote InvocationMedicaps University
 
Microsoft Exchange Technology Overview
Microsoft Exchange Technology OverviewMicrosoft Exchange Technology Overview
Microsoft Exchange Technology OverviewMike Pruett
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure CallNadia Nahar
 
Task communication
Task communicationTask communication
Task communication1jayanti
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2DBU
 

Ähnlich wie Remote procedure calls (20)

Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMI
 
Lecture9
Lecture9Lecture9
Lecture9
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.ppt
 
MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Introduction to C++ Remote Procedure Call (RPC)
Introduction to C++ Remote Procedure Call (RPC)Introduction to C++ Remote Procedure Call (RPC)
Introduction to C++ Remote Procedure Call (RPC)
 
Topic 5- Communications v1.pptx
Topic 5- Communications v1.pptxTopic 5- Communications v1.pptx
Topic 5- Communications v1.pptx
 
Communication in Distributed System.ppt
Communication in Distributed System.pptCommunication in Distributed System.ppt
Communication in Distributed System.ppt
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
 
Unit_2_Midddleware_2.ppt
Unit_2_Midddleware_2.pptUnit_2_Midddleware_2.ppt
Unit_2_Midddleware_2.ppt
 
Download
DownloadDownload
Download
 
Chapter04
Chapter04Chapter04
Chapter04
 
Distributed Objects and Remote Invocation
Distributed Objects and Remote InvocationDistributed Objects and Remote Invocation
Distributed Objects and Remote Invocation
 
Microsoft Exchange Technology Overview
Microsoft Exchange Technology OverviewMicrosoft Exchange Technology Overview
Microsoft Exchange Technology Overview
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Task communication
Task communicationTask communication
Task communication
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 

Kürzlich hochgeladen

Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolinonuriaiuzzolino1
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxgalaxypingy
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查ydyuyu
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 

Kürzlich hochgeladen (20)

Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolino
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 

Remote procedure calls

  • 1. 1 Remote Procedure Calls (RPC) Introduction: IPC part of distributed system can often be conveniently handled by message-passing model. It doesn't offer a uniform panacea for all the needs.RPC emerged as a result of this. It can be said as the special case of message-passing model. Remote Procedure Call (RPC) is an inter process communication technique to allow client and server software to communicate. RPC is a powerful technique for constructing distributed, client-server based applications. It is based on extending the notion of conventional or local procedure calling, so that the called procedure need not exist in the same address space as the calling procedure. The two processes may be on the same system, or they may be on different systems with a network connecting them. By using RPC, programmers of distributed applications avoid the details of the interface with the network. It has become widely accepted because of the following features:  Simple call syntax and similarity to local procedure calls.  It specifies a well defined interface and this property supports compile-time type checking and automated interface generation.  Its ease of use, efficiency and generality.  It can be used as an IPC mechanism between  Processes on different machines and also between different processes on the same machine. Transparency of RPC: A transparent RPC is one in which the local and remote procedure calls are indistinguishable.  Types of transparencies:  Syntactic transparency: A remote procedure call should have exactly the same syntax as a local procedure call.
  • 2. 2  Semantic transparency: The semantics of a remote procedure call are identical to those of a local procedure call.  Syntactic transparency is not an issue but semantic transparency is difficult. Remote procedure calls vs. Local procedure calls: Difference between remote procedure calls and local procedure calls: 1. Unlike local procedure calls, with remote procedure calls, i. Disjoint Address Space ii. Absence of shared memory. iii. Meaningless making call by reference, using addresses in arguments and pointers. 2. RPC’s are more vulnerable to failure because of: i. Possibility of processor crashes or ii. communication problems of a network. 3. RPC’s are much more time consuming than LPC’s due to the involvement of communication network. Due to these reasons, total semantic transparency is impossible. RPC Model: It is similar to commonly used procedure call model. It works in the following manner:  For making a procedure call, the caller places arguments to the procedure in some well specified location.  Control is then transferred to the sequence of instructions that constitutes the body of the procedure.  The procedure body is executed in a newly created execution environment that includes copies of the arguments given in the calling instruction.  After the procedure execution is over, control returns to the calling point, returning a result. The RPC enables a call to be made to a procedure that does not reside in the address space of the calling process. Since the caller and the callee processes have disjoint address space, the remote procedure has no access to data and variables of the caller’s environment. RPC
  • 3. 3 facility uses a message-passing scheme for information exchange between the caller and the callee processes. On arrival of request message, the server processes the following tasks:  extracts the procedure’s parameters,  computes the result,  sends a reply message, and  then awaits the next call message. Implementing RPC Mechanism: To achieve semantic transparency, implementation of RPC mechanism is based on the concepts of stubs.  Stubs: It Provide a normal / local procedure call abstraction by concealing the underlying RPC mechanism. A separate stub procedure is associated with both the client and server processes. To hide the underlying communication network, RPC communication package known as RPC Runtime is used on both the sides.
  • 4. 4  Thus implementation of RPC involves the five elements of program: o Client o Client Stub o RPC Runtime o Server stub o Server  The client, the client stub, and one instance of RPCRuntime execute on the client machine.  The server, the server stub, and one instance of RPCRuntime execute on the server machine.  As far as the client is concerned, remote services are accessed by the user by making ordinary LPC Client Stub: It is responsible for the following two tasks:  On receipt of a call request from the client,
  • 5. 5 o It packs specifications of the target procedure and the arguments into a message and asks the local RPC Runtime to send it to the server stub.  On receipt of the result of procedure execution, it unpacks the result and passes it to the client. RPC Runtime: It handles transmission of messages across the network between Client and the server machine.  It is responsible for Retransmission, Acknowledgement, Routing and Encryption. Server Stub: It is responsible for the following two tasks:  On receipt of a call request message from the local RPCRuntime, it unpacks it and makes a perfectly normal call to invoke the appropriate procedure in the server.  On receipt of the result of procedure execution from the server, it unpacks the result into a message and then asks the local RPCRuntime to send it to the client stub. Some special types or RPCs:  Callback RPC: It facilitates a peer-to-Peer paradigm among participating processes. It allows a process to be both a client and a server. Remotely processed interactive Application  Broadcast RPC: A client’s request is broadcast on the network and is processed by all servers that have the procedure for processing that request.  Batch-mode RPC: Batch-mode RPC is used to queue separate RPC requests in a transmission buffer on the client side and then send them over the network in one batch to the server.
  • 6. 6 RPC, a Practical Example: The following steps have to be taken to establish a RPC.  Decide what are methods that you’ll be RPC.  Generate UUID (Universal Unique IDentifier) o uuidgen /i /o”E:Interface.idl”  Developing IDL file.  Developing Application Configuration File (ACF)  Implementing the RPC (whether in server or standalone application)  Generating stub file (VS or MIDL)  Developing the client side o Adding client stub file amd generated header file. o RpcStringBindingCompose  Combines an object UUID, a protocol sequence, a network address, an endpoint and other network options into a string representation of a binding handle. o RpcBindingFromStringBinding  Creates a server binding handle from a string representation of a binding handle. o Call RPC using RpcTryExcept o Free:  RpcStringFree  RpcBindingFree  Developing the server side o RpcServerUseProtseqEp  Tells the RPC run-time library to use the specified protocol sequence combined with the specified endpoint for receiving remote procedure calls. o RpcServerRegisterIf  Registers an interface with the RPC run-time library o RpcServerListen  A server calls RpcServerListen when the server is ready to process remote procedure calls.