Calibration and alignment database development Dmitry Romanov December 15, 2010.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizards Guide to PHP by David Lash.
Advertisements

PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
WordPress from Start to Finish Day 1: Installing and Using WordPress Looking at the WordPress database.
User Authentication with DB Cs346 Fall Requirements Web site is for registered users only – Username and password – Password is encripted.
PHP and MySQL Database. Connecting to MySQL Note: you need to make sure that you have MySQL software properly installed on your computer before you attempt.
December, 2008 CS-591 Securing Servers: International Capture the Flag 1 Nadine Sundquist CS591-F2008 University of Colorado, Colorado Springs Dr. C. Edward.
Query Manager. QM is a collection of tools you can use to obtain information from the AS/400 database Used to –select, arrange, and analyze information.
VCT May 20, 2009 Sapna Blesson Advisor: Dr.Christopher Pollett.
Website Development & Management PHP Odds & Ends Instructor: John Seydel, Ph.D. CIT Fall
LHCbPR V2 Sasha Mazurov, Amine Ben Hammou, Ben Couturier 5th LHCb Computing Workshop
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
PHP Scripts HTML Forms Two-tier Software Architecture PHP Tools.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Star (Traditional) Database Tasks & MySQL 1. Database Types & Operation Issues 2. Server & Database deployments 3. Tools with MySQL 4. Data definition.
1 Working with MS SQL Server II. 2 The sqlcmd Utility Command line utility for MS SQL Server databases. Previous version called osql Available on classroom.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
MySQL Dr. Hsiang-Fu Yu National Taipei University of Education
CSCI 6962: Server-side Design and Programming
The ATLAS Production System. The Architecture ATLAS Production Database Eowyn Lexor Lexor-CondorG Oracle SQL queries Dulcinea NorduGrid Panda OSGLCG The.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
JDBC Java Database Connectivity. What is an RDBMS? Relational database management system. There are other kinds of DBMS. Access is a GUI on a JET RBDMS.
INTERNET APPLICATION DEVELOPMENT For More visit:
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
EXtensible Neuroimaging Archive Toolkit (XNAT) Washington University Neuroinformatics Group.
Concepts of Database Management Seventh Edition
Python MySQL Database Access
M1G Introduction to Database Development 6. Building Applications.
Dbwebsites 2.1 Making Database backed Websites Session 2 The SQL… Where do we put the data?
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
Chapter 4 Introduction to MySQL. MySQL “the world’s most popular open-source database application” “commonly used with PHP”
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
SYST Web Technologies SYST Web Technologies Databases & MySQL.
Website Development with PHP and MySQL Saving Data.
Concepts of Database Management Seventh Edition
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
IST 210 Introduction to UNIX (AIX) Todd Bacastow IST 210: Organization of Data.
Damian Tamayo Tutorial DTM Data Generator Fall 2008 CIS 764.
JANA and Raw Data David Lawrence, JLab Oct. 5, 2012.
Calibration API in JANA David Lawrence, Jlab July 17, 2007.
V.Sirotenko, July Status of Online Databases Currently there are 2 online Oracle Databases running on d0online cluster: 1.Production DB, d0onprd,
GOAL User Interactive Web Interface Update Pages by Club Officers Two Level of Authentication.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
EGEE User Forum Data Management session Development of gLite Web Service Based Security Components for the ATLAS Metadata Interface Thomas Doherty GridPP.
CD Collection Hector Urtubia Fall Summary Motivation and Objective Technologies Used Project Design Database Design and Integration Demo.
What is MySQL? MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, Many.
Class 3Intro to Databases Class 4 Simple Example of a Database We’re going to build a simple example of a database, which will allow us to register users.
Azure databases 1. Azure storage possibilities Azure offers several storage possibilities Microsoft SQL Server database MySQL database Azure Document.
Distributed Logging Facility Castor External Operation Workshop, CERN, November 14th 2006 Dennis Waldron CERN / IT.
Display Page (HTML/CSS)
​ TdBench 7.2 – tdb.sh Utility Script. 2 Created for TdBench 7.x release to consolidate tools Open architecture – looks for scripts in the./tools directory.
Modern web tools and midas Ben Smith TRIUMF Midas workshop – July 2015 Ben Smith - Modern web tools and Midas 1 15/07/15.
Radoslav Georgiev Telerik Corporation
ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: Week 8 – Review Reference:
MESA A Simple Microarray Data Management Server. General MESA is a prototype web-based database solution for the massive amounts of initial data generated.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
Introduction to Database Programming with Python Gary Stewart
2nd year Computer Science & Engineer
Database Replication and Monitoring
CS320 Web and Internet Programming SQL and MySQL
OUTLINE Basic ideas of traditional retrieval systems
Calibration database Dmitry Romanov October 6, 2011.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Lecture 2 - SQL Injection
CS3220 Web and Internet Programming SQL and MySQL
Chapter 4 Introduction to MySQL.
MySQL Database System Installation Overview SQL summary
CS3220 Web and Internet Programming SQL and MySQL
Storing and Processing Sensor Networks Data in Public Clouds
MySQL Database System Installation Overview SQL summary
Presentation transcript:

