Download presentation
Presentation is loading. Please wait.
1
490dp Prelude: Design Report Remote Invocation Robert Grimm (borrowing some from Hank Levy)
2
Design Report Comprehensive report to a manager –Purpose Describe project Provide contract –Executive summary –Problem, features, assumptions, components (architecture overview), unknowns, evaluation, plan
3
Problem How to access remote resources? Messages –Locating a remote resource –Packing / unpacking of data –Maintaining connections –Dispatching to actual resource call return ClientServer
4
Solution Remote procedure calls [Birrell and Nelson 80] –Make remote invocation look like procedure calls Every language supports procedure calls Semantics are well defined and understood Programmers know how to use it
5
Overview 3 Components –User programs Actual functionality –Set of stub procedures Packing / unpacking of data –RPC runtime Connection management Dispatch (Exporting / importing of resources)
6
Overview 3 Times –Compile time –Bind time –Call time
7
Compile Time Generate stubs –Based on interface definition language CORBA IDL Java serves as its own IDL –Strongly typed language –Produced by dedicated stub compiler
8
Bind Time Export resource –Register exported resources Name server Discovery service –RPC runtime links in stub Import resource –Locate remote resource –RPC runtime links in stub Export and import are explicit operations
9
Call Time Make procedure call Stub marshalls data Runtime sends data to server Server runtime locates correct stub Stub demarshalls data Stub calls actual resource
10
RPC Call Structure call foo(x,y) proc foo(a,b)call foo(x,y) proc foo(a,b) begin foo... end foo client program client stub RPC runtime RPC runtime server stub server program Call client makes local call to stub proc. stub builds msg packet, inserts params runtime sends msg to remote node server is called by its stub stub unpacks params and makes call runtime receives msg and calls stub call foo send msg call foo msg received
11
Binding Revisited Early binding –Bind –Call Advantage –Bind typically more expensive than call Disadvantage –What to do if resource becomes unavailable?
12
Late Binding One operation –Bind & call Disadvantage –Re-bind on every invocation Advantage –More resilient
13
Two Tutorials Java’s Remote Method Invocation (RMI) –Eric Lemar one.world’s Remote Event Passing (REP) –Janet Davis
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.