Remote Procedure Call(RPC) Concept Chuan-Ming liu CSIE NTUT Spring 04, TAIWAN
1 Remote Procedure Call (RPC) Concept Chuan-Ming Liu CSIE, NTUT Spring ’04, TAIWAN
Introduction D Continues the discussion of middleware (i. e, tools and libraries programmers used to construct client-server software) D Introduces the remote procedure call(rPc) concept, and describes a particular implementation of an rpc that uses XDr standard for data representation ) Shows how the approach simplifies the design of client-server software and makes the resulting program easier to understand
2 Introduction Continues the discussion of middleware (i.e., tools and libraries programmers used to construct client-server software) Introduces the remote procedure call (RPC) concept, and describes a particular implementation of an RPC that uses XDR standard for data representation Shows how the approach simplifies the design of client-server software and makes the resulting program easier to understand
RPC Model )When programmers build a client-server application, they must consider how the entire system will function and how the two components will interact DTo help programmers design and understand client-server interaction researchers have devised a conceptual framework (RPC model for building distributed programs D The RPC model uses familiar concepts from conventional programs as the basis for the design of distributed applications
3 RPC Model When programmers build a client-server application, they must consider how the entire system will function and how the two components will interact To help programmers design and understand client-server interaction, researchers have devised a conceptual framework (RPC model) for building distributed programs The RPC model uses familiar concepts from conventional programs as the basis for the design of distributed applications
Two Paradigms for building Distributed Programs Two approaches when designing a distributed applications )Communication-oriented design DApplication-oriented design
4 Two Paradigms for Building Distributed Programs Two approaches when designing a distributed applications Communication-oriented Design Application-oriented Design
Two Paradigms for building Distributed Programs(cont) D Communication-oriented Design )Begin with the communication protocol D Design a message format and syntax O Design the client and server components by specifying how each reacts to incoming messages and how each generates outgoing messages
5 Two Paradigms for Building Distributed Programs (cont.) Communication-oriented Design Begin with the communication protocol Design a message format and syntax Design the client and server components by specifying how each reacts to incoming messages and how each generates outgoing messages
Two Paradigms for building Distributed Programs(cont) D Application-oriented Design D Begin with applications ) Design a conventional application program to solve the problem )Build and test a working version of the conventional program that operates on a single machine D Divide the program into two or more pieces, and add communication protocols that allows each piece to execute on a separate computer
6 Two Paradigms for Building Distributed Programs (cont.) Application-oriented Design Begin with applications Design a conventional application program to solve the problem Build and test a working version of the conventional program that operates on a single machine Divide the program into two or more pieces, and add communication protocols that allows each piece to execute on a separate computer
Two Paradigms for building Distributed Programs(cont Problems for communication-oriented design D By focusing on the communication protocol, the programmer may miss important subtleties in the application D Because few programmers have experience and expertise with the protocol design, they often produce awkward. incorrect inefficient protocols )Because the programmer concentrates on communication, it usually becomes the centerpiece of the resulting programs, making them difficult to understand or modify
7 Two Paradigms for Building Distributed Programs (cont.) Problems for communication-oriented design By focusing on the communication protocol, the programmer may miss important subtleties in the application Because few programmers have experience and expertise with the protocol design, they often produce awkward, incorrect, inefficient protocols Because the programmer concentrates on communication, it usually becomes the centerpiece of the resulting programs, making them difficult to understand or modify
Two Paradigms for building Distributed programs(cont) )The RPC model follows the application- oriented design approach, which emphasizes the problem to be solved instead of the communication needed ) The programmer can follow good design principles that make the code modular and maintainable DRPC separates the solution of a problem from the task of making the solution operate in a distributed environment
8 Two Paradigms for Building Distributed Programs (cont.) The RPC model follows the applicationoriented design approach, which emphasizes the problem to be solved instead of the communication needed The programmer can follow good design principles that make the code modular and maintainable RPC separates the solution of a problem from the task of making the solution operate in a distributed environment
Two Paradigms for building Distributed Programs(cont) DThe RPC paradigm for programming focuses on the application DIt allows a programmer to concentrate on devising a conventional program that solves the problem before attempting to divide the program into pieces that operate on multiple computers
9 Two Paradigms for Building Distributed Programs (cont.) The RPC paradigm for programming focuses on the application It allows a programmer to concentrate on devising a conventional program that solves the problem before attempting to divide the program into pieces that operate on multiple computers
Conventional Procedure calls DFig. 2 11 illustrates the procedure concept D Procedures offer a power abstraction that allows programmers to divide programs into small, manageable, easily-understood pieces
10 Conventional Procedure Calls Fig. 21.1 illustrates the procedure concept Procedures offer a power abstraction that allows programmers to divide programs into small, manageable, easily-understood pieces