Calibration and alignment database development Dmitry Romanov December 15, 2010

Constants Type Table name directory N_rows N_columns Database layout structure FDC/CathodeStrips/pedestals Directories id parentId name Columns - name - type many - 1 Event range min max run Run range min max Variation name Assignment timestamp run_range variation Constants DATA BLOB

User enters: /simple/constants User gets: 1.1 ; 1.2 ; 1.3; User enters: /simple/constants variation: jhon User gets: 3 ; 4 ; 5; Deep into variations Time line XYZ Variation: “john” 01/01/ /03/ /12/ /11/ /15/ /01/2011 /simple/constants User enters: /simple/constants variation: john User gets: 3.5 ; 4.5 ; 5.5;  Variations provide branching  Users can create variations to work with their versions of constants  Main branch is called “default” variation … User enters: /simple/constants User gets: 1.11 ; 1.22 ; 1.33; User enters: /simple/constants User gets: 3.5 ; 4.5 ; 5.5;

MySQLdatabase layout

Database internals  bool  int  long  double  string  1001 – 1500 is ok.  1001 – INFINITE_RUN : all runs from 1001  0 – INFINITE_RUN : all runs INFINITE_RUN = Maximum 32-bit unsigned integer Run ranges:Data types: Named run ranges: Run range runs: name:“” Run range runs: name:“” Run range runs: name:“marki” Run range runs: name:“marki” Run Ranges with same runs, but different names are different run ranges. ≠ | |45|15|This is user string|0.5602e-4|… What If user’s string “have | in it” ? USER  Encode(“have | in it”)  “have &pipe; in it”  DB DB  Decode(“have &pipe; in it” )  “have | in it”  USER Data blob

Overall design JANA Users Python Users Python API (C++ wrap) WEB Console Tools PHP Calib. DB API C++ Calib. DB API C++ MySQL ProviderFile DB Provider Local DB FileMy SQL Server Interfaces C++ Users SWIGJQuery

C++ and JANA interface Two main parts: 1) JCalibrationGenerator A generator class (e.g. JCalibrationGeneratorMySQL) 2) Jcalibration class implementing the backend itself.  Retrieve calibration constants from CCDB (GetCalib())  Discovery of available constants (GetListOfNamepaths()) etc. Jcallibration * calib = jApp->GetCalib() vector constants; calib->GetCalib(constants, “/simple/constants”); calib->GetCalib(constants, “/simple/constants”, /*variation */ “john”); calib->GetCalib(constants, “/simple/constants”, /*variation */ “john”, /*time*/ time);

Performance budget Stick to 1 second to load calibration constants  Data queries + network – 0.23 – 0.45 sec  Blob parsing – <0.13 sec  Framework overhead ~ 4%  Pre queries – small  Mutithread concurency - ? Conclusion: possible to keep in 1 second records with data blobs; 52 double values (8 digits) for each blob. Queried randomly with 1100 queries. Core 2 Duo 1800 GHz, 2 Gb – 0.23 sec Core 2800 GHz, 8 Gb – 0.04 sec

Console tools  Aim: simplicity + better learning curve  If it have directories and names like POSIX file system, let looks like POSIX file system. ls, rm, mkdir, mv, … etc. commands  Interactive mode  Command line mode ccdb dump /adc/adcpedestals --run variation mc > /home/user/pedestals.txt >> ls adc/ dca/ >> cd adc adc> > ls../ adc _pedestals adc_scales adc>> ls -a adc _pedestals : 3 variations, 5 versions … adc_scales: 4 variations, 11 versions … adc>>dump adc _pedestals --run variation mc > /home/user/pedestals.txt

Implementation DConsoleContext MySQL Provider Streams Commad parser Utils by command  Interactive mode /> ls --all_tree ls.py - ListObjects help.py - Help pwd.py - PrintWorkDir mkdir.py - MakeDirectory  Command line mode ccdb ls --all_tree... --all_tree DConsoleContext – singleton model All utils are derived from DConsoleUtilBase Each utility has instance that calls RegisterConsoleUtil() Each utility have to implement GetHelp() …. functions Thus we get very flexable plugin like system CoreUtils as plugins

Privileges  We have several modes Read mode Update mode “Default” variation update mode  Read mode doesn’t require any passwords  Update mode require password, and user name.  Obtaining a username and password is simple. Like online reistration.  How to store “update” password???

Web interface  Live demo Web page PHP C++ Cgi HTTP Context JQuery Calib. DB API C++ Calib. DB API C++ My SQL Server $("#black").treeview({url: “cgi-bin/ccdb.cgi?op=ajaxdirs “})  How compex is it? USER

Current progress  File specification is done  File upload to DB in progress  “field” c++ api in progress  Core c++ API done  User c++ API mostly done  Python wrapping – mostly done  Console utils – first working prototype is done  Web interface – protorype is done