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

What's hot (20)

PDF
Spring security oauth2
axykim00
 
PDF
gRPC with java
Knoldus Inc.
 
PPTX
Inter process communication
Pradeep Kumar TS
 
PPTX
OAuth 2
ChrisWood262
 
PPTX
Simple object access protocol(soap )
balamurugan.k Kalibalamurugan
 
PDF
Socket.IO
Davide Pedranz
 
PPTX
Remote Procedure Call in Distributed System
PoojaBele1
 
PPT
Introduction to the Web API
Brad Genereaux
 
PPTX
Introduction to gRPC
Chandresh Pancholi
 
PPTX
Web services SOAP
princeirfancivil
 
PPTX
jstl ( jsp standard tag library )
Adarsh Patel
 
PDF
Support Web Services SOAP et RESTful Mr YOUSSFI
ENSET, Université Hassan II Casablanca
 
PDF
Power-up services with gRPC
The Software House
 
PPTX
GRPC.pptx
Afzal Juneja
 
PDF
API : l'architecture REST
Fadel Chafai
 
PPTX
Introduction à spring boot
Antoine Rey
 
PDF
Api Gateway
KhaqanAshraf
 
PPT
Java Servlets
BG Java EE Course
 
PDF
Support JEE Servlet Jsp MVC M.Youssfi
ENSET, Université Hassan II Casablanca
 
PPTX
HTTP Protocol Basic
Chuong Mai
 
Spring security oauth2
axykim00
 
gRPC with java
Knoldus Inc.
 
Inter process communication
Pradeep Kumar TS
 
OAuth 2
ChrisWood262
 
Simple object access protocol(soap )
balamurugan.k Kalibalamurugan
 
Socket.IO
Davide Pedranz
 
Remote Procedure Call in Distributed System
PoojaBele1
 
Introduction to the Web API
Brad Genereaux
 
Introduction to gRPC
Chandresh Pancholi
 
Web services SOAP
princeirfancivil
 
jstl ( jsp standard tag library )
Adarsh Patel
 
Support Web Services SOAP et RESTful Mr YOUSSFI
ENSET, Université Hassan II Casablanca
 
Power-up services with gRPC
The Software House
 
GRPC.pptx
Afzal Juneja
 
API : l'architecture REST
Fadel Chafai
 
Introduction à spring boot
Antoine Rey
 
Api Gateway
KhaqanAshraf
 
Java Servlets
BG Java EE Course
 
Support JEE Servlet Jsp MVC M.Youssfi
ENSET, Université Hassan II Casablanca
 
HTTP Protocol Basic
Chuong Mai
 

Viewers also liked (9)

PPTX
2013 빅데이터 및 API 기술 현황과 전망- 윤석찬
Channy Yun
 
PPT
Rpc (Distributed computing)
Sri Prasanna
 
PDF
Sun RPC (Remote Procedure Call)
Peter R. Egli
 
PPTX
Remote procedure call on client server computing
Satya P. Joshi
 
PPTX
RPC: Remote procedure call
Sunita Sahu
 
PPTX
RPC
crack_708
 
PPT
remote procedure calls
Ashish Kumar
 
PDF
Inter process communication
RJ Mehul Gadhiya
 
PDF
Inter Process Communication
Anil Kumar Pugalia
 
2013 빅데이터 및 API 기술 현황과 전망- 윤석찬
Channy Yun
 
Rpc (Distributed computing)
Sri Prasanna
 
Sun RPC (Remote Procedure Call)
Peter R. Egli
 
Remote procedure call on client server computing
Satya P. Joshi
 
RPC: Remote procedure call
Sunita Sahu
 
remote procedure calls
Ashish Kumar
 
Inter process communication
RJ Mehul Gadhiya
 
Inter Process Communication
Anil Kumar Pugalia
 
Ad

Similar to Introduction to Remote Procedure Call (20)

PPTX
Dos(rpc)avishek130650107020
Avishek Sarkar
 
DOC
Remote procedure calls
imnomus
 
PPTX
Remote procedure call
Manojparihar16
 
PPTX
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
Rasheed673196
 
PPTX
Middleware in Distributed System-RPC,RMI
Prajakta Rane
 
DOCX
Remote Procedure Call
Nadia Nahar
 
PDF
Cs556 section3
farshad33
 
PDF
Cs556 section3
sehrish saba
 
PDF
5. Distributed Operating Systems
Dr Sandeep Kumar Poonia
 
PPT
Remote Procedure Call
MNM Jain Engineering College
 
PPTX
Cs 704 d rpc
Debasis Das
 
PPTX
Distributed Systems Distributed Systems- COMMUNICATION.pptx
ssuser376193
 
PPT
Chapter 2B-Communication.ppt
sirajmohammed35
 
PDF
Lecture9
Sheikh Amjad Zia
 
PPT
DS-Chapter DDEFR2-Communication_105220.ppt
menoralemu03
 
PPT
Remote procedure calls in computer programming.ppt
samuelmuigai9
 
PDF
Task communication
1jayanti
 
PDF
Rouault imbert alpc_rpc_pacsec
PacSecJP
 
Dos(rpc)avishek130650107020
Avishek Sarkar
 
Remote procedure calls
imnomus
 
Remote procedure call
Manojparihar16
 
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
Rasheed673196
 
Middleware in Distributed System-RPC,RMI
Prajakta Rane
 
Remote Procedure Call
Nadia Nahar
 
Cs556 section3
farshad33
 
Cs556 section3
sehrish saba
 
5. Distributed Operating Systems
Dr Sandeep Kumar Poonia
 
Remote Procedure Call
MNM Jain Engineering College
 
Cs 704 d rpc
Debasis Das
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
ssuser376193
 
Chapter 2B-Communication.ppt
sirajmohammed35
 
DS-Chapter DDEFR2-Communication_105220.ppt
menoralemu03
 
Remote procedure calls in computer programming.ppt
samuelmuigai9
 
Task communication
1jayanti
 
Rouault imbert alpc_rpc_pacsec
PacSecJP
 
Ad

More from Abdelrahman Al-Ogail (9)

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

Recently uploaded (20)

PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
grade 5 lesson ENGLISH 5_Q1_PPT_WEEK3.pptx
SireQuinn
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
BANDHA (BANDAGES) PPT.pptx ayurveda shalya tantra
rakhan78619
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
grade 5 lesson ENGLISH 5_Q1_PPT_WEEK3.pptx
SireQuinn
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
BANDHA (BANDAGES) PPT.pptx ayurveda shalya tantra
rakhan78619
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 

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)