The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide...

32
The Lisbon Team - 8 December 2003 The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API ConditionsDB – Lisbon API Wide access to CondDB data and Wide access to CondDB data and schema schema LCG Conditions DB Workshop Far beyond the BLOBS… A real CondDB implementation for the real world usage

description

The Lisbon Team - 8 December 2003 ConditionsDB (mySQL) implementation MyISAMInnoDB MySQL Stable version CondDB API (specs) Upper Layer MySQL client library Postgres MySQL Devel. branch MySQL server bottom layer Other extentions Wrapers CondDBTable Overview

Transcript of The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide...

Page 1: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003

ConditionsDB – Lisbon APIConditionsDB – Lisbon APIWide access to CondDB data and schemaWide access to CondDB data and schema

LCG Conditions DB Workshop

Far beyond the BLOBS…

A real CondDB implementation for the real world usage

Page 2: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

OutlineOutline

OverviewOverview

Implementation evolutionImplementation evolutionPerformance issues

Implementation StatusImplementation StatusThe new CondDBTable object

InterfacesInterfaces DCS

Online Software (ATLAS specific)

POOL (Athena) and ROOT (Generic Tables)

ToolsTools Simple web browser

Examples and test programs

ConclusionsConclusions

Page 3: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

ConditionsDBConditionsDB(mySQL) implementation(mySQL) implementation

MyISAM InnoDB

MySQLStable version

CondDB API (specs)

Upper Layer

MySQL client library

PostgresMySQLDevel. branch

MySQL server

bottom layer

Other extentions

WrapersCondDBTable

OverviewOverview

Page 4: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

OverviewOverview

Some FeaturesSome Features Backend independency

Data volume Scalability

We have made it federated by design

Trying to minimize dependencies on external

packages

One slide installation approach

Page 5: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation evolutionImplementation evolution

First delivered implementation (0.2.6x):First delivered implementation (0.2.6x): Finished August 2002

Based on the ORACLE implementation (IT)

Uses the same standard (IT) interface Standard SQL without transactions

MySQL 3.23.xx as RDBMS

Very fast and promising

ORACLE mySQL Read 10,000 simple Objects 4m 37.32s 0m 7.93s

Page 6: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation evolutionImplementation evolution

The extended version (0.3.x)The extended version (0.3.x) Was delivered 8 months ago Was used in Muon (and TileCal) 2002 test beams It’s available in the ATLAS and Lisbon repositories Supports the same interface and also:

Tiny objects storage and retrieval

Objects that do not need versions

New functions implemented and added to the interface

Plus:PVSS manager to interface with DCS

Available on windows platforms

DB schema modified - for better performance Standard SQL without transactions MySQL 3.23 or 4.0 as RDBMS

Page 7: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation evolutionImplementation evolution

The extended version (cont)The extended version (cont) New building approach

Using standard GNU approach ./configure, make, make install

Extensions for the “tiny” interfaceFull support for objects with structures (including arrays)

Single/Field arrays

New DB schema

Logging mechanism for debug purposesStores API actions in one table

Single /Multi-line

arrays

Single / Field

arrays

Structures(incl.

arrays)PVSS X X

PVSS extendedOnline

Page 8: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation evolutionImplementation evolution

The version 0.3.5The version 0.3.5 Introduces binary array support extending MySQL

It also allows several “columns”

Generic relational model for CondDB

Postgres data model MySQL data model Array extension

Page 9: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation evolutionImplementation evolution

0.4.x version0.4.x version Beta version available

http://kdata5.fis.fc.ul.pt/cgi-bin/cvs/viewcvs.cgi/ConditionsDB/

Call for beta-testers:Download it from the siteType: ./configure, make, make install

Final (test-beam) version will be released when the DCS and Online SW interfaces are readySome (minor) things might yet change

Access to the data using BLOBS and CondDBTable

Page 10: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation evolution - performanceImplementation evolution - performance

Performance comparison (10.000 objects)Performance comparison (10.000 objects)Standard (BLOB) interface – PIV 2,6 GHz, 1GB RAM, gcc 3.3

CondDB - mySQL Performance evolution

0200

400600800

100012001400

16001800

StoreDataX ReadAll StoreDataY ReadAllY

Test type

Tim

e (s

)

0.2.6e

0.3.0

0.3.3

0.4.0

Approach: Prepare to give up the first one.

Conclusion: Factor 10 better; We had to do prototyping because the pure design and discussion was leading nowhere.

CondDB - mySQL Performance evolution

0200400600800

