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