Title: Portable Serialization of CORBA Objects Reflective Approach
1Portable Serialization of CORBA Objects
Reflective Approach
- Papered by Mac-Olivier Killijian, Juan-Carlos
Ruiz, Jean-Charies Fabre - Review by Kelvin Choi, Derek Cui
2Contents
- Introduction
- Relevance to Dynamic Reconfiguration
- Approach
- Evaluation of Claims
- Identification of key references
- Future work
- Discussion
3Introduction
- Illustrate a portable serialization technique for
CORBA objects. - Object states can be restored and used
- object developed using different language
- running on different software platforms.
- Concentrate on attribute facet.
- CORBA-compliant
- transparent to application programmers and
portable.
4Relevance to Dynamic Reconfiguration
- Relevance
- Object Replication / Migration
- Object Replace
- State persistence (backup state)
Old object
New Object
Copy state
Old object state
Old object state
persistency
Database
5Contribution
- Consistency
- Attribute facet persisted (variable data)
- Transparency
- De/Serialization mechanism auto generated
- State transport using native COBRA
- Overhead
- State serialization/transport has performance
overhead
6States in dynamic reconfiguration
- Any objects can have a state
- Its state is contained in an object called State
Container - For example Dynamic reconfiguration (replace
object)
Destroy after used
Old object
New Object
Old object state
Old object state
Copy state
1.Saves old state (serialization) 2.Remove old
object 3.Create new object 4.Insert old state
into new object (de-serialization)
7Object and State
// Object A Class A int x,y void A() x
5 print x x y x 2
State Container
// State of A Class AState int x 5 int y
7
Extract state
8Object and State
- Object states includes
- Local Attributes
- Super class Attributes (inheritance)
- Composite class Attributes (inner-class / other
class it uses)
Class A int y 5
Class B extents A int x 1 //inner class
C class C int z3
State Container
Class BState int x1 int y5 int z3
State
9Portable Serializable Interface
- Get_State() method
- Returns data buffer stream
- Set_State() method
- Requires data buffer stream
10State Serialization
- Serialize-able objects implements PSerializable
interface - Transport States using COBRA
Old object In JAVA
New Object In C
setState()
getState()
Call Object.getAnyState()
Call Object.setAnyState()
Create State object
put State into object
State Data Stream (CDR format)
Object StateContainer
Object StateContainer
deserialized
Serialized
COBRA transfer
11COBRA
- Distributed
- Language independent
- IDL interface file
Server (Java)
Client (C)
IDL
IDL
Stub
Skeleton
12Portable
- State transport using COBRA
- PSerializable interface mapped to COBRA IDL
(interface description language) - State container also mapped to IDL
- Language independent
- Old Object in C
- New Object in Java
- Platform independent
- Old object in Linux machine
- New object in Windows machine
13Code Generation Tool
- 1. Write normal source code
- 2. Put it in open compiler
- 3. Auto generated de/serialization methods and
its StateContainer Class
Source code with Serialization methods
Open compiler
Input source code
Source code for StateContainer
14Transparency
- get_state() and set_state() methods auto
generated - State container class auto generated
- All required IDL files auto generated
- For example, IDL for PSerializable interface
- IDL for the State container itself
15IDL interface supports state exchange
IDL interfaces Mapped to Other Languages
Generated code with de/serialization
Tool
16Example
- Write java code for component X
- Put X into code generator to generate
serializable methods/IDL/StateContainer, called
X - Deploy X / Run it
- Write C code for component Y using same the
design as X - Put Y into serialization generator to get Y
- Call X.getState() method (returns Xs
stateContainer) - Call Y.getState() method (put stateContainer
from X) - Undeploy X
- Deploy Y
17Evaluation of Claims
- Language portability? (NOT totally)
- Some restriction
Example char
Memory pointer to other process
IDL COBRAOctet
C Char
IDL COBRAChar
18Evaluation of Claims
- Programming Transparency
- Still need to explicitly program Transaction
- Need atomic transaction
- Programming need to minimize the use of platform
dependent references
19Identification of Key references
- Memory snap shots
- High granularity
- Platform dependent
- VM (using Java built-in serialization)
- All objects must be in same VM
- Language dependent
- FT-CORBA (Fault-tolerant)
- Minimize faults by state backups
- Need to program get_state() and set_state()
methods - OMG PSDL (Persistence State Description Language)
- Declare PSDL and it will generate
de/serialization mechanism - PSDL mapped to common programming languages
- User need to manually define PSDL
- not generated
20Future work
- Limited consistency
- Only for Attribute facet
- No platform facet
- Some attributes/pointers are environment
dependent - No communication facet
- Need something to store the message queue
- Transaction
- No atomic transaction management, relied on
programmer - Suggestion
- Safe state
21Discussion
- Trade off between Transparency and Overhead
- Auto generated Serialization extracts ALL
attribute states - Slower, brute-force/everything approach
- Custom programmed Serialization extracts Only the
important attributes - Faster, optimized
22Discussion
- Only works if objects are same design
- Same structures
- Same variables
- Not common in practice!
- Almost Impossible!
23Discussion
- Suggestion
- Saves PC (Program counter)?
- Works well in the same language implementations
- Existing design only saves attributes
- Very powerful if also saves PC
- Solves atomic transaction problem
- More Transparency
- do not need to program safe state/transaction
management