10001200140016001800

0.2.6e 0.3.0 0.3.3 0.4.0

Implementation versionTi

me

(s)

StoreDataX

ReadAllX

StoreDataY

ReadAllY

Page 11: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation evolution - performanceImplementation evolution - performance Performance comparisonPerformance comparison

Online interface – without versions Athlon 2GHz, 1GB RAM, gcc 3.3Test for 50.000 objects; Arrays of 20 Floats

CondDB - mySQL Performance evolution(objects without versions)

7,6

99

67

72,8

13000

6,48 0.45

14,24

0,1

1

10

100

1000

10000

100000

v0.3.3 v0.4.0

Version

Tim

e (s

) StoreSingle

StoreArray

BrowseAllSingle

BrwoseAllArray

Page 12: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation statusImplementation status

0.4.x version0.4.x version

....

....

....

Page 13: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation statusImplementation status

0.4.x version0.4.x version 7 types of data storage:

BLOBS (with / without versioning)

CondDBTable (with / without versioning)

CondDBTable with Id (with / without versioning)

POOL ( and ROOT)

Each folder contains an object of a given type

CondDBTable

CondDBTableID

BLOB

Page 14: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation StatusImplementation Status

Whats new in the APIWhats new in the APIChanges to the interface

Overload for CondDBTable: storeCondDBObjectfindCondDBObjectcreateCondDBFolder

New functions:browseHistorygetFolderType

New class:ICondDBTable

Removed:

all functions and methods which are PVSS specific

Page 15: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Implementation StatusImplementation Status

Still limited tagging mechanismStill limited tagging mechanism

time1+

4- 2+vers

ion

1-2-

Object 1TAG1Object 2Object 4

Object 33-4+

3+HEAD

2-1- 1+

2+Object 1

vers

ion

Object 2HEAD

time

1 2

4 31 2Browse objects in HEAD

Browse objects in tag TAG1

Page 16: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

The CondDBTableThe CondDBTable

What is the CondDBTableWhat is the CondDBTableThe CondDBTable is a transient object. It is possible to update

it in memory and then commit it to the database (the CondDB

persistent storage facility).

the table structure is easily mapped from memory to database

Database know about the object structure

Restricted Transient model to support the Relational model

Exploring the “Relational” tuple

DBMS independent

Page 17: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

The CondDBTableThe CondDBTable

What is the CondDBTableWhat is the CondDBTableBasic CondDBTable functions

setName getNames setType getTypesgetRowsetCell getCellsetColumndatagetNumRowsgetNumColumnssetSinceTime setTillTimechangeSinceTime changeTillTimegetSinceTime getTillTime

Page 18: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

vers name Jff Jzz Job x y z thx thy thz

A BIL 3 -1 0 0.395 1.612 -0.973 0.001787 0.000038 -0.000346

A BIL 3 -2 0 1.068 1.780 -1.005 0.003966 0.000969 0.000219

A BML

… …

… …

… …

Each column has the proper data typeEasiest data access (no need for parsing)

<block><format> %s %s %d %d %d %f %f %f %f %f %f </format><names> vers name Jff Jzz Job x y z thx thy thz </names><size> 6 </size><r> A BIL  3 -1  0      0.395     1.612    -0.973  0.001787  0.000038 -0.000346 </r><r> A BIL  3 -2  0      1.068     1.780    -1.005  0.003966  0.000969  0.000219 </r><r> A BML  3 -1  0      1.162     7.637     1.866  0.001507  0.000204  0.000100 </r><r> A BML  3 -2  0      1.002     7.511     4.831  0.001779 -0.000156  0.000196 </r><r> A BOL  3 -1  0      1.867     9.902     5.087  0.000749  0.001143  0.000255 </r><r> A BOL  3 -2  0      0.877    13.717     8.736  0.001523  0.000962 -0.000648 </r>

</block> |

The CondDBTableThe CondDBTable

How to map blobls (xml type) into a CondDBTableHow to map blobls (xml type) into a CondDBTable

Page 19: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

CondDBTable with IDCondDBTable with ID

t1 t2 Id Column A(Type x)

Column B(Type y)

…….…….

Column Z(Type z)

1 Inf 1

1 Inf 2

1 Inf ….

1 Inf N

t1 t2 Id Column A(Type x)

Column B(Type y)

…….…….

Column Z(Type z)

1 Inf 1

1 10 2

1 Inf ….

1 Inf N

10 Inf 2

Array Object Array/Object Array

Page 20: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

CondDBTableCondDBTable

