Upload
alannah-morris
View
212
Download
0
Embed Size (px)
Citation preview
Developer workshop on I/O and persistence evolutionLAL,Orsay, 20-22 Feb 2012
Marcin Nowak (PAS BNL)
Extended T/P Converters
T/P Converters
Implemented in /Database/AthenaPOOL/AthenaPoolCnvSvc Basic T/P converter
A simple method converting data between Transient and Persistent representations 1 – 1 direct conversion stateless
Independent of any framework Unless dependency is required by the conversion process
Dependency on the transient store
Unfortunately has MessageSvc as parameter (in the default interface)
Simple and easy concept, but problematic for: Polymorphism Schema evolution of complex types (chain effect!)
T/P EDM Separation was introduced for Schema Evolution
Orsay 21/2/2012Marcin Nowak BNL
2
Evolution of Converters
Orsay 21/2/2012Marcin Nowak BNL (PAS)
3
AthenaPoolCnv T
Object Store
T POOL
T->P
P->T
AthenaPoolCustCnv P
Object Store
T POOL
T->PN
P2->T PN->TP1->TAthenaPoolCustomCnv
PN
P1,2..N
Object Store
T POOL
TLP Converters
Top Level T/P (TLP) converter: AthenaPoolTopLevelTPConverter Aggregation of basic T/P converters Manages conversion process
Persistent types used only in declarations, never in the code Provides automatic choice of basic T/P converters
Enforces uniform API in basic converters Type safe conversion Supports polymorphism and eliminates schema evolution chain effect
Owns the persistent object Therefore has state
Still 1 – 1 conversion No additional dependencies (!)
Using 2 predefined persistent types from AthenaPoolUtilites
Extending TLP converters invented to handle cross-package polymorphism
Orsay 21/2/2012Marcin Nowak BNL
4
Extending TLP Converters
(it is the same converter type, only extensions are not always used)
The principal TLP converter can be extended with other TLP converters Extending enlarges the combined set of types that the converter understands But each converter has its own persistent object (storage object)
Resulting in 1 (transient) – N (persistent) objects conversion
The extra persistent objects don’t have any corresponding StoreGate objects They need fake AthenaPool converters as their interface/anchor to the I/O framework
The principal TLP object stores navigational information for extending objects In a string format
Nesting foreseen but never fully implemented
Management of the extending TLP converters is in the AthenaPoolCnv layer T/P conversion layer does not depend on AthenaPool
but TLP converter management layer is in AthenaPool
needs to be reimplemented if moving to a different I/O framework
Orsay 21/2/2012Marcin Nowak BNL
5
AthenaPoolCnv Layer Responsibilities
Extended TLP converter management : AthenaPoolCnvTPExtension Self-contained, no dependencies
Specialization of AthenaPoolCustomCnv: T_AthenaPoolExtendingCnv Connects extensions at initialization runtime
Dependencies needs to be explicitly added in the principal AthenaPool converter
On the AthenPool level for I/O On the T/P level for conversion
The principal AthenaPool converter is responsible for reading and writing of the entire group of persistent objects
Because the extending AthenePool converters (for fake SG objects) are never called by the I/O framework directly
Order of writing is important because navigational information needs to be stored in the principal TLP object
Extensions used by more than one principal converter need to clone their AthenaPool converter (!)
Orsay 21/2/2012Marcin Nowak BNL
6
Schema Evolution
Persistent object versioning is supported on AthenaPoolCnv level X persistent representations - > 1 transient type TLP converters work on 1 <-> 1 principle
Need X different TLP converters
For extended converters, each version (X) needs to clone its extensions
The same principle as for a shared extension But for schema evolution case this is done only on demand
The extensions can be versioned as well The principal TLP converter needs to be extended with the current version of
the extending TLP converter
Orsay 21/2/2012Marcin Nowak BNL
7
Extending T/P Converters Overview
Orsay 21/2/2012Marcin Nowak BNL (PAS)
8
Orsay 21/2/2012Marcin Nowak BNL (PAS) 8
T->PN
P2->T PN->TP1->TAthenaPoolCnv
PN
P1,2..N
Object Store
T
POOL
T->PN
P2->T PN->TP1->TExtending AthenaPoolCnv
PN
T->PN
P2->T PN->TP1->TExtending AthenaPoolCnv
PN
P1,2..N
P1,2..N
Initi
aliz
atio
n
Merge