SlideShare a Scribd company logo
Introduction to Remote Procedure Call (RPC)Abdelrahman Al-Ogail12-11-2011
AgendaWhat’s RPC? 						(2)Why RPC?						(3)How RPC operates?					(15)How RPC is implemented in Windows?	(10)RPC, a practical example.				(15)RPC in QFS.						(5)References.
What’s RPCInter-process communication (IPC).Another virtual address space.Another process on the same machine.Another process on different machine.Hides remote interaction.Network programming standard 1980sBuilds on named pipes or Winsock.Remote Method Invocation (RMI)
Why RPC?Distributed Computing (matrix operations).Hides networking interaction.You just use the RPC as a usual method/function call.Flexible and maintainable.Easy to develop.
How RPC Operates
How RPC Operates
How RPC OperatesWhen client code calls a remote procedure, the client stub codeRetrieves 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 transmission2 Network Data Representation (NDR) is an implementation of the presentation layer in the OSI model.
How RPC OperatesThe 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.
How RPC OperatesThen same happens backward.
How RPC OperatesAsynchronous RPC could be achieved using:WaitForSingleObjectWaitForMultipleObjectI/O Completion port kernel object.GetQueuedCompletionStatusAlternatively, a client can poll for completion by calling RpcAsyncGetCallStatus
How RPC OperatesStub file types (_s and _c)IDL FileMIDL CompilerGenerated header
How RPC is implemented in Windows?Rpcrt4.dll*: Stub file uses it for marshaling and unmarshaling.Advanced Local Procedure Call (ALPC) facilities in kernel mode as the local networking API in case of communication on the same machine.Rpcss.dll:Perform name lookup.Registration.Dynamic endpoint mapping.* If not included will cause linkage problems
RPC, a Practical ExampleDecide what are methods that you’ll be RPC.Generate UUID (Universal Unique IDentifier)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)
RPC, a Practical ExampleDeveloping the client sideAdding client stub file amd generated header file.RpcStringBindingComposeCombines an object UUID, a protocol sequence, a network address, an endpoint and other network options into a string representation of a binding handle.RpcBindingFromStringBindingCreates a server binding handle from a string representation of a binding handle.Call RPC using RpcTryExceptFree:RpcStringFreeRpcBindingFree
RPC, a Practical ExampleDeveloping the server sideRpcServerUseProtseqEpTells the RPC run-time library to use the specified protocol sequence combined with the specified endpoint for receiving remote procedure calls.RpcServerRegisterIfRegisters an interface with the RPC run-time libraryRpcServerListenA server calls RpcServerListen when the server is ready to process remote procedure calls.
RPC in QFSIDL: na_qfsServer: Connector Service (na_qfs_s.cpp; qfsrpc.cpp)Client: QFS Service (na_qfs_c.cpp; NetAppFilter.cpp)
References
Thanks 

More Related Content

PDF
RPC에서 REST까지 간단한 개념소개
PPTX
Remote Procedure Call in Distributed System
PPT
PPTX
RPC: Remote procedure call
PPTX
Remote procedure call on client server computing
PPTX
FTP Client and Server | Computer Science
PPTX
Remote Procedure Call
RPC에서 REST까지 간단한 개념소개
Remote Procedure Call in Distributed System
RPC: Remote procedure call
Remote procedure call on client server computing
FTP Client and Server | Computer Science
Remote Procedure Call

What's hot (20)

PPTX
Remote procedure call
PPTX
User datagram protocol (udp)
PPTX
Fault tolerance in distributed systems
PPTX
Types of Drivers in JDBC
PPTX
Simple Network Management Protocol
PPTX
CLIENT SERVER IN OS.ppt
PPTX
Simple object access protocol(soap )
PPTX
OSI model and TCP/IP model
PPTX
Soap web service
PPT
Coda file system
PPTX
Tcp/ip model
PPT
4. system models
PPT
Symbian OS Architecture
PPT
Communication primitives
PPTX
Optimistic concurrency control in Distributed Systems
PDF
Deadlock in Distributed Systems
PPTX
REST & RESTful Web Services
PPTX
SOAP - Simple Object Access Protocol
PPT
message passing
Remote procedure call
User datagram protocol (udp)
Fault tolerance in distributed systems
Types of Drivers in JDBC
Simple Network Management Protocol
CLIENT SERVER IN OS.ppt
Simple object access protocol(soap )
OSI model and TCP/IP model
Soap web service
Coda file system
Tcp/ip model
4. system models
Symbian OS Architecture
Communication primitives
Optimistic concurrency control in Distributed Systems
Deadlock in Distributed Systems
REST & RESTful Web Services
SOAP - Simple Object Access Protocol
message passing
Ad

Viewers also liked (7)

PPTX
2013 빅데이터 및 API 기술 현황과 전망- 윤석찬
PPT
Rpc (Distributed computing)
PDF
Sun RPC (Remote Procedure Call)
PPTX
PPT
remote procedure calls
PDF
Inter process communication
PDF
Inter Process Communication
2013 빅데이터 및 API 기술 현황과 전망- 윤석찬
Rpc (Distributed computing)
Sun RPC (Remote Procedure Call)
remote procedure calls
Inter process communication
Inter Process Communication
Ad

Similar to Introduction to Remote Procedure Call (20)

