Implementing RMI Systems EEE466 Reference: CDK00 ch' 5 - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Implementing RMI Systems EEE466 Reference: CDK00 ch' 5

Description:

Automatic marshalling and unmarshalling of arguments and return values ... only objects identified as remotely accessible (Clouds, Argus, Arjuna, Java) ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 11
Provided by: GregPh4
Category:

less

Transcript and Presenter's Notes

Title: Implementing RMI Systems EEE466 Reference: CDK00 ch' 5


1
Implementing RMI Systems EEE466Reference
CDK00 ch. 5
2
Java RMI Development Process
Java compiler
Remote interface definition
Interface .class file
Developer
Java compiler
Remote object implementation
Implementation .class file
Developer
RMI compiler
Skeleton .class file
Stub .class file
Java compiler
Client implementation
Client .class file
Developer
3
Issues
  • Defining what may be accessed remotely
  • Object identity
  • remote object identifiers
  • Communications mechanism
  • using stubs and skeletons
  • Automatic marshalling and unmarshalling of
    arguments and return values
  • for primitive types and objects
  • Persistence
  • activation and passivation
  • Garbage collection
  • Concurrency control and transactions

4
What Can Be Remote
  • Several design choices for what can be accessed
    remotely
  • everything (Distributed Smalltalk, Emerald)
  • simple can be excessive performance penalties
    no obvious way to handle communications failures
  • only objects identified as remotely accessible
    (Clouds, Argus, Arjuna, Java)
  • requires language keywords, or special
    superclasses or interfaces
  • an external system is used to manage remote
    accesses, usually through a separate interface
    definition language and compiler (CORBA)
  • potentially language neutral requires external
    tools more complex

5
Object Identity
  • Key object-oriented concept identity
  • Need to maintain distinct identities for remote
    objects, therefore require remote object
    identifiers
  • should be opaque
  • must be globally unique
  • usually an endpoint (e.g., JVM) and an identifier
    object (instance of class ObjID)
  • should be first class values
  • assigned to variables, passed as parameters or
    return values
  • must support an equals operation
  • so that identity of objects can be compared

6
Communications Mechanism
  • system should automatically generate
    implementations for the communication abstraction
  • normally called stubs/proxies and skeletons
  • stub on client end provides a local
    representation of the remote object and handles
    all marshalling and unmarshalling
  • skeleton on server end provides mirror to the
    stub
  • in Smalltalk and Java 2, a generic mechanism
    replaces the skeleton
  • there is often a separate communications module
    (which the stubs and skeletons use)

7
Arguments and Return Values
  • if arguments or return values are
  • remote objects, passed by remote reference
  • if primitive types or serializable objects,
    passed by copy
  • pass by copy requires flattening and marshalling
  • ideally, implemented using generic mechanism
  • often useful to add programmer control
  • objects are typically graphs, interconnected by
    references
  • any reference may refer to a remote or
    serializable object
  • the same object may appear multiple times in the
    graph

8
Mixed Graphs
Remote object
Serializable object
Holds reference to
Before
After
Site B
Site B
Site A
Site A
9
Accidental Duplication
Before flattening
After reconstruction
Oops.
10
Next classImplementing RMI systems II
Write a Comment
User Comments (0)
About PowerShow.com