the cebaf element database - cern · s resume. re f arni, md, pr, md, rolan erd, md, dp (1999),...

3
THE CEBAF ELEMENT DATABASE* T. Larrieu, M. Joyce, C. Slominski, JLAB, Newport News, VA 23606, U.S.A. Abstract With the inauguration of the CEBAF Element Database (CED) in Fall 2010, Jefferson Lab computer scientists have taken a step toward the eventual goal of a model- driven accelerator. Once fully populated, the database will be the primary repository of information used for everything from generating lattice decks to booting control computers to building controls screens. A requirement influencing the CED design is that it provide access to not only present, but also future and past configurations of the accelerator. To accomplish this, an introspective database schema was designed that allows new elements, types, and properties to be defined on-the-fly with no changes to table structure. Used in conjunction with Oracle Workspace Manager, it allows users to query data from any time in the database history with the same tools used to query the present configuration. Users can also check-out workspaces to use as staging areas for upcoming machine configurations. All Access to the CED is through a well-documented Application Programming Interface (API) that is translated automatically from original C++ source code into native libraries for scripting languages such as perl, php, and TCL making access to the CED easy and ubiquitous. BACKGROUND Previous efforts to compile a comprehensive configuration database for the Jefferson Lab CEBAF accelerator and use it to automate the setup or restoration of the electron beam have foundered on the complexity of accommodating the constantly evolving hardware installed in the accelerator and the multiplicity of elements whose properties vary with the increasing energy of each pass through the recirculating LINACS. The progress of the 12GeV upgrade project has, however focused renewed emphasis upon solving these problems by developing a central authoritative configuration database available to existing or future tools needed to operate the revamped accelerator. The resulting product has been coined the CEBAF Element Database (CED). DATABASE Design The CED has been implemented using a modified Entity-Attribute-Value with Classes and Relationships (EAV/CR) data model [1]. This design choice is appropriate because the types of information to be stored in the CED will vary from system to system. The database will necessarily evolve over time to support additional configuration attributes for existing systems as well as to model the yet-unknown parameters of the new hardware to be installed for the 12GeV upgrade. In a traditional database schema, adding support for new accelerator hardware would involve adding additional tables and columns to the database. Such changes impose a burden by requiring software updates before the new schema can be used. In contrast, the EAV/CR data model employed by the CED is introspective – defining a new class of accelerator hardware in the CED simply involves adding rows to the already-existing metadata “catalog” tables (fig. 1). Once defined in the catalog, existing software is fully capable of interacting with the new entities after discovering their properties from the metadata tables. Versioning In addition to its flexibility in accommodating future data requirements, the CED schema was also designed to make use of the Oracle Workspace Manager toolkit [2]. Oracle Workspace Manager is used to version-enable the table rows in the CED, and permit simultaneous access to present, proposed, and historical versions of data. Oracle Workspace Manager accomplishes this feat for a table by renaming it to table name_LT, adding a few columns to the table to store versioning metadata, creating a view on the version-enabled table using the original table name and defining INSTEAD OF triggers on the view for SQL DML operations. Clients of the CED do not need to incorporate any special logic in order to interoperate with the different versions stored in the database other than to specify which save point or workspace they wish to access. Workspaces A key version-enabling feature of the Oracle Workspace Manager is the ability to compartmentalize a collection of database changes into a logical construct called a workspace. The primary workspaces is by definition the LIVE workspace and represents the current configuration of the CEBAF accelerator. Additional workspaces may be “checked out” from LIVE and used to stage upcoming configurations or to perform what-if scenarios (Fig. 2). The contents of these workspaces can be merged (committed) into LIVE when appropriate. *Notice: Authored by Jefferson Science Associates, LLC under U.S. DOE Contract No. DE-AC05-06OR23177. The U.S. Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce this manuscript for U.S. Government purposes. MOP261 Proceedings of 2011 Particle Accelerator Conference, New York, NY, USA 594 Copyright c 2011 by PAC’11 OC/IEEE — cc Creative Commons Attribution 3.0 (CC BY 3.0) Instrumentation and Controls Tech 04: Control Systems

