1 / 5

RMI (Java RMI)

RMI (Java RMI). P 460 in text UUIDs / system wide references Transparent: all objects either by ref. or by value. Not efficient, especially int, bool, etc (Probable error in the book by ref pp 2) Pass local and remote differently. Not transparent. Proxy is a local object (and also a ref!).

brendy
Télécharger la présentation

RMI (Java RMI)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RMI (Java RMI) • P 460 in text • UUIDs / system wide references • Transparent: all objects either by ref. or by value. Not efficient, especially int, bool, etc • (Probable error in the book by ref pp 2) • Pass local and remote differently. Not transparent. • Proxy is a local object (and also a ref!)

  2. Fig 10-8 • Java: not always transparent • “Serializable” means can be marshaled • Passing messages under the hood • Local are passed by Value, remote by ref. • Pass by value means COPYing object • Problem: cardinal sin of CS is to copy data • Clone local: copy object and state - indentcl • Clone remote: only on server. Otherwise have to clone all client references to it as well. Clients must re-bind to get new clone.

  3. Symbolic values representing objects in the real world are basis of programming • Real world objects live in one place. When they move they are no longer where they used to be. • Not true in computer world, so how to enforce the semantics?

  4. Protocol part of both classes (remote and local) that make a remote object. • Network address / endpoint (port) and local name, yielding effective UUID. • Object on server. Contains state, methods • Server side stub / skeleton for code interface • Client side stub, or proxy, for code interface • Each invocation sets up connection, then connection is torn down. • Proxies themselves can be marshaled and sent to other locations. Portable ref to obj.

  5. Proxy is a local object. • So, proxy can be passed as a ref in RMI • In theory whole proxy is sent (copied) as argument, but in practice implementation classes are often already available, and thus passed by reference. • So, references to remote objects are small. • Can also tweak to make local copies of object that does not change often. • Only possible because of virtual machine. DCE: has to pre-compile all code.

More Related