Extension of procedural model DFig 21.2 shows how the program from Fig 21. 1 can be extended to use an rpc to become a distributed program )Before a program can use RPCs. it must be augmented with protocol software that allows it to communicate with remote pI procedures
12 Extension of Procedural Model Fig. 21.2 shows how the program from Fig. 21.1 can be extended to use an RPC to become a distributed program Before a program can use RPCs, it must be augmented with protocol software that allows it to communicate with remote procedures
Execution of conventional Procedure Call and returns D Fig. 21.3 shows a conceptual model of execution that explains flow of control during procedure call and return DA Single thread of control(execution) begins in the main program, passes through procedure a and B, and eventually returns to the main program
14 Execution of Conventional Procedure Call and Returns Fig. 21.3 shows a conceptual model of execution that explains flow of control during procedure call and return A single thread of control (execution) begins in the main program, passes through procedure A and B, and eventually returns to the main program
Procedure model in Distributed systems D Fig 21.4 illustrates the model of execution used with rPcs DArequest sent from a client to a server corresponds to a call of a remote procedure and a response sent from a server back to a client corresponds to the execution of a return instruction
16 Procedure Model in Distributed Systems Fig. 21.4 illustrates the model of execution used with RPCs A request sent from a client to a server corresponds to a call of a remote procedure, and a response sent from a server back to a client corresponds to the execution of a return instruction
Analogy between Client- Server and rpc DRPC transfers control to the called procedure like a conventional procedure ca lI D The system suspends execution of the calling procedure during the call and only allows the called procedure to execute DAs Fig. 2 1. 4 illustrates nested RPCS corresponds to a server that becomes a client of another service 18
18 Analogy Between ClientServer and RPC RPC transfers control to the called procedure like a conventional procedure call The system suspends execution of the calling procedure during the call and only allows the called procedure to execute As Fig. 21.4 illustrates, nested RPCs corresponds to a server that becomes a client of another service
Analogy between Client- Server and rPc(cont) D Conventional procedure remains completely inactive until it is called however. a server process must exists in the remote system O Conventional procedures usually accept a few arguments and return a few results )However, a server can accept or return arbitrary amount of data(i. e, It can accept or return an arbitrary stream over a tcp connection)
19 Analogy Between ClientServer and RPC (Cont.) Conventional procedure remains completely inactive until it is called; however, a server process must exists in the remote system Conventional procedures usually accept a few arguments and return a few results However, a server can accept or return arbitrary amount of data (.i.e,. It can accept or return an arbitrary stream over a TCP connection)