Upload: others

Post on 26-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The CEBAF Element Database - CERN · s resume. RE F arni, MD, Pr, MD, Rolan erd, MD, DP (1999), "O tific Data Usi al of the ciation 6 (6): 4 le worksp /. c v-workspace - ley, David

THE CEBAF ELEMENT DATABASE*

T. Larrieu, M. Joyce, C. Slominski, JLAB, Newport News, VA 23606, U.S.A.

Abstract With the inauguration of the CEBAF Element Database

(CED) in Fall 2010, Jefferson Lab computer scientists have taken a step toward the eventual goal of a model-driven accelerator. Once fully populated, the database will be the primary repository of information used for everything from generating lattice decks to booting control computers to building controls screens.

A requirement influencing the CED design is that it provide access to not only present, but also future and past configurations of the accelerator. To accomplish this, an introspective database schema was designed that allows new elements, types, and properties to be defined on-the-fly with no changes to table structure. Used in conjunction with Oracle Workspace Manager, it allows users to query data from any time in the database history with the same tools used to query the present configuration. Users can also check-out workspaces to use as staging areas for upcoming machine configurations.

All Access to the CED is through a well-documented Application Programming Interface (API) that is translated automatically from original C++ source code into native libraries for scripting languages such as perl, php, and TCL making access to the CED easy and ubiquitous.

BACKGROUND Previous efforts to compile a comprehensive

configuration database for the Jefferson Lab CEBAF accelerator and use it to automate the setup or restoration of the electron beam have foundered on the complexity of accommodating the constantly evolving hardware installed in the accelerator and the multiplicity of elements whose properties vary with the increasing energy of each pass through the recirculating LINACS. The progress of the 12GeV upgrade project has, however focused renewed emphasis upon solving these problems by developing a central authoritative configuration database available to existing or future tools needed to operate the revamped accelerator. The resulting product has been coined the CEBAF Element Database (CED).

DATABASE

Design The CED has been implemented using a modified

Entity-Attribute-Value with Classes and Relationships (EAV/CR) data model [1]. This design choice is

appropriate because the types of information to be stored in the CED will vary from system to system. The database will necessarily evolve over time to support additional configuration attributes for existing systems as well as to model the yet-unknown parameters of the new hardware to be installed for the 12GeV upgrade.

In a traditional database schema, adding support for new accelerator hardware would involve adding additional tables and columns to the database. Such changes impose a burden by requiring software updates before the new schema can be used. In contrast, the EAV/CR data model employed by the CED is introspective – defining a new class of accelerator hardware in the CED simply involves adding rows to the already-existing metadata “catalog” tables (fig. 1). Once defined in the catalog, existing software is fully capable of interacting with the new entities after discovering their properties from the metadata tables.

Versioning In addition to its flexibility in accommodating future

data requirements, the CED schema was also designed to make use of the Oracle Workspace Manager toolkit [2]. Oracle Workspace Manager is used to version-enable the table rows in the CED, and permit simultaneous access to present, proposed, and historical versions of data.

Oracle Workspace Manager accomplishes this feat for a table by renaming it to table name_LT, adding a few columns to the table to store versioning metadata, creating a view on the version-enabled table using the original table name and defining INSTEAD OF triggers on the view for SQL DML operations. Clients of the CED do not need to incorporate any special logic in order to interoperate with the different versions stored in the database other than to specify which save point or workspace they wish to access.

Workspaces A key version-enabling feature of the Oracle

Workspace Manager is the ability to compartmentalize a collection of database changes into a logical construct called a workspace.

The primary workspaces is by definition the LIVE workspace and represents the current configuration of the CEBAF accelerator. Additional workspaces may be “checked out” from LIVE and used to stage upcoming configurations or to perform what-if scenarios (Fig. 2). The contents of these workspaces can be merged (committed) into LIVE when appropriate.

