19

CLIENT SERVER - DISI, University of Trentodisi.unitn.it/~guna/teach/rpc.pdf · dir svc.c dir c'ntc compile the server qcc msg proc. c msg svc, c dir *dr. c -o msg server -TnsT compile

Embed Size (px)

Citation preview

program P begin … p1(); … … p2(); … … end

program P begin … p1(); … … p2(); … … end

networktransportservices

applicationcode

clientstub(middleware)

networktransportservices

applicationcode

serverstub(middleware)

localcall

systemcall

invocationmessage

replymessage

datatransfer

procedurecall

procedureexecution

resulttransfer

systemcall

datatransfer

invocationreturn

CLIENT SERVER

rprintmsg.c

clientcode

msg_proc.c

serverprocedures

msg.x

servicespecification

serverstub

includefile

clientstub

clientprogram

serverprogram

rpcgen

gcc

gcc

createthehandletocallaRPontheserver transport

protocol(use“visible”for

any)

performthecallusingthestubroutine

portmap

serverXclient

1.IrunportPORT_X2.IwanttotalktoX

4.executeprocedure

5.hereistheresult

3.Xisonport10000

linkedlist

programdefinition

result

makethecall

readtheresult

freetheresult

returnanerror

freethepreviousresult

buildthelist

theoperationwassuccesful