The Event as an Object-Relational Database: Avoiding the Dependency Nightmare Christopher D. Jones Cornell University, USA.

Slides:



Advertisements
Similar presentations
Database management system (DBMS)  a DBMS allows users and other software to store and retrieve data in a structured way  controls the organization,
Advertisements

Copyright © 2012 Pearson Education, Inc. Chapter 16: Exceptions, Templates, and the Standard Template Library (STL)
Chapter 6 UNDERSTANDING AND DESIGNING QUERIES AND REPORTS.
Data Types in Java Data is the information that a program has to work with. Data is of different types. The type of a piece of data tells Java what can.
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
Reconstruction and Analysis on Demand: A Success Story Christopher D. Jones Cornell University, USA.
EventStore Managing Event Versioning and Data Partitioning using Legacy Data Formats Chris Jones Valentin Kuznetsov Dan Riley Greg Sharp CLEO Collaboration.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
The Relational Database Model
CLEO’s User Centric Data Access System Christopher D. Jones Cornell University.
Programming Languages and Paradigms Object-Oriented Programming.
Review C++ exception handling mechanism Try-throw-catch block How does it work What is exception specification? What if a exception is not caught?
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Chapter 7: Database Systems Succeeding with Technology: Second Edition.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
Introduction to C Programming CE Lecture 7 Compiler options and makefiles.
Chapter 8 – Main Memory (Pgs ). Overview  Everything to do with memory is complicated by the fact that more than 1 program can be in memory.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Procedural and Object-Oriented Programming 13.1.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals.
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
The LC-3 – Chapter 7 COMP 2620 Dr. James Money COMP
Chapter 4c, Database H Definition H Structure H Parts H Types.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Standard Template Library The Standard Template Library was recently added to standard C++. –The STL contains generic template classes. –The STL permits.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC PROGRAMMING FUNDAMENTALS Bilal Munir Mughal 1 Chapter-8.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
GIS Data Models GEOG 370 Christine Erlien, Instructor.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
STAR Event data storage and management in STAR V. Perevoztchikov Brookhaven National Laboratory,USA.
Database Management Systems (DBMS)
1 Metadata Working G roup Report Members (fixed in mid-January) G.AndronicoINFN,Italy P.CoddingtonAdelaide,Australia R.EdwardsJlab,USA C.MaynardEdinburgh,UK.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 6: User-Defined Functions I.
File Systems cs550 Operating Systems David Monismith.
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
1 CSCD 326 Data Structures I Hashing. 2 Hashing Background Goal: provide a constant time complexity method of searching for stored data The best traditional.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 6: User-Defined Functions I.
CIS 250 Advanced Computer Applications Database Management Systems.
Instructor: Pavlos Pavlikas1 How Data is Stored Chapter 8.
Chapter 3: User-Defined Functions I
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
Copyright © 2009 – Curt Hill Standard Template Library An Introduction.
Copyright (c) 2014 Pearson Education, Inc. Introduction to DBMS.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 6: User-Defined Functions I.
Introduction to Databases Angela Clark University of South Alabama.
CSCI-383 Object-Oriented Programming & Design Lecture 25.
for all Hyperion video tutorial/Training/Certification/Material Essbase Optimization Techniques by Amit.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
General Architecture of Retrieval Systems 1Adrienn Skrop.
Edexcel OnCourse Databases Unit 9. Edexcel OnCourse Database Structure Presentation Unit 9Slide 2 What is a Database? Databases are everywhere! Student.
( ) 1 Chapter # 8 How Data is stored DATABASE.
Topic 2: Hardware and Software
Unit 2 Technology Systems
Chapter 6: User-Defined Functions I
System Programming and administration
Exceptions, Templates, and the Standard Template Library (STL)
Database Systems Unit 16.
Chapter 11: File System Implementation
Operating Systems Lecture 3.
Spreadsheets, Modelling & Databases
How to use hash tables to solve olympiad problems
Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/29.
Chapter 1: Creating a Program.
Presentation transcript:

The Event as an Object-Relational Database: Avoiding the Dependency Nightmare Christopher D. Jones Cornell University, USA

C. Jones CHEP032 Introduction Data within an event often relate to one another –E.g., tracks matching to EM showers Simple object-oriented design has these data items containing pointers to one another –Unfortunately, this causes serious dependency issues Large compilation times Extremely long link times Broken code affects more systems Using an object relational model avoids these problems and allows new possibilities