Some performance valuesSome performance valuesCondDBTable 4 Columns (single objects) 10.000 values

Store – 13s

Read – 0,4 s

CondDBTable 8 Columns (4 single + 4 array [20]) 10.000 values

Store – 21 s

Read – 5 s

CondDBTableID 4 Columns (single objects) 5 ID, 10.000 values each

Store – 54 s

Read – 2 s

Page 21: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Interfaces - DCSInterfaces - DCS PVSS API ManagerPVSS API Manager

A new manager which uses the CondDBTable is available. This manager will be able to store structures and structures of arrays.

PVSS 3 compatible (only after PVSS 3 candidate release)

Luis Pedro - 24 September 2003

Configuration panel dpStruct

Page 22: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Interfaces – ATLAS Online SoftwareInterfaces – ATLAS Online Software Online CondDB interface (CDI) – ATLAS specificOnline CondDB interface (CDI) – ATLAS specific

This interface stands for the TDAQ as the PVSS manager stands for DCS. The new CondDB version will be able to cope with data coming from the IS system

Database

IS

CondDB API

CDI

Availability of Operational monitoring and Histograming data

Availability of configuration data

Availability of bookkeeping information

For the next test-beamFor the future

CDI

IS

ConfDB

OBK

Page 23: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Interfaces - POOLInterfaces - POOL

Major issueMajor issue It will allow interface CondDB and POOL/Athena

Discussion with experts on-going

Test beam real issue

CondDBTable objects needed inside ATHENA (POOL)

First example program should be available at the

beginning of May…

Page 24: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Tools - Simple web browserTools - Simple web browser

CondDBrowserCondDBrowser Read only CondDB web browser

Uses the C++ API

PHP bind to the C++ library

Will be installed in the next test-beam offline server

Simple display facilities

In the future it will have the functionalities to display

histograms – (using ROOT?)

Page 25: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Tools – Simple web browserTools – Simple web browser

CondDBrowserCondDBrowser

Page 26: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Tools – Simple web browserTools – Simple web browser

TCL/TK browserTCL/TK browser

Page 27: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Tools – example programsTools – example programs

StoreStore storeDatax

storeDatay

storeTable

ReadRead readData

readTable

TagsTagscreateTags

testTags

FoldersFolders createFolderx

PerformancePerformance performanceTests

DB DB

initializiationinitializiation basicSession

Page 28: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

Future developmentsFuture developments

InterfaceInterface Understand the tags problem ConditionsDB -> Condbtable -> User class include file Stand alone browser with Administrative tools

Partitioning

Other

Migrate to the LCG CVS repository Develop a set of common tools/tests to the ORACLE implementation

Luis Pedro - 24 September 2003

Page 29: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

ConclusionsConclusions

How to get this implementationHow to get this implementation

export CVSROOT=:ext:[email protected]:/usr/local/cvsrootexport CVS_RSH=“ssh”cvs co ConditionsDB (password conditions)

WEB cvs accesshttp://kdata5.fis.fc.ul.pt/cgi-bin/cvs/viewcvs.cgi

Build it./configure --with-mysql-lib=~/mysql_lib_dir --with-mysql-inc= /mysql_include_dir/

--withconddbprofile=mysql_host:test_mydb

make

make install

Try it!

Page 30: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

ConclusionsConclusions What do weWhat do we havehave::

An API that knows how to read the structure of the objects stored in the DatabaseDatabase partitioning from the API

ex: data_tbl_3_1, data_tbl_3_2, .... (for folder /cal/EM/Calib, different times)this is not what BaBar calls partitions

Restricted Transient model to support the Relational model Exploring the “Relational” tuple

DBMS independent

CondDBTables can be used to define data sets that can be accessed as any other relational table (using keys/relations if wanted/needed…….)

Interface between DCS and ConditionsDBSimple web browser (first version will be available really soon!)

This is much more than a BLOB storage mechanism

Page 31: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

ConclusionsConclusions What do weWhat do we havehave::

An interface ready for the real data acquisitionAPI will be used and TESTED in next ATLAS combined test beam

It is very important to get to a new standard interface. We are very much looking forward to any discussion that will help in this task – including adding our and more extensions.

What more functionalities are needed?

This is a REAL API implementation for the real World usage

Page 32: The Lisbon Team - 8 December 2003The Lisbon team - 25 November 2003 ConditionsDB – Lisbon API Wide access to CondDB data and schema LCG Conditions DB Workshop.

The Lisbon Team - 8 December 2003

The endQuestions... Comments