FroNtier Overview and POOL Interface Prototype

Slides:



Advertisements
Similar presentations
Building Portals to access Grid Middleware National Technical University of Athens Konstantinos Dolkas, On behalf of Andreas Menychtas.
Advertisements

Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Software Frameworks for Acquisition and Control European PhD – 2009 Horácio Fernandes.
F Fermilab Database Experience in Run II Fermilab Run II Database Requirements Online databases are maintained at each experiment and are critical for.
Platform as a Service (PaaS)
Struts 2.0 an Overview ( )
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
Object Oriented Databases by Adam Stevenson. Object Databases Became commercially popular in mid 1990’s Became commercially popular in mid 1990’s You.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
Raffaele Di Fazio Connecting to the Clouds Cloud Brokers and OCCI.
FroNtier: High Performance Database Access Using Standard Web Components in a Scalable Multi-tier Architecture Marc Paterno Fermilab CHEP 2004 Sept. 27-Oct.
Introduction to dCache Zhenping (Jane) Liu ATLAS Computing Facility, Physics Department Brookhaven National Lab 09/12 – 09/13, 2005 USATLAS Tier-1 & Tier-2.
New perfSonar Dashboard Andy Lake, Tom Wlodek. What is the dashboard? I assume that everybody is familiar with the “old dashboard”:
ICS 321 Fall 2010 SQL in a Server Environment (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 11/1/20101Lipyeow.
INNOV-10 Progress® Event Engine™ Technical Overview Prashant Thumma Principal Software Engineer.
XML and Database.
Database Server Concepts and Possibilities Lee Lueking D0 Data Browser Workshop April 8, 2002.
3D Testing and Monitoring Lee Lueking LCG 3D Meeting Sept. 15, 2005.
Distributed Logging Facility Castor External Operation Workshop, CERN, November 14th 2006 Dennis Waldron CERN / IT.
DGC Paris Spitfire A Relational DB Service for the Grid Leanne Guy Peter Z. Kunszt Gavin McCance William Bell European DataGrid Data Management.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Status of tests in the LCG 3D database testbed Eva Dafonte Pérez LCG Database Deployment and Persistency Workshop.
1 Configuration Database David Forrest University of Glasgow RAL :: 31 May 2009.
Sesame A generic architecture for storing and querying RDF and RDFs Written by Jeen Broekstra, Arjohn Kampman Summarized by Gihyun Gong.
Event Management. EMU Graham Heyes April Overview Background Requirements Solution Status.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED INTERSTAGE BPM ARCHITECTURE BPMS.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Fermilab Scientific Computing Division Fermi National Accelerator Laboratory, Batavia, Illinois, USA. Off-the-Shelf Hardware and Software DAQ Performance.
Access to HEP conditions data using FroNtier: A web-based database delivery system Lee Lueking Fermilab International Symposium on Grid Computing 2005.
SDN controllers App Network elements has two components: OpenFlow client, forwarding hardware with flow tables. The SDN controller must implement the network.
SQL Database Management
The Holmes Platform and Applications
Java Web Services Orca Knowledge Center – Web Service key concepts.
Outline Introduction and motivation, The architecture of Tycho,
Platform as a Service (PaaS)
Databases and DBMSs Todd S. Bacastow January 2005.
DEPTT. OF COMP. SC & APPLICATIONS
Managing State Chapter 13.
DCS Status and Amanda News
Platform as a Service (PaaS)
Essentials of UrbanCode Deploy v6.1 QQ147
Platform as a Service (PaaS)
Database Replication and Monitoring
ODBC, OCCI and JDBC overview
Netscape Application Server
(on behalf of the POOL team)
Lee Lueking WLCG Workshop DB BoF 22 Jan. 2007
CMS High Level Trigger Configuration Management
LOCO Extract – Transform - Load
GWE Core Grid Wizard Enterprise (
Open Source distributed document DB for an enterprise
An Overview of the Pixel and HCAL Databases
POOL persistency framework for LHC
Dirk Düllmann CERN Openlab storage workshop 17th March 2003
CHAPTER 3 Architectures for Distributed Systems
Conditions Data access using FroNTier Squid cache Server
Introduction to J2EE Architecture
Introduction of Week 3 Assignment Discussion
Design and Maintenance of Web Applications in J2EE
Northbound API Dan Shmidt | January 2017
Data, Databases, and DBMSs
Building a Database on S3
Lecture 1: Multi-tier Architecture Overview
Lecture Topics: 11/1 General Operating System Concepts Processes
Units with – James tedder
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Enterprise Java Beans.
Status and plans for bookkeeping system and production tools
Presentation transcript:

FroNtier Overview and POOL Interface Prototype Lee Lueking Fermilab LCG3D Workshop December 14, 2004

Credits Fermilab, Batavia, Illinois Sergey Kosyakov, Jim Kowalkowski, Dmitri Litvintsev, Lee Lueking, Marc Paterno, Stephen White Johns Hopkins University, Baltimore, Maryland Barry Blumenfeld, Petar Maksimovic December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab Outline Overview Use in CDF CMS Prototype Frontier & POOL December 13, 2004 FroNtier Project at Fermilab

Why a multi-tier approach? Decouples client API from Database schema simplifying development and long-term maintenance Ideal for write once, read many data Reliability and high performance w/o expensive DB servers Readily scalable to serve thousands of clients Easily deployed w/ low administrative overheads December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab FroNtier Overview C++ Header and Stubs Client FroNtier Client API Library HTTP Caching Squid Proxy/Caching Server HTTP CDF Persistent Object Templates (Java) XML Server Descriptors FroNtier Server FroNtier Servlet running under Tomcat JDBC This shows the same structure as the previous slide, along with the implementation explanation on the left. In white: CDF pieces, from previous solution In yellow: FroNtier components Database (or other persistency service) DDL for Table Descriptions Database FroNtier components in yellow December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab The FroNtier Servlet Client Client sends request (URI) Command Parser translates URI into commands + values Servicer Factory gets XSD (XML Server Descriptor) from database and Instantiates a Servicer Servicer queries database and Results sent for encoding Encoder marshals (serializes) the data to requesting client 7 1 Encoder Command Parser 6 2 Servicer 4 Servicer Factory STRESS that the descriptor is retrieved from “outside” not sent by the client. Descriptor in the database is a convenience. Stress the flexibility given by the descriptor: database table can be changed without changing code. -- no client code changes (which was a requirement) -- not even servelet code changes! 5 3 Calibration Database XSD Database December 13, 2004 FroNtier Project at Fermilab

FroNtier XML Server Descriptor (XSD) <descriptor type="CalibRunLists“ version="1" xsdversion="1"> <attribute position="1"   type="int" field="calib_run" /> <attribute position="2"   type="int"     field="calib_version" /> <attribute position="3"   type="string" field="data_status" /> <select> calib_run, calib_version, data_status </select> <from> CalibRunLists </from> <where> <clause> cid = @param </clause>   <param position="1" type="int" key="cid"/> </where> <final> </final> </descriptor> Object name and version information Response description The SQL mapping to the database Select statement From statement Where clause Special modifiers (order by, etc) December 13, 2004 FroNtier Project at Fermilab

FroNtier client API features Compatible with C and C++ Portable 32 and 64 bit systems tested Transparent object access Type conversion detection Preserves data integrity Multi-object requests Easy runtime configuration Extensive error reporting Adjustable log levels User application FroNtier API “Transparent object access”: user doesn’t have to know about transport, etc. He only knows about the object he deals with. FroNtier Service December 13, 2004 FroNtier Project at Fermilab

CDF FroNtier Testing at FNAL/SDSC (San Diego Super Computing Center) Access times for direct Oracle and Frontier SDCS CAF SiChipPed SvxBeamPosition Oracle Oracle SDSC Squid Frontier Frontier FNAL Launchpad 1e-03 1e+01 1e-03 1.0 Access time (s) Access time (s) SiChipPed objects are usually about 0.5 MB, up to 1.7 MB in size. SvxBeamPosition objects are 502 Bytes The real savings are in the reduced DB access. CDF Oracle @FNAL December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab CDF Launchpad at FNAL Four former general processing nodes CPU: dual 2.4 GHz Memory: 2MB Disk 100 GB NIC: GBit Ethernet Main entry squid uses tomcats in round robin fashion December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab CDF FroNtier Status Client library is included in CDF production code. Production executables built and tested with FroNtier. Widespread use will begin as new releases are built. Squid deployment at CDF processing centers in San Diego (SDSC), Bologna (CNAF), Karlsruhe (GridKa) Working to extend the use in CDF beyond calibration data to trigger and other static data needed offline. Launchpad activity for last week FroNtier would be a “storage layer” for POOL? Max HTTP reqs  88.0 req/min Average HTTP reqs  4.0 req/min Current HTTP reqs  0.0 req/min Max HTTP fetches  7.0 req/min Average HTTP fetches  0.0 req/min Current HTTP fetches  0.0 req/min December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab CDF Testimonial Hello Petar, Finally I had more time to make some tests with the frontier server. I am the one who installed it at GridKA. The status after one month is the following. Besides me, another user used it the whole time and it did not give any trouble. Especially if you developing some code it helps a lot, since for a short test that runs only over a few hundred events the database access is quite a big factor. For example my executable was processing 100 events and it took with the oracle database more then 5 minutes. Most of the time waiting for the database. After switching to frontier it took less then 3 minutes. If it is important I can make some more detailed measurements with more statistics, but so far nearly 50% time saving is really great. Since you are working on the physics validation, perhaps you are interested in some tests I did. I used a little job (J/Psi to ee)and compared the results for the oracle and frontier database access. I tried MC and real data and for both I got always the same result between oracle and frontier. I also tried the frontier version 1.2.0 and there were no differences. I also have a short question, which is the best mailing list, to get all the information, updates and questions related to frontier. Since I would like to keep it running and here in Karlsruhe more and more people will be using it in the near future, after all the successful tests. Cheers, Michael December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab CMS FroNtier CMS is interested in using FroNtier approach for offline and possibly some online DB access. Developed a working prototype to provide an interface for ORCA (CMS reconstruction) to HCAL 2004 testbeam conditions database. A prototype of a FroNtier “plug-in” for POOL is also working. FroNtier would be a “storage layer” for POOL? December 13, 2004 FroNtier Project at Fermilab

HCAL TB2004 DB – ORCA Prototype Conditions data for the 2004 HCAL testbeam run were loaded in to a simple schema designed for calibration data; pedestals, gains, and their errors using run ranges as IOV. An interface was prepared called FrontierCalib which provides the CalibObject within ORCA. Uses the same interface as Conditions DB for reading. Test example on next page. December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab int main(int argc, char **argv) { try std::string tag="TAG"; long long runnumber=11800; std::vector<int> eta; FrontierCondObject* fc1=new FrontierCondObject(FrontierCondObject::GAINS,tag,runnumber); fc1->getIntData("EtaIndex",eta); std::cout<<"ETA="<<eta[0]<<std::endl; delete fc1; runnumber=11040; FrontierCondObject* fc2=new FrontierCondObject(FrontierCondObject::PEDESTALS,tag,runnumber); fc2->getIntData("EtaIndex",eta); delete fc2; } catch(std::exception &e) std::cout<<"Error: "<<e.what()<<std::endl; exit(1); exit(0); Example of reading Calibration DB Data into ORCA-test program December 13, 2004 FroNtier Project at Fermilab

Frontier & POOL (Simplified) Sergey Kosyakov User Application User Application Request Object Creator De-Serializer Response parser/validator HTTP Protocol Adapter C++ Client API IP Network Squid Cache Request Response Parser Creator Command Object Analyzer Serializer ClassLoader XSD Data Reader Reader Tomcat Java AS December 13, 2004 FroNtier Project at Fermilab Frontier XSD Repository JDBC-able Database

Goal: access CMS calibration data using POOL via Frontier Create set of classes representing CMS calibration data (5 classes so far for HCAL Testbeam ). Create Frontier XSD for each calibration class. Generate SEAL reflection dictionaries for these classes. Create plugin for POOL to request data from Frontier and map it into objects of calibration classes – the major challenge. December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab FrontierStorageSvc December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab FrontierStorageSvc Using Db*Imp This approach would provide seamless integration with POOL Problems: The framework expects special information in three containers: ##Shapes, ##Links, ##Params. The info is a set of strings which is generated when an object is written into storage. The framework expects the object to be serialized in predefined way and stored as a single column. Using IDb* interfaces Reimplementation of FrontierStorageSvc using IDb* interfaces from StorageSvc sub-project: IOODatabase, IDbDatabase, IDbContainer, etc. IDb* interfaces are bound to the same Db*Imp framework from StorageSvc. For exmaple, IDbCursor uses DbContainer, which call for ##Shapes, ##Links and ##Params containers. So this approach did not fix the problem. Making these containers is not straightforward and does not look like a good solution (compatibility problem, for example). Does not solve “single column” problem. December 13, 2004 FroNtier Project at Fermilab

FrontierPersistencySvc December 13, 2004 FroNtier Project at Fermilab

FrontierPersistencySvc IPersistencySvc can be used to control the DataSvc context FrontierPersistencySvc is an implementation of IpersistencySvc. It actually implements only readObject(Token &token, DataHandler handler). All other requests are forwarded to default PersistencySvc implementation (which is obtained using the factory). A sample application which reads ROOT stored object from ROOT collection and then reads GainErrorAllByTagTimei from Frontier works. The collection interface does not work in this case, but collections don’t really make sense for Frontier. Hidden obstacles? E.g. readObject() may be expected to change the state of other modules. December 13, 2004 FroNtier Project at Fermilab

POOL via Frontier – general object selection problem POOL uses Tokens to identify objects. A token consists of ClassID (GUID), database name, container name, technology ID (e.g. ROOT_Key or Frontier), type ID and object ID. The last is unique object identifier and is a pair<long,long>. Frontier requests objects by server name, object name, object version, and 0 or more pairs key_name:key_value. The same object could be potentially requested in multiple ways. POOL's Token does not provide the ability for multiple key_name:key_value parameters. One of the approaches – use the container name as an encoded request string. December 13, 2004 FroNtier Project at Fermilab

POOL via Frontier – serializer problem Frontier has it own platform-independent and network safe binary objects serializer and de-serializer POOL expects objects to be serialized in a particular way (Shape). Re-shaping Frontier objects for POOL would be inefficient, and hard to implement (because of ##Shapes, ##Links and ##Params containers the StorageSvc expects). December 13, 2004 FroNtier Project at Fermilab

CMS Calibration Class Example class GainErrorAllByTagTimeiStruct { public: int eta; double phi; int depth; double value; double sigma; virtual ~GainErrorAllByTagTimeiStruct(){} }; class GainErrorAllByTagTimei std::vector<GainErrorAllByTagTimeiStruct> data; static const char *getGUID(){return "4AF7DAD1-E51E-D911-829B-000D616B4939";} void append(void *ptr) data.insert(data.end(),(GainErrorAllByTagTimeiStruct*)s); } virtual ~GainErrorAllByTagTimei(){} December 13, 2004 FroNtier Project at Fermilab

Sample Application Snaplet pool::IFileCatalog *catalog; ... pool::FrontierPersistencySvc *ipsvc=new pool::FrontierPersistencySvc(*catalog); pool::IDataSvc *context=pool::DataSvcFactory::instance(ipsvc); seal::SharedLibrary::load(seal::SharedLibrary::libname("FrontierDict")); seal::SharedLibrary::load(seal::SharedLibrary::libname("SealSTLDict")); context->transaction().start(pool::ITransaction::READ); pool::Guid guid(GainErrorAllByTagTimei::getGUID()); // GainErrorAllByTagTimei pool::Token tok; tok.setTechnology(pool::FRONTIER_StorageType.type()); tok.setDb("http://edge.fnal.gov:8000/FrontierCMS"); tok.setCont("tag='TAG'&date_from='08/01/2004'&date_to='09/01/2004'"); tok.setClassID(guid); pool::Ref<GainErrorAllByTagTimei> ref(context,tok); std::cout<<"eta="<<ref->data[0].eta<<'\n'; std::cout<<"eta="<<ref->data[1].eta<<'\n'; std::cout<<"eta="<<ref->data[99].eta<<'\n'; December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab Summary FroNtier is a multi-tier architecture providing clients high throughput, low latency, scalable access to a persistent store, such as a database. The CDF DB access framework has been adapted to use the FroNtier approach. It is in Beta test and users are excited by the results. CMS is interested in using the Frontier approach, and has successfully used it to access conditions data for ORCA. A working example of a POOL-Frontier “plug-in” has been built, and demonstrated using the CMS HCAL testbeam database. December 13, 2004 FroNtier Project at Fermilab

FroNtier Project at Fermilab References FroNtier Talks and Papers: http://lynx.fnal.gov/ntier-wiki/Additional_20Documentation FroNtier working page: http://lynx.fnal.gov/ntier-wiki December 13, 2004 FroNtier Project at Fermilab