200 likes | 387 Views
Pass-By-Value Services in Object Component Software. Group 1 Yannick Loitiere Andrea Rowan Michele Co Jinze Liu . Object Component Software . Middleware with abstraction Implementation separated from interface “Client” and “server” share objects Across a network
E N D
Pass-By-Value Services in Object Component Software Group 1 Yannick Loitiere Andrea Rowan Michele Co Jinze Liu
Object Component Software • Middleware with abstraction • Implementation separated from interface • “Client” and “server” share objects • Across a network • Between different programming languages • Popular software • OMG CORBA (Common Object Request Broker Architecture) • Microsoft COM (Component Object Model) • Java
Object Passing • Pass-By-Reference • Server returns reference to the object • Client calls the server with the reference • Server executes methods and returns the value • Pass-By-Value • Server returns copy, reference to local copy • Client calls the local copy with the reference • Client executes method and returns the value
Bank Example • Account • Name Object (immutable) • Balance Object (mutable) • Pass-By-Reference • Consistency for Balance Object • Performance hurt for Name Object • Pass-By-Value • Inconsistency for Balance Object • Performance gains for Name Object
Related Work • Ennio Grasso’s Model • Consistency maintained • All objects CORBA objects • CORBA 2.3 OBV Model • No consistency • Separate ValueBase objects
Our Project • Analyze CORBA's Object By Value (OBV) service using TAO • Identify problems with the current implementation of pass-by-value • Measure performance differences for different pass-by-value models • Propose a better model of pass-by-value • Identify limitations of our pass-by-value service
Evaluation of Models • Consistency • Orthogonality / Semantics • Client Control • Language Transparency • Location Transparency • Performance
Orthogonality/Semantics • TAO separates ValueBase objects from CORBA objects • Amount of pass-by-value specific code in our simple client/server program: • 2/6 lines of the interface • 11/88 lines from the server-side code • 1/59 lines from the client-side code • Represents 9.15% of all code
Client Control • TAO allows client to pass large objects by value • Pass-By-Reference • Performance not affected by object size • Pass-by-value • Performance decreases as size of object increases
Language Transparency • TAO does not allow for language transparency for pass-by-value • Client must have implementation at compile time • Only C++ mapping currently exists
Location Transparency • Because of separation of ValueBase objects from CORBA objects, client can tell if object is passed by value • Interface is written differently for the two types • TAO does not define abstract interfaces • Lack of location transparency breaks CORBA’s Object Model
Performance • Pass-by-value improves performance most when • Object is small • Object is referenced multiple times by client • Consistency is not maintained
Our Model • Consistency • Use classical pass-by-value model (no shared state between client and server) • Only allow pass-by-value for immutable objects • Orthogonality • All objects should be CORBA objects • Add byvalue boolean to CORBA objects • Default value of byvalue is false
Our Model • Client Control • Server decides whether object can be passed by value • restricted according to size, immutability, etc. • Client may block pass-by-value • send_object() - lets server choose how object is sent • send_by_reference() - blocks pass-by-value • Give server more control than client
Our Model • Language Transparency • No easy solution b/c of range of operating systems, language capabilities • If object’s implementation language is not available on client, default to pass-by-reference • If object’s implementation is not on client, download during first call • Assume performance gain makes up for download time
Our Model • Location Transparency • All objects are CORBA objects • assures location transparency for client • Performance • Performance gains for small, remote, immutable objects • Performance is one of the key reasons for pass-by-value, and was an important factor in our model design.
Conclusion • Pass-by-value can improve performance • Restricted objects (immutable, small) • Good for systems with low bandwidth • Simple to allow pass-by-value in older CORBA programs because our model maintains object abstraction • Improvement in many ways over CORBA’s OBV and TAO’s pass-by-value service