• No results found

Realization of Inventory Databases and Object-Relational Mapping for the Common Information Model

N/A
N/A
Protected

Academic year: 2021

Share "Realization of Inventory Databases and Object-Relational Mapping for the Common Information Model"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)Introduction CIM+ORM and inventory gathering Conclusion and outlook. Realization of Inventory Databases and Object-Relational Mapping for the Common Information Model Øystein S. Haaland Department of Physics and Technology, University of Bergen.. November 8, 2011 Systems and Virtualization Management: Standards and the Cloud Øystein S. Haaland. CIM, ORM and Inventory databases..

(2) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Outline Introduction Background High Level Trigger 2 CIM+ORM and inventory gathering Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation 3 Conclusion and outlook 1. Øystein S. Haaland. CIM, ORM and Inventory databases..

(3) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Background High Level Trigger. Introduction. Øystein S. Haaland. CIM, ORM and Inventory databases..

(4) ALICE detector system. Figure: Illustration of the ALICE detector system from the ALICE web pages..

(5) LHC/CERN. Figure: Illustration of LHC from CERN document server..

(6) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Background High Level Trigger. High Level Trigger. What is triggering? Tell data acquisition systems when something interesting happens so that it can be read-out. Done in several levels: lower levels in front-end electronics, while high level or event filtering typically is done in software on high-performance compute clusters.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(7) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Background High Level Trigger. Motivation ALICE can produce as much as ~25 GB/s, but bandwidth to storage is limited to ~1.25 GB/s. Much of the data is not new physics and it can therefore be discarded. How is it done? Selection of interesting events: Event filtering or triggering. Selection of interesting parts of events: Region of Interest. Compression of events: Reconstruction and lossless compression.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(8) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Background High Level Trigger. ALICE HLT cluster Online system Online system, not a batch farm. Cannot rerun when something goes wrong. Any faults have direct impact on the physics results. Process placement Hierarchical and distributed processing. Process placement important aspect. Challenge Must have reliable and stable operation. But using commodity hardware + complex software configuration => have to build in resilience for failure. Øystein S. Haaland. CIM, ORM and Inventory databases..

(9) Cluster. Figure: Picture of cluster..

(10) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Usefulness of Inventory Databases Inventory database To know which part to order when something breaks. To keep track of systems when reorganizing. To have relevant and up to date information available when debugging. Former solution Typical LAMP stack with a manually maintained database. Too much work to keep information up-to-date with the available man-power.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(11) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Advantages of automatic updating Automatic process placement of the distributed physics application. Implementing fault-tolerance with fail-over procedures. Increased consistency in inventory data. No room for human mistakes. Reduced cost as the cluster administrator is relieved from a tedious and laborious task. System management and monitoring.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(12) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Requirements Functional Provide up to date information about the state of the cluster for the physics applicaton. System management and monitoring applications need inventory information. Non-functional Support the programming languages that are in use in HLT: Python, Java, C++. Scalability. HLT was designed for a maximum of around 1000 nodes. Currently around 200. Reliability. Need to ensure availablility of inventory information through use of redundancy or clustering. Øystein S. Haaland. CIM, ORM and Inventory databases..

(13) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Choosing an approach Options Use existing CIM implementations (sblim, openpegasus, OpenWBEM). Use own model with ORM. Use CIM model with own implementatino in ORM. Needed support for multiple programming languages. Wanted tight integration with existing software. Needed only information gathering, not complete instrumentation. RDBS in the back-end would make it easier to implement high-availability and scalability. Øystein S. Haaland. CIM, ORM and Inventory databases..

(14) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Object-relational mapping Object-relational mapping is a programming technique for persisting data from object-oriented programming languages to relational databases. Software packages that implements this conversion in a generic way, so that it can be used for any object hierarchy, are called object relational mappers. Examples Hibernate for Java was one of the first of such mappers and is maybe also the most well-known. Sqlalchemy for python is an ORM, that includes a declarative way of defining objects, further simplifying the process of mapping objects to databases. Øystein S. Haaland. CIM, ORM and Inventory databases..