C. Jones CHEP033 Object Oriented Approach Design –Related data are grouped into a class E.g., Track, EM Shower –Data values are stored in objects of the appropriate class –Links between objects are accomplished by embedding pointers into the objects Appeal –Easy for users to navigate the relationships between objects

C. Jones CHEP034 Object Oriented Approach Track EM Shower Track Hit Hit Hit Hit Hit Hit Hit Hit

C. Jones CHEP035 Problems With OOA: Interface Adding new relationships means changing the classes –Must recompile all code that uses those classes Published objects must be mutable –Need to be able to change object to set relation to other object How to handle links in the case where multiple algorithms produce the same data? –E.g., tracks from different track-finders to same EM showers Where to put the data that describes the relationship? How do two people refer to the same object if each has made a sub-selection of a list? –Use the index in the original list?

C. Jones CHEP036 Problem with OOA: Compile & Link In highly coupled systems, if one piece of code is broken the whole system can break –E.g., if tracking is broken may not be able to do EM shower work To avoid excess compilation dependency you must only forward declare data in header files To avoid excess linking dependencies, associated objects can not internally access member functions of each other –E.g., can not have function that calculates energy of EM shower divided by momentum of track –Can relax this requirement if you organize your code so that the associated routines are in a separate object file Reference counting smart pointers cause strong compile- and link-time dependencies

C. Jones CHEP037 Problems with OOA: Storage Direct references in objects complicates storage –Need to convert pointers to/from persistent values –If using bidirectional links must construct both objects before linking them –Often causes developer to couple objects directly to storage system Reading/writing causes compile/link/runtime dependencies –Occurs even if object only holds pointers to other objects Can avoid dependencies by reading back unlinked objects –User must specify when to make link –Burdens user with responsibility to be sure the link is made before she tries to use it

C. Jones CHEP038 Event as Object Relational Database No objects have pointers to objects outside ‘atomic’ storage boundaries –E.g., MC Particles can hold pointers to their children if store all MC Particles together Objects in lists have unique identifier –Physicists use the identifier when talking with other physicists –In our system, use our own templated Table class to hold lists of objects which sort the objects via their identifier method –In our system, lists are identified via unique keys based on type of object in the list and two character strings Relationships are defined via separate object: Lattice

C. Jones CHEP039 Lattice Links relationship data to the identifiers of two different objects (denoted by Left and Right) Supports 16 different configurations –1 or many Lefts per Link –1 or many Rights per Link –1 or many Links per Left –1 or many Links per Right Left 1 Left 2 Link A Link B Right 1 Right 2

C. Jones CHEP0310 Object Relational Approach Track:1 EM Shower:1 Track:2 Hit:1 Hit:2 Hit:3 Hit:4 Hit:5 Hit:6 Hit:7 Hit:8 EM Shower:2 EM Shower:3 1:data:1 2:data:1 4:data:1 7:data:1 3:data:2 5:data:2 6:data:2 8:data:2 1:data:1,2 2:data:2

C. Jones CHEP0311 Improving Usability Easier to use objects that directly link to related objects Created ‘Navigation’ objects that give direct access to related objects –Internally look up relationship in appropriate Lattice –Related objects obtained using regular data access mechanism I.e., Navigation objects just do what users would have to do NOTE: To avoid interdependencies in crucial software, only analysis code is allowed to use Navigation objects –Taken special care so only if accessing an object via Navigation do you become compile/link-time dependent on it E.g., if you do not use EM showers then you do not need to link them Only one library is allowed interdependencies –Makes maintenance easier

C. Jones CHEP0312 Advantages Shortens link times –Usually less than 30 seconds on a moderate machine We use dynamic loading so only have to link to libraries your module directly needs Simplifies storage code –Easier to support many specialized storage formats Speed up data read-back –Only have to retrieve data user actually uses E.g., can ask if a Track is matched to a EM Shower without having to construct the EM Showers Can use multiple data sources on read-back –E.g., build event by combining physicist’s data skim and experiment’s event database

C. Jones CHEP0313 Conclusion Compile/Link/Run-time dependencies make code less robust Avoid unnecessary dependencies by encapsulating relationships in a separate object Provide directly linked objects only to analysis users Users productivity and satisfaction will increase –Shorter compile times –Shorter run times