INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes
Objectives Understanding of Distributed Objects architectures Acquaintance with a well-known RMI framework Java RMI
Web Services isa Distributed System “Collection of interacting components hosted on different computers that are connected through a computer network” Component 1 Component n Hardware Network OS Host 3 Component 1 Component n Hardware Network OS Host 2 Component 1 Component n Hardware Network OS Host 1 … Network
Remote Procedure Calls (RPC) r = foo(a, b) define foo(a, b) … end caller callee program host Local Procedure Calls r = foo(a, b) define foo(a, b) … end caller callee program host 1 host 2 program Remote Procedure Calls
Remote Procedure Calls (RPC) r = foo(a, b) define foo(a, b) … end caller callee program host Local Procedure Calls r = foo(a, b) define foo(a, b) … end caller callee program host 1 host 2 program Remote Procedure Calls Stub Skeleton
RPC Procedure Interface Definition (in IDL) Procedure Definition Program (in PL) Procedure Call Program (in PL) Stub (in PL) Skeleton (in PL) generates Network OS
RPC Stubs Marshal arguments (i.e. “serialize”) Issue request to remote server, wait for response Unmarshal return value (i.e. “deserialize”)
RPC Skeletons Unmarshal arguments Call local procedure Marshal return value Send back response to client
Distributed Objects model Obj1 Host A Obj2 Host A Obj4 Host A Obj5 Host A Obj3 Obj6
Distributed Objects model Obj1 Obj2 Obj4 Obj5 Obj3 Obj6 “Transparent distribution”
Distributed Objects – Properties Very tightly coupled with PL Compiler generates stubs and skeletons Distribution seen only in terms of peripheral components: Security Registry Additional program arguments Location (host) doesn’t matter [much] Remote object references do
Rest of this lecture Java RMI tutorial at