(15) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Advantages of ORM. Relational Database Systems: transactionality and enhanced data integrity. Object-Oriented programming: Reuse and Modularity.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(16) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Model hierarchies and level of mapping. Two options: Mapping at the level of CIM meta schema: flexible, but no intuitive mapping between CIM classes and programming language classes. Lack of constraints. Mapping at the level of CIM schema: less flexible, but more natural mapping between CIM classes and OOP classes. Decision: map at level of CIM schema, counter less flexibility by automatic generation. Makes it as flexible as mapping at meta level.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(17) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Applying ORM to an existing model. The typical mappings one have to consider when applying an ORM to a model, are: Model to relational database schema. Model to class definitions in target programming language. The actual ORM mapping between the relational database schema and the class definitions in the programming language.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(18) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Mapping details Tree aspects to consider for ORM: Mapping of structure. Classes and properties: Normally a straight-forward mapping from CIM model. Datatypes: relatively easy to find corresponding data types in both programming languages and relational databases. Inheritance: This is where it gets harder. Has to decide for common type of mapping.. Mapping of constraints. Qualifiers: for instance maximum values for integers or lenght of strings.. Mapping of behavior. Methods: This we do not consider as it is not needed in our environment. Øystein S. Haaland. CIM, ORM and Inventory databases..

