Title: Portable Serialization of CORBA Objects: a Reflective Approach by MarcOlivier Killijian, JuanCarlos
1Portable Serialization of CORBA Objects a
Reflective Approachby Marc-Olivier Killijian,
Juan-Carlos Ruiz and Jean-Charles Fabre
- Reviewed by
- Vishavdeep Sharma
- Sayeed Mohammed
2Agenda
- Introduction
- Pre-requisite concepts
- Concepts in the paper
- Illustration
- Usage of the proposed technique
- Advantage of technique
- Related Work
- Further Work
- Summary
3Introduction
- The Authors have implemented a portable
serialization technique for CORBA objects based
on reflection that exposes the state of an object
- An observer tool
- Illustrated this technique by exchanging state
information between a C and a Java incarnation
of a CORBA object
4Pre-requisite concepts
- CORBA
- Common Object Request Broker Architecture
- Interface Definition Language (IDL)
- The ORB
- Open Compilers
- Reflection
- beyond bending of light ?
- you can say its bending of objects
5CORBA
6Open Compilers
7Reflection
- Reflection is the ability of a program to examine
and possibly modify its high level structure at
runtime. - Few Examples of platform supporting refection
are - The Java Virtual Machine (JVM)
- .Net and Common Language Runtime (CLR)
- Python
8Concepts in the paper
State container CORBA any variables
Language Specific Code
Object
object
Serialize
MOP open compilers
Anys are generic IDL variables,that can hold any
IDL data value without loss of type info An
un-typed data buffer,where data value is stored
with its type
9Concepts in the paper
- A Structural Model for CORBA Objects State
- Type system
- Object-oriented features
- The Meta-Program
- Conformance rules
- CORBA-mapping rules
- Language support
10Type system (Structural Model)
- Basic types
- Built-in types The IDL built-in types are
short, unsigned, short, long, unsigned long,
float, double, char, Boolean and octet. - String types IDL defines a specific type for
Strings - CORBA object reference types CORBA object
references are identifiers used by clients to
access distant CORBA objects. - Class types From a programming language
viewpoint, class types are the basic notions for
the provision of class - Constructed types
- are data types defined in terms of one or more of
the above basic types. - Structures
- Arrays
- Sequences
- user-defined
11Conformance rules(The Meta-Program)
- Rules to guide the mapping of object states to
CORBA state containers - Built-in types and strings Direct basic data
types to and its IDL type equivalent - Object reference types Object reference types
are mapped to IDL strings
12Conformance rules (Contd..)
- Class types
- Classes are mapped to IDL structures name of the
IDL structure generated for a class called A is
AState. - Handling inheritance
- When a class A inherits from another one called
B, then the IDL structure generated for class A
(AState) contains a field of type BState in which
the internal state of the B super-class is
stored - Inheritance is handled recursively
- Handling class association
- Composition by value
- Composition by reference
13Composition by reference
14Language support generation
15Implementation of the PSerializable interface.
16Implementation of the PSerializable interface
17De/Serialization Rules
18De/Serialization Rules
19Illustration
- Chat Service ( C and Java)
- Interoperability of the C and Java server at
state level - Open compilers Open C and Open Java
- Use of any variables to pack/unpack the
ChatService state container - External state observer
- GUI application that obtains the state of any
CORBA object compiled using Open compilers - Can be used to debug an application
- First illustration of a portable serialization
process
20Illustration (contd..)
- Exchange of state between C and Java
server.Scenario - Two clients chat through the C chat server
- C Server crashes ( State is obtained)
- Java server is started with its state restored
from the saved C server state - Clients continue to chat without disturbance
- Persistence
- The state obtained from a CORBA object is saved
to disk - State is stored to disk each time a client
connects/disconnects
21Language mapping
- Restriction Object state model and Conformance
rules - Only pure object oriented languages comply with
the defined object state model (Java) - For C , few restrictions must be observed
- Multiple inheritance Forbidden
- Multilevel pointers Forbidden
- Pure object oriented programming is required for
dependability reasons - Common practice in safety critical application
22Usage of Proposed Technique
- Mobile Agents
- Small objects that can travel the network in
order to realize one or several tasks at
different locations1 - Portable Serialization provides basic support for
Ubiquitous computing - A simple example of travel agent
23Usage (Contd..)
- Check pointing process of saving the program
state so that it may be restored later1 - Involves
- getting a set of local checkpoints of the
entities in distributed environment to handle
global checkpoints - getting the current state of individual objects
for replica synchronization and cloning replicas - Relies on memory snapshots that provide raw
information that lacks semantics - Proposed technique solves this issue by providing
more meta information and a portable format
24Advantages
- Obtaining the state of CORBA objects is useful in
testing - State information can be used to adjust the
implementation - Object state provide useful insights of its
behavior at run time that can be used for
performance analysis - Useful in optimatiztion
25Related Work
- Memory management approaches
- Based on memory snapshots and control of memory
allocation - The information lacks semantics
- Not suitable in language heterogeneous
environments
26Related Work (contd..)
- Virtual machine solutions
- Integrated runtime support for serialization
- Runtime of the language holds the object state
information - Example Java reflection API
- Limitation information is useful only on the
same VM elsewhere - Compiler assisted solutions
- Based on open compilers but without runtime
support for serialization, based on C 2122 - Limitation Information is language dependent
-
27Related Work (contd)
- FT-CORBA
- Extends CORBA with a set of IDL interfaces for
the management of consistently replicated fault
tolerant objects1 - Provides strong replica consistency
- Object Serialization is through CORBA
Checkpointable objects similar to portable
serializable object
28Future Work
- A new language called PSDL(persistent state
declaration language) by OMG for the declaration
of object states.But the programmer is
responsible for providing PSDL declarations.
Using the technique in the paper,PSDL could be
generated automatically - Tools for managing the evolution of software
29Future Work (contd..)
- The paper only deals with the serialization of
the attribute facet of the CORBA object but this
is not sufficient to handle object
states.Reflective component technology including
middleware and operating system components to
address the other facets like platform and
communication
30Summary
- Technique to serialize attribute aspects of a
CORBA Objects using reflection - Illustrated by Observer tool and chat service
- Three main Claims of the technique
- Minimizes the effort required for providing
customized implementations of serialization
analysis and generation rules supplied to the
open compiler are defined only once and they can
be later used on any CORBA object. - Second, these rules are automatically applied
this avoids the participation of unskilled
programmers in the generation of the
serialization mechanisms. - The technique only depends on abstractions
supplied by the CORBA support that are, by
definition, both platform and programming
language independent.
31Discussion
- Language Mapping
- Application to legacy systems and non OOP
languages, for example C ? - where you dont have object states but you have
global states and individual modules have access
or references to global states ,so we can define
the mapping rules and marshalling and un
marshalling rules.we can still use their concept - Platform and Communication aspects of Object ?
- Given technique serialize only the attribute
aspects of object other aspects like OS calls,
local variable states (Platform aspects) and any
channel descriptors, valid communication tokens
(communication aspects) are also very important
in distributed environment.
32Discussion (contd..)
- Applicability to mobile applications ?
- Middleware technologies like CORBA are reasonably
heavy they require lot of bandwidth and
connectivity - Dynamic reconfiguration ?
- The approach suggested in a compile time
approach. How can this be applied to the adaptive
or run-time reconfigurable systems
33References
- 1 Marc-Olivier Killijian et. al, Portable
Serialization of CORBA Objects a Reflective
Approach - Tewksbury et. al, Automatically-Generated State
Transfer and Conversion Code to Facilitate
Software Upgrades - Object Management Group, Persistent State Service
2.0,http//www.omg.org/cgi-bin/doc?orbos/99-07-07 - Licia Capra et.al, Reflective Middleware
Solutions for Context-Aware Applications
34Thank you