*Notice: Authored by Jefferson Science Associates, LLC under U.S. DOE Contract No. DE-AC05-06OR23177. The U.S. Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce this manuscript for U.S. Government purposes.

MOP261 Proceedings of 2011 Particle Accelerator Conference, New York, NY, USA

594Cop

yrig

htc ○

2011

byPA

C’1

1O

C/I

EE

E—

ccC

reat

ive

Com

mon

sAtt

ribu

tion

3.0

(CC

BY

3.0)

Instrumentation and Controls

Tech 04: Control Systems

Page 2: The CEBAF Element Database - CERN · s resume. RE F arni, MD, Pr, MD, Rolan erd, MD, DP (1999), "O tific Data Usi al of the ciation 6 (6): 4 le worksp /. c v-workspace - ley, David

FEmt

S

w

t

p

b

F

Figure 1: The Element valuemeaningful attto the database

Save Points Because the

of all changes workspace medata simply bythe query is bdon’t have toprovides namcorresponding beginning or accelerator ma

Figure 2: CEDand staging changes to LIV

core CED sches stored in thtributes. New te schema are no

Oracle Worksto a row in add

embership, it iy specifying thbeing issued. specify exac

med save pointto key configuend of an

aintenance peri

D Workspaces sworkspaces u

VE.

hema illustratinhe “Inventory”types of elemenot required.

space Manager dition to informs possible to qhe date and timTo assist usert dates and tits for the LIVuration milestoexperimental iod (Fig. 2).

showing historused to prep

ng the “Catalog” tables as strnts may be add

saves a historymation about itquery historicame as of whichrs, so that theyimes, the CEDVE workspac

ones such as thrun or of an

rical save pointpare upcoming

g” tables that sings, floats, in

ded to the CED

y ts al h y D e

he n

ts g

In conthistory usvalues, woff queriedata requthan acces

ConfiguWorksp

of configfew propCED doeworkspaca staging committed

The geemployedcontents odatabase programs enforcingembodied

For thethe sole iinformatioonly to CPHP, and

store the metadntegers, etc. a

D on-the-fly by

trast to the typsing triggers an

where accessinges or custom ruires no differssing the curre

uration Contrpaces are also uration controerties explicitl

es not permit ue. All updatesworkspace andd to LIVE.

INeneralized natud by CED requof the metadatstorage into and users.

g much of the d in the metada CED, a shareinterlocutor foon. Native ver

C++ programs, Tcl. The scrip

data defining aare mapped viay defining their

pical approachnd a history tag the history rereports, access

rent software aent configuratio

rol used in the CE

ol. With the ely identified ausers to updats to the CED md audited for v

TERFACE ure of the EAuires a robust ta tables and trrecognizable The API is adata validation

ata catalog. d library was w

or applications rsions of the Abut also to scrpt language ve

accelerator elema the metadata

r metadata – ch

h to preservingable containingequires speciasing CED histand no more on.

ED to effect aexception of aas live-editablte data in the

must be performvalidity before

AV/CR data mAPI to interprranslate the abattributes usef

also responsibn and domain

written in C++that will acce

API are availabripts written in

ersions are gene

ments. a into

hanges

g data g prior l one-torical effort

a level a very e, the LIVE

med in being

model ret the bstract ful to le for logic

+ to be ess its ble not n Perl, erated

Proceedings of 2011 Particle Accelerator Conference, New York, NY, USA MOP261

Instrumentation and Controls

Tech 04: Control Systems 595 Cop

yrig

htc ○

2011

byPA

C’1

1O

C/I

EE

E—

ccC

reat

ive

Com

mon

sAtt

ribu

tion

3.0

(CC

BY

3.0)

Page 3: The CEBAF Element Database - CERN · s resume. RE F arni, MD, Pr, MD, Rolan erd, MD, DP (1999), "O tific Data Usi al of the ciation 6 (6): 4 le worksp /. c v-workspace - ley, David

m

B