(19) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Major tasks. The effort of designing the inventory solution can be divided in two major tasks: 1. Creating a programming language representation of a CIM model instance as well as the corresponding object-relational mapping.. 2. Automatically keeping the data in the CIM model instance up to date.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(20) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Two implementations. Two implementations have been developed: For supporting more than one programming language: python and java. To be able in the future to test interoperability between solutions.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(21) Mapper generation tools 1/2. C:21,/0".$. 2<E ,/0".$12$($3"."(% 4''# 3"("5$%" :(+%$(/"12$($3"5 ;6$7$18D:>. 2<E1C'.9&#"5 3"("5$%" ,?@. A&*"5($%" :(+%$(/"+1 ;6$7$1<*="/%+>. C&.9;D-%0'(18D:>. ,?@ !"#$%&'($# )$%$*$+" ,-+%".. ,B#$#/0".:(+%$(/"+1 ;D-%0'(1<*="/%+>. 6$7$ 899#&/$%&'(. D-%0'( 899#&/$%&'(. Figure: Overview of the tools developed..

(22) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Mapper generation tools 2/2 Mapper generation tools For Python, the mapper generation tool is implemented as a simple back-end to the SBLIM MOF compiler that outputs ORM-enabled python code. For Java this is a flexible framework with a lot of functionality (Chainreaction). For more information, see the references of the paper. Inventory gathering systems The python inventory solution is a stand-alone inventory gathering system for compute clusters. The Java solution is a module that is integrated in SysMES, where the framework takes care of the client/server Øystein S. Haaland. CIM, ORM and Inventory databases..

(23) Inventory gathering system. !"#$%&. '()$"*+%,&-%.$, -%)*/-&-. '()$" !"#$%& '()$"*+%,&-%.$, -%)*/-&-. ,&(1$*5* 67)-&$. +%0$%&(12*3$10$1. '()$"*/4 ,&(1$*5* 67)-&$. Figure: The two inventory gathering systems..

(24) Data access 1/2  .   .     . 

(25) 

(26)  

(27).    

(28)  

(29).  

(30)

(31). (!

(32) %

(33)  

(34)  

(35)

(36) 

(37) '       "

(38)

(39) . $

(40)       #

(41)  

(42)   

(43)   "#%  &   '.  

(44)   

(45)        !

(46) 

(47) 

(48)  

(49) 

(50)

(51)   

(52)       

(53)  "   "#. Figure: Four ways to use the CIM. Figure taken from “Common Information Model (CIM) Infrastructure” - DSP0004..

(54) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Data access 2/2. Exchange of inventory information at both SQL- and ORM-level. Provide XML-RPC (or similar) bindings created by introspection of the generated CIM instance to extend compatibility to languages without ORM. The client/server transport of the inventory gathering solution is a forth option for data access. The ways of access inventory information is summarized in the table in the next slide:. Øystein S. Haaland. CIM, ORM and Inventory databases..

(55) Summary of access methods Table: Comparison of the different access methods to the inventory data.. Access method ORM. Inventory Gathering System XML-RPC SQL. Web service. Data operations CRUD and complex queries CRUD. CRUD CRUD and complex queries CRUD. Interoperability OO-like client side Limited to Yes languages with ORM solutions Depends on hwdiscover: implementaYes tion SySMES: No All common No languages All common No languages All common languages. No.

(56) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Scalability and reliability. Typically with ORMs, one can choose which RDBS should be used for persisting objects. This means that high-availability and scalability can be achieved by careful selection and configuration of database solution, mostly independently of the rest of the system.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(57) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Applications of Inventory databases Object-relational mapping of the CIM The CIM to ORM mapping Design and solution Implementation. Python implementation Two differences Used together with the PerspectiveBroker of the twisted framework, to implement a “Remote Persistent Object”. Uses declarative module of sqlalchemy -> only needs to provide the class definitions and the declarative mapper does the rest. Future Make use of inotify for updating information. Extend the inventory gathering system with resource management capabilities. Øystein S. Haaland. CIM, ORM and Inventory databases..

(58) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Conclusion Normal relational databases can be used for storing an instance of the CIM model. Transactionality is handled by the database/ORM layer, don’t need to think about this in code. Makes it easier to code concurrent, distributed applications (with a central data storage).. Can use features already present in relational database products. Most important for us: High-reliability: i.e. can choose database with clustering support Scalability: can go from convenient unittesting in sqlite to mysq/postgresql/oracle for deployment.. Native and intuitive language bindings due to automatic creation of ORM-enabled code. Øystein S. Haaland. CIM, ORM and Inventory databases..

(59) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Results Only the functionality of the python implementation has been tested on the production cluster. Works as expected. Information is gathered and the databasse is filled. No performance or interoperability tests have been done so far on the production cluster.. Limited performance testing has been done on smaller setups. sqlite in memory is twice as fast as on disk.. The java implementation has been tested in a test cluster in Heidelberg.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(60) Introduction CIM+ORM and inventory gathering Conclusion and outlook. Outlook The tasks for the near future will be extend the infrastructure that can be used to collaboratively work on increasing the interoperability of the CIM+ORM frameworks through unification of the mapping and its configuration. Facilities that can be used to automate conformance testing, interoperability testing, unisttesting, package building and more. If the goal of supporting many programming languages working on the same database at the same time (given generators are provided) is reached, it will dramatically improve the interoperability on the data persistence layer.. Øystein S. Haaland. CIM, ORM and Inventory databases..

(61)

References

Related documents

A control transfer is meant to retrieve and send information regarding device configuration and device status in class-specific and vendor-specific devices and is

Hence, an attempt was made to enhance its solubility by formulating solid dispersions using different techniques viz., Melting, Kneading, Co-precipitation, Solvent evaporation

Pain has been controlled for at least 1 hour after last dose of PO opioid medication Patient and family comfortable with discharge and feel pain can be controlled with PO

Hacking a Bird in the Sky: Exploiting Satellite Trust Relationship Hack In The Box Security Conference 2008 Artificial Satellite ‣

Abstract This article presents the analysis of the tem- poral changes in water chemistry in a semi-confined aquifer (Wielkopolska Buried Valley aquifer, Poland) during one decade

The following averages over all experiments are shown: the time (in minutes) and the average number of discovered subgroups, the number of conditions per subgroup description

sical molecular dynamics simulations of the structure of yttrium doped phosphate-based glasses and reported that yttrium oxide acted as a network modifier due to depoly- merisation

The Human Fertilisation and Embryology Authority commissioned Dr Sally Adams and Dr Jane Carthey to carry out a study comparing the relative risks of manual double