PostgreSQL Replicator – easy way to build a distributed Postgres database Irina Sourikova PHENIX collaboration.

Slides:



Advertisements
Similar presentations
The Replica Location Service In wide area computing systems, it is often desirable to create copies (replicas) of data objects. Replication can be used.
Advertisements

Data Management Expert Panel. RLS Globus-EDG Replica Location Service u Joint Design in the form of the Giggle architecture u Reference Implementation.
Database Architectures and the Web
SDN Controller Challenges
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
Master/Slave Architecture Pattern Source: Pattern-Oriented Software Architecture, Vol. 1, Buschmann, et al.
Online Educational Game of Snakes and Ladders -Shalini Pradhan -Manali Joshi -Uttara Paingankar -Seema Joshi.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
Peer-to-Peer Networks as a Distribution and Publishing Model Jorn De Boever (june 14, 2007)
“Turn you Smart phone into Business phone “
GRID DATA MANAGEMENT PILOT (GDMP) Asad Samar (Caltech) ACAT 2000, Fermilab October , 2000.
GGF Toronto Spitfire A Relational DB Service for the Grid Peter Z. Kunszt European DataGrid Data Management CERN Database Group.
Data Management for Physics Analysis in PHENIX (BNL, RHIC) Evaluation of Grid architecture components in PHENIX context Barbara Jacak, Roy Lacey, Saskia.
Other File Systems: AFS, Napster. 2 Recap NFS: –Server exposes one or more directories Client accesses them by mounting the directories –Stateless server.
DISTRIBUTED DATABASE. Centralized & Distributed Database  Single site database – centralized database –A database is located at a single site or distributed.
Chapter 9 : Distributed Database.
Overview Distributed vs. decentralized Why distributed databases
Online Magazine Bryan Ng. Goal of the Project Product Dynamic Content Easy Administration Development Layered Architecture Object Oriented Adaptive to.
Object Naming & Content based Object Search 2/3/2003.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos – A. Pavlo How to Scale a Database System.
PostgreSQL Enhancement PopSQL Daniel Basilio, Eril Berkok Julia Canella, Mark Fischer Misiu Godfrey, Andrew Heard.
Lecture The Client/Server Database Environment
The Client/Server Database Environment
GRID COMPUTING: REPLICATION CONCEPTS Presented By: Payal Patel.
How WebMD Maintains Operational Flexibility with NoSQL Rajeev Borborah, Sr. Director, Engineering Matt Wilson – Director, Production Engineering – Consumer.
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
Word Wide Cache Distributed Caching for the Distributed Enterprise.
Gary MacDougall Premjit Singh Managing your Distributed Data.
1 The Google File System Reporter: You-Wei Zhang.
Database Design – Lecture 16
ATLAS DQ2 Deletion Service D.A. Oleynik, A.S. Petrosyan, V. Garonne, S. Campana (on behalf of the ATLAS Collaboration)
Irina Sourikova Brookhaven National Laboratory for the PHENIX collaboration Migrating PHENIX databases from object to relational model.
Csi315csi315 Client/Server Models. Client/Server Environment LAN or WAN Server Data Berson, Fig 1.4, p.8 clients network.
Designing Authentication for a Microsoft Windows 2000 Network Designing Authentication in a Microsoft Windows 2000 Network Designing Kerberos Authentication.
Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li Pusan National University.
CYBERINFRASTRUCTURE FOR THE GEOSCIENCES Data Replication Service Sandeep Chandra GEON Systems Group San Diego Supercomputer Center.
INFSO-RI Enabling Grids for E-sciencE Distributed Metadata with the AMGA Metadata Catalog Nuno Santos, Birger Koblitz 20 June 2006.
Publish / Subscribe Database Log Shipping over Bittorent P2P CS 848 Fall 2006 Univeristy of Waterloo Project Presentation by N. T c h e r v e n s k i.
Intro – Part 2 Introduction to Database Management: Ch 1 & 2.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
10 1 Chapter 10 Distributed Database Management Systems Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Multiprossesors Systems.. What are Distributed Databases ? “ A Logically interrelated collection of shared data ( and a description of this data) physically.
Part Four: The LSC DataGrid Part Four: LSC DataGrid A: Data Replication B: What is the LSC DataGrid? C: The LSCDataFind tool.
The Replica Location Service The Globus Project™ And The DataGrid Project Copyright (c) 2002 University of Chicago and The University of Southern California.
Transaction-based Grid Data Replication Using OGSA-DAI Presented by Yin Chen February 2007.
Replica Consistency in a Data Grid1 IX International Workshop on Advanced Computing and Analysis Techniques in Physics Research December 1-5, 2003 High.
Databases for data management in PHENIX Irina Sourikova Brookhaven National Laboratory for the PHENIX collaboration.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Implementation and performance analysis of.
Research of P2P Architecture based on Cloud Computing Speaker : 吳靖緯 MA0G0101.
PHENIX and the data grid >400 collaborators 3 continents + Israel +Brazil 100’s of TB of data per year Complex data with multiple disparate physics goals.
Topic Distributed DBMS Database Management Systems Fall 2012 Presented by: Osama Ben Omran.
Database authentication in CORAL and COOL Database authentication in CORAL and COOL Giacomo Govi Giacomo Govi CERN IT/PSS CERN IT/PSS On behalf of the.
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
 Distributed Database Concepts  Parallel Vs Distributed Technology  Advantages  Additional Functions  Distribution Database Design  Data Fragmentation.