b

Rt

F

M

A

b

tt

automatically source SWIGGenerator) toomakes it easieoperators thatlanguages oveBecause they languages havbenefit from thand documenti

On top of interfaces to tC++ library aRESTful web tool usable fro

Figure 3: CEDdata in HTMLsimple to cons

The CED wSeptember 20Magnet and Infor the RF aAlignment are

In concert wbeing made automated) thaaccurate. In include buildidirectly from tthat crawls antheir configura

from the oriG (Simplifiedol [3,4]. Haviner to update tht have been r the years, as stem from theve the same he developmening the originathe core API

the CED haveand its scriptinterface and

om JLAB Linux

D Web InterfaL (shown), XMstruct URL patt

IMPLEMEwas rolled out 010 initially pnput Output Coand BPM sy currently beinwith the initial

to develop at will keep ththe case of thing the DHCthe CED infor

nd inspects theation against th

iginal library d Wrapper ng the API nathe many tools

written in twell as to dev

e same source functionality

nt effort that wal compiled librI, two generale also been buting language a full-featuredx workstations

ace provides aML, or plain tterns.

ENTATIONto the JLAB

populated withontroller (IOC)stems and fro

ng added. l data populat

the processhe information he IOC informP server confrmation as wele IOCs periodihe database.

via the openand Interfactively availablused by JLAB

these scriptingvelop new ones

library, all thavailable and

went into testingrary. l purpose useuilt around th

derivatives:d command-lin.

access to CEDtext format vi

N community in

h data for th) systems. Datom Survey &

tion, efforts ares (preferablyup-to-date and

mation this wilfiguration filell as a programically to verify

n e e B g s.

he d g

er he

a ne

D ia

n he ta &

re y d ll

es m fy

Figure 4:CED to configurabeam tran

In Mayduring whwill be recalibrateddisseminathe magnduring thexpected high-levelExplorer draw upoperation

[1] NadkChenShephPerryScienJournAsso

[2] “Orachttp:/appde

[3] BeazTool C++”work

[4] http:/

The Interactivcreate a fo

ation for the pnsport.

y 2011, CEBAFhich time all o

emoved from thd. The CEDate key informnets, where shhat process. that developerl applicationsshown in figuron the CEDs resume.

REFkarni, MD, Prn, MD, Rolanherd, MD, DP

y (1999), "Ontific Data Usinal of the ciation 6 (6): 4cle worksp//www.oracle.cev-workspace-ley, David M For Integratin

” Proceedingskshop. Montere//www.swig.or

ve Elegant Expocusing latticepurpose of m

F will be shut dof the 400+ lahe accelerator

D will be usemation (such as hims are instal

During the shrs and operator

(such as the re 4) and contr

D for their c

FERENCESrakash M.; Mnd; Skoufos, Phil, Gordon; Organization ing the EAV/CAmerican M

478–493, PMIDpace Manacom/technetwo-manager-11g-(1996), “SWIG

ng Scripting Las of the Fourey, CA July 6-1rg/

plorer now use from a CE

modeling accel

down for six marge dipole mato be measureed to capturenew field map

lled, etc.) genehutdown, it isrs will update Interactive El

rol system screconfiguration

S Marenco, MD,

PhD, EmmaMiller, MD, of Heteroge

CR RepresentaMedical InformD 10579606 ager Overvork/database/tw128289.pdf G : An Easy t

anguages with rth Annual T10.

es the EBAF lerator

months agnets ed and e and ps for erated s also many legant ens to when

Luis; anouil;

PhD, eneous ation", matics

view”. wp-

o Use C and

Tcl/Tk

MOP261 Proceedings of 2011 Particle Accelerator Conference, New York, NY, USA

596Cop

yrig

htc ○

2011

byPA

C’1

1O

C/I

EE

E—

ccC

reat

ive

Com

mon

sAtt

ribu

tion

3.0

(CC

BY

3.0)

Instrumentation and Controls

Tech 04: Control Systems