PPTX
Dos(rpc)avishek130650107020
DOC
Remote procedure calls
PPTX
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
PPTX
Middleware in Distributed System-RPC,RMI
DOCX
Remote Procedure Call
PDF
Cs556 section3
PDF
Cs556 section3
PDF
5. Distributed Operating Systems
PPT
Remote Procedure Call
PPTX
Distributed, Network System and RPC.pptx
PPTX
Cs 704 d rpc
PPTX
Distributed Systems Distributed Systems- COMMUNICATION.pptx
PPT
Chapter 2B-Communication.ppt
PDF
PPT
DS-Chapter DDEFR2-Communication_105220.ppt
PPT
Remote procedure calls in computer programming.ppt
PDF
Task communication
PDF
Rouault imbert alpc_rpc_pacsec
PPTX
Byte Ordering - Unit 2.pptx
Dos(rpc)avishek130650107020
Remote procedure calls
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
Middleware in Distributed System-RPC,RMI
Remote Procedure Call
Cs556 section3
Cs556 section3
5. Distributed Operating Systems
Remote Procedure Call
Distributed, Network System and RPC.pptx
Cs 704 d rpc
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Chapter 2B-Communication.ppt
DS-Chapter DDEFR2-Communication_105220.ppt
Remote procedure calls in computer programming.ppt
Task communication
Rouault imbert alpc_rpc_pacsec
Byte Ordering - Unit 2.pptx

More from Abdelrahman Al-Ogail (9)

PPTX
Introduction to C++ Remote Procedure Call (RPC)
PPTX
C++ Optimization Tips
PPTX
Second Seminar Presentation
PPTX
Case Based Planner Platform For Rts Games
PPTX
Timeline Presentation
PPTX
First Seminar Presentation
PPTX
Case Based Planning A Framework For Planning From Experience
PDF
Abdelrahman Al-Ogail Resume
PPTX
Introduction To My Graduation Project
Introduction to C++ Remote Procedure Call (RPC)
C++ Optimization Tips
Second Seminar Presentation
Case Based Planner Platform For Rts Games
Timeline Presentation
First Seminar Presentation
Case Based Planning A Framework For Planning From Experience
Abdelrahman Al-Ogail Resume
Introduction To My Graduation Project

Recently uploaded (20)

PPTX
Institutional Correction lecture only . . .
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Cell Types and Its function , kingdom of life
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Pharma ospi slides which help in ospi learning
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Classroom Observation Tools for Teachers
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Institutional Correction lecture only . . .
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Module 4: Burden of Disease Tutorial Slides S2 2025
VCE English Exam - Section C Student Revision Booklet
Cell Types and Its function , kingdom of life
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Insiders guide to clinical Medicine.pdf
01-Introduction-to-Information-Management.pdf
O7-L3 Supply Chain Operations - ICLT Program
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
TR - Agricultural Crops Production NC III.pdf
Microbial disease of the cardiovascular and lymphatic systems
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Pharma ospi slides which help in ospi learning
PPH.pptx obstetrics and gynecology in nursing
Classroom Observation Tools for Teachers
Mark Klimek Lecture Notes_240423 revision books _173037.pdf

Introduction to Remote Procedure Call

  • 1. Introduction to Remote Procedure Call (RPC)Abdelrahman Al-Ogail12-11-2011
  • 2. AgendaWhat’s RPC? (2)Why RPC? (3)How RPC operates? (15)How RPC is implemented in Windows? (10)RPC, a practical example. (15)RPC in QFS. (5)References.
  • 3. What’s RPCInter-process communication (IPC).Another virtual address space.Another process on the same machine.Another process on different machine.Hides remote interaction.Network programming standard 1980sBuilds on named pipes or Winsock.Remote Method Invocation (RMI)
  • 4. Why RPC?Distributed Computing (matrix operations).Hides networking interaction.You just use the RPC as a usual method/function call.Flexible and maintainable.Easy to develop.
  • 7. How RPC OperatesWhen client code calls a remote procedure, the client stub codeRetrieves 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 transmission2 Network Data Representation (NDR) is an implementation of the presentation layer in the OSI model.
  • 8. How RPC OperatesThe 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.
  • 9. How RPC OperatesThen same happens backward.
  • 10. How RPC OperatesAsynchronous RPC could be achieved using:WaitForSingleObjectWaitForMultipleObjectI/O Completion port kernel object.GetQueuedCompletionStatusAlternatively, a client can poll for completion by calling RpcAsyncGetCallStatus
  • 11. How RPC OperatesStub file types (_s and _c)IDL FileMIDL CompilerGenerated header
  • 12. How RPC is implemented in Windows?Rpcrt4.dll*: Stub file uses it for marshaling and unmarshaling.Advanced Local Procedure Call (ALPC) facilities in kernel mode as the local networking API in case of communication on the same machine.Rpcss.dll:Perform name lookup.Registration.Dynamic endpoint mapping.* If not included will cause linkage problems
  • 13. RPC, a Practical ExampleDecide what are methods that you’ll be RPC.Generate UUID (Universal Unique IDentifier)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)
  • 14. RPC, a Practical ExampleDeveloping the client sideAdding client stub file amd generated header file.RpcStringBindingComposeCombines an object UUID, a protocol sequence, a network address, an endpoint and other network options into a string representation of a binding handle.RpcBindingFromStringBindingCreates a server binding handle from a string representation of a binding handle.Call RPC using RpcTryExceptFree:RpcStringFreeRpcBindingFree
  • 15. RPC, a Practical ExampleDeveloping the server sideRpcServerUseProtseqEpTells the RPC run-time library to use the specified protocol sequence combined with the specified endpoint for receiving remote procedure calls.RpcServerRegisterIfRegisters an interface with the RPC run-time libraryRpcServerListenA server calls RpcServerListen when the server is ready to process remote procedure calls.
  • 16. RPC in QFSIDL: na_qfsServer: Connector Service (na_qfs_s.cpp; qfsrpc.cpp)Client: QFS Service (na_qfs_c.cpp; NetAppFilter.cpp)