inf 123 sw arch, dist sys & interop lecture 9 prof. crista lopes
TRANSCRIPT
![Page 1: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/1.jpg)
INF 123 SW ARCH, DIST SYS & INTEROP
LECTURE 9
Prof. Crista Lopes
![Page 2: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/2.jpg)
Objectives
Understanding of Distributed Objects architectures
Acquaintance with a well-known RMI framework Java RMI
![Page 3: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/3.jpg)
Web Services isa Distributed System
“Collection of interacting components hosted on different computers that are connected through a computer network”
Component1
Component n
Hardware
Network OS
Host 3
Component1
Component n
Hardware
Network OS
Host 2
Component1
Component n
Hardware
Network OS
Host 1
…
Network
![Page 4: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/4.jpg)
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 2program
Remote Procedure Calls
![Page 5: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/5.jpg)
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 2program
Remote Procedure Calls
Stub
Skeleton
![Page 6: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/6.jpg)
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 Network OS
![Page 7: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/7.jpg)
RPC Stubs
Marshal arguments (i.e. “serialize”) Issue request to remote server, wait for
response Unmarshal return value (i.e.
“deserialize”)
![Page 8: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/8.jpg)
RPC Skeletons
Unmarshal arguments Call local procedure Marshal return value Send back response to client
![Page 9: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/9.jpg)
Distributed Objects model
Obj1
Host A
Obj2
Host A
Obj4
Host A
Obj5
Host A
Obj3
Obj6
![Page 10: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/10.jpg)
Distributed Objects model
Obj1Obj2
Obj4
Obj5
Obj3
Obj6
“Transparent distribution”
![Page 11: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/11.jpg)
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
![Page 12: INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes](https://reader035.vdocuments.net/reader035/viewer/2022072005/56649cf05503460f949bf4b4/html5/thumbnails/12.jpg)
Rest of this lecture
Java RMI tutorial athttp://java.sun.com/docs/books/tutorial/rmi/overview.html