Distributed Program Generation(rpcgen Example) Chuan-Ming liu CSIE NTUT Spring 04, TAIWAN
1 Distributed Program Generation (rpcgen Example) Chuan-Ming Liu CSIE, NTUT Spring ’04, TAIWAN
Introduction )Presents the sequence of steps a programmer takes to first create a conventional program and then divide the program into local and remote components O Uses an example application to show the output from rpcgen and additional code required to create the client and server components of a distributed program that uses rpc
2 Introduction Presents the sequence of steps a programmer takes to first create a conventional program and then divide the program into local and remote components Uses an example application to show the output from rpcgen and additional code required to create the client and server components of a distributed program that uses RPC
An Example to Illustrate Rpcgen D An example will clarify how rpcgen works and will illustrate most of the details )To explain how rpcgen works, we have selected an extremely simple application
3 An Example to Illustrate Rpcgen An example will clarify how rpcgen works and will illustrate most of the details To explain how rpcgen works, we have selected an extremely simple application
Dictionary operations D Consider an application that implements a simple database that offer 4 basic operations: initialize, insert, delete, and lookup ASsume that input to the application is a text file. where each line contains a one letter command followed by a word DFig. 23. 1 lists the commands, and gives the meaning of each
4 Dictionary Operations Consider an application that implements a simple database that offer 4 basic operations: initialize, insert, delete, and lookup Assume that input to the application is a text file, where each line contains a oneletter command followed by a word Fig. 23.1 lists the commands, and gives the meaning of each
Steps to Distributed Application )Fig.22.6 1. Build a conventional application 22. Divide the program into two parts 03. Create an rpcgen specification 24. Run rpcgen to generate 4 source code files 05. Write stub interface procedures 26. Compile and link the client program 27. Compile and link the server program D 8. Start the server and execute the client
6 Steps to Distributed Application Fig. 22.6 1. Build a conventional application 2. Divide the program into two parts 3. Create an rpcgen specification 4. Run rpcgen to generate 4 source code files 5. Write stub interface procedures 6. Compile and link the client program 7. Compile and link the server program 8. Start the server and execute the client