1 A Scalable Distributed Data Management System for ATLAS David Cameron CERN CHEP 2006 Mumbai, India.
Grid Activities in CMS Asad Samar (Caltech) PPDG meeting, Argonne July 13-14, 2000.
1 CEG 2400 Fall 2012 eDirectory – Directory Service.
Replicazione e QoS nella gestione di database grid-oriented Barbara Martelli INFN - CNAF.
Preservation Data Services Persistent Archive Research Group Reagan W. Moore October 1, 2003.
DISTRIBUTED DATABASES AND DDBMS. Learning Objectives  Describe various DDBMS implementations  Explain how database design affects the DDBMS environment.
Database Replication and Monitoring
The Client/Server Database Environment
Lead SQL BankofAmerica Blog: SQLHarry.com
Simone Campana CERN IT-ES
CHAPTER 3 Architectures for Distributed Systems
Replication Middleware for Cloud Based Storage Service
Grid Data Integration In the CMS Experiment
Consistency and Replication
Presentation transcript:

PostgreSQL Replicator – easy way to build a distributed Postgres database Irina Sourikova PHENIX collaboration

Outline Why PHENIX had to search for another DB technology Options: Objectivity, Oracle, MySQL, Postgres Postgres DB Postgres Replicator Distributed PHENIX File Catalog File Catalog API: FROG Conclusions

BNL CC-F Lund CC-J VU UNM SUNYSB Major PHENIX Computing Sites LLNL

analysis, simulation, and reconstruction of simulated data CC-J UNM WI CC-F BNL simulation farm off-site analysis analysis and reconstruction 50 (300) TB/yr 10 TB/yr 5 TB/yr 10 TB/yr Large amount of data is moved between BNL and offsite institutions

Central File Catalog doesn’t scale in distributed environment Because of WAN latency central File Catalog was not updated online during production at remote sites Remote sites maintained their own catalogs of local files Was hard to keep File Catalogs up-to-date, required a lot of work

What we were looking for Provide write permissions to the sites that store portions of the data set

Objy: difficulty of PDN negotiation, exposes primary DB to world WAN latency, single-point-of-failure

What we needed: hybrid solution

Database technology choice Objectivity – problems with peer-to-peer replication Oracle was an obvious candidate(but expensive) MySQL had only master-slave replication PostgreSQL seemed a very attractive DBMS with several existing projects on peer-to-peer replication SOLUTION: to have central Objy based metadata catalog and distributed file replica catalog

PostgreSQL ACID compliant Multi-Version Concurrency Control for concurrent applications Easy to use Free LISTEN and NOTIFY support message passing and client notification of an event in the database. Important for automating data replication

PostgreSQL Replicator Works on top of Postgres DB Partial, peer-to-peer, async replication Table level data ownership model Table level replicated database set

Distributed PHENIX Catalog Distribution includes BNL and Stony Brook University Two sites have common tables that are synchronized during replica session Common tables have Workload Partitioning data ownership model, that means the table entries can be updated only by the site- originator

LFNhostfilePathfsizetime xyz.dstXXX.rcf.bnl.gov/phenix/data01/dsts/xyz.dst :20:03 EVENTDATAXXX.prdfHPSS/phenix/phnxsink/… 123.rootram3.chem.sunysb.edu/…./123.root 123.rootZZZ.rcf.bnl.gov/phenix/data45/…/123.root :00:02 Table ‘files’

SBBNL SBBNL ARGO SYNC Stony Brook BNL DBadmin Clients Production Staging

File Catalog replication Synchronization is two-way Fault tolerant DB replication is partial, only latest updates are transferred over the network That solves scalability problems Replication of new updates takes 1min

File Catalog API: FROG File Replica On Grid Translates Logical File Name to Physical File Name Shields users from Database implementation User code stays the same in different environment – with or without DB access(important for offsite analysis)

FROG PostgresObjy local dirs GSEARCHPATH =.:/home/irina:PG:OBJY LFN PFN

‘Least surprise’ design principle FROG has 1 method - const char * location(const char * lfn) If lfn starts with a /, it is considered as an absolute file path and FROG::location() returns it If env GSEARCHPATH is not set, FROG::location() returns lfn If users don’t have DB access, env GSEARCHPATH can be set accordingly

Plug-in architecture To search different databases FROG loads the corresponding dynamic libraries Easy to change database backend( user code not affected)

What do we gain by using FROG? No hardwired file paths in the code Analysis code still works when files are relocated Possible to replicate very popular files Extremely useful for NFS load balancing Better use of available resources Faster analysis

Conclusions Postgres Replicator is a free software that allows to build a distributed database This technology allowed PHENIX to distribute File Catalog and have the following advantages over central FC: Reliability(no single point of failure) Accessibility(reduced workload, no WAN latency) Solved security problems (firewall conduits only between servers) Catalog data is more up-to-date(all sites update the catalog online) Less manpower needed to maintain the catalog