SlideShare une entreprise Scribd logo
1  sur  39
Managing High Performance Data with vFabric
                 SQLFire

                      Carter Shanklin
                      Product Manager for vFabric




                                              © 2009 VMware Inc. All rights reserved
Agenda

 What is SQLFire?
 Why SQL vs. NoSQL
 Why SQLFire versus other SQL databases
 SQLFire features + Demo
 How SQLFire Scales
  • Hash partitioning
  • Entity groups and collocation
  • Data-aware stored procedures
 Consistency model
 Shared nothing persistence
What is vFabric SQLFire?

 SQLFire is a memory-optimized distributed SQL database.
 SQLFire attacks scalability challenges in two ways:
  • Relaxes ACID semantics somewhat (in transactions and in replication)
  • Horizontally scalable. Add capacity by adding nodes.
 SQLFire has built-in high availability and native support for
  replication to multiple datacenters.
 SQLFire provides a real SQL interface. Ships with JDBC and
  ADO.NET bindings with more to come.
 SQLFire can also be used as a cache in front of other databases.
SQLFire at-a-glance

                                    Java                      C#
                                    Client                   Client         JDBC or ADO.NET
                                     JDBC




                                                           Many physical machine nodes appear
                                                                  as one logical system




        As data changes,
     subscribers are pushed                              Data transparently replicated and/or partitioned;
       notification events                               Redundant storage can be in memory and/or on
                                                                               disk




                                                                                      Increase/Decrease
                                                                                      capacity on the fly

    Shared Nothing disk                                                    Synchronous read through,
        persistence                                                              write through or
    Each cache instance can
    optionally persist to disk                                            Asynchronous write-behind to
                                                                          other data sources and sinks
                                   File                           Other
                                 system
                                             Databases




4
The database world is changing.

 Many new data models (NoSQL) are emerging
  • Key-value
  • Column family (inspired by Google BigTable)
  • Document
  • Graph
 Most focus on making model less rigid than SQL
 Consistency model is not ACID

   Low scale               High scale        Very high scale


  STRICT –               Tunable                  Eventual
  Full ACID              Consistency
  (RDB)

 Different tradeoffs for different goals
SQLFire Versus NoSQL


    Attribute                  NoSQL                         SQLFire
DB Interface       Idiosyncratic (i.e. each is     Standard SQL.
                   custom).
Querying           Idiosyncratic or not present.   SQL Queries.
Data               Tunable, most favor eventual    Tunable, favors high
Consistency        consistency.                    consistency.
Transactions       Weak or not present.            Linearly scalable transaction
                                                   model.
Interface Design   Designed for simplicity.        Designed for compatibility.
Data Model         Wide variety of different       Relational model.
                   models.
Schema             Focus on extreme flexibility,   SQL model, requires DB
Flexibility        dynamism.                       migrations, etc.
SQLFire Versus Other SQL Databases


   Attribute              SQLFire                Other SQL DBs
DB Interface    Standard SQL.              Standard SQL.
Data            Tunable. Mix of eventual   High consistency.
Consistency     consistency and high
                consistency.
Transactions    Supported.                 Very strong support.
Scaling Model   Scale out, commodity       Scale up.
                servers.
SQLFire challenges traditional DB design, not SQL

Buffers primarily
  tuned for IO
                                                     First write
                                                      to LOG




Second write to
  Data files


       Too much I/O
       Design roots don‟t necessarily apply today
        • Too much focus on ACID
8
        • Disk synchronization bottlenecks
                                      Confidential
SQLFire 1.0 Notable Features

 Horizontally scalable with Partitioning and Replication
 Multiple Topologies
  • Client/Server, Asynchronous replication over WAN
 Queries
  • Distributed and memory-optimized
 Procedures and Functions
  • Standard Java stored procedures with “data awareness”
 Caching
  • Loader, writers, Eviction, Overflow and Expiration
 Event framework
  • Listeners, triggers, Asynchronous write behind
 Command line tools
 Manageability, Security
Scaling SQLFire




          Partitioning & Replication
How SQLFire scales a common DB schema.


                                                                               FLIGHTAVAILABILITY
                                                                               ---------------------------------------------

                              FLIGHTS                                   FLIGHT_ID CHAR(6) NOT NULL ,
                                                                         SEGMENT_NUMBER INTEGER NOT NULL ,
                  ---------------------------------------------
                                                                         FLIGHT_DATE DATE NOT NULL ,
                                                                         ECONOMY_SEATS_TAKEN INTEGER ,
            FLIGHT_ID CHAR(6) NOT NULL ,
                                                                        …..
            SEGMENT_NUMBER INTEGER NOT NULL ,
            ORIG_AIRPORT CHAR(3),                                 1–M
                                                                        PRIMARY KEY ( FLIGHT_ID,
            DEPART_TIME TIME,
                                                                         SEGMENT_NUMBER,
      …..
                                                                         FLIGHT_DATE))
      PRIMARY KEY (FLIGHT_ID,
                                                                        FOREIGN KEY (FLIGHT_ID,
      SEGMENT_NUMBER)
                                                                             SEGMENT_NUMBER)
                                                                            REFERENCES FLIGHTS (
                                                                             FLIGHT_ID,
                                                                             SEGMENT_NUMBER)
                                      1–1




                      FLIGHTHISTORY
                  ---------------------------------------------
                                                                         SEVERAL CODE/DIMENSION TABLES
                  FLIGHT_ID CHAR(6),                                                ---------------------------------------------
                  SEGMENT_NUMBER INTEGER,
                  ORIG_AIRPORT CHAR(3),                             AIRLINES: AIRLINE INFORMATION (VERY STATIC)
                  DEPART_TIME TIME,                                 COUNTRIES : LIST OF COUNTRIES SERVED BY FLIGHTS
                  DEST_AIRPORT CHAR(3),                             CITIES:
            …..                                                     MAPS: PHOTOS OF REGIONS SERVED




      Assume, thousands of flight rows, millions of flightavailability records
Creating Tables


     CREATE TABLE AIRLINES (
       AIRLINE CHAR(2) NOT NULL PRIMARY KEY,
       AIRLINE_FULL VARCHAR(24),
       BASIC_RATE DOUBLE PRECISION,
       DISTANCE_DISCOUNT DOUBLE PRECISION,…. );




                            Table




                SQLF                      SQLF    SQLF
Replicated Tables


       CREATE TABLE AIRLINES (
         AIRLINE CHAR(2) NOT NULL PRIMARY KEY,
         AIRLINE_FULL VARCHAR(24),
         BASIC_RATE DOUBLE PRECISION,
         DISTANCE_DISCOUNT DOUBLE PRECISION,…. )
         REPLICATE;




  Replicated Table            Replicated Table          Replicated Table




                     SQLF                        SQLF                      SQLF
Partitioned Tables


       CREATE TABLE FLIGHTS (
         FLIGHT_ID CHAR(6) NOT NULL ,
         SEGMENT_NUMBER INTEGER NOT NULL ,
         ORIG_AIRPORT CHAR(3),
         DEST_AIRPORT CHAR(3)
         DEPART_TIME TIME,
         FLIGHT_MILES INTEGER NOT NULL)
         PARTITION BY COLUMN(FLIGHT_ID);




  Replicated Table           Replicated Table
                             Table                      Replicated Table
  Partitioned Table          Partitioned Table          Partitioned Table




                      SQLF                       SQLF                       SQLF
Partition Redundancy


       CREATE TABLE FLIGHTS (
         FLIGHT_ID CHAR(6) NOT NULL ,
         SEGMENT_NUMBER INTEGER NOT NULL ,
         ORIG_AIRPORT CHAR(3),
         DEST_AIRPORT CHAR(3)
         DEPART_TIME TIME,
         FLIGHT_MILES INTEGER NOT NULL)
          PARTITION BY COLUMN (FLIGHT_ID) REDUNDANCY 1;




  Replicated Table             Replicated Table
                               Table                        Replicated Table
  Partitioned Table            Partitioned Table            Partitioned Table


  Redundant Partition          Redundant Partition          Redundant Partition

                        SQLF                         SQLF                         SQLF
Partition Colocation


       CREATE TABLE FLIGHTAVAILABILITY (
         FLIGHT_ID CHAR(6) NOT NULL ,
         SEGMENT_NUMBER INTEGER NOT NULL ,
         FLIGHT_DATE DATE NOT NULL ,
         ECONOMY_SEATS_TAKEN INTEGER DEFAULT 0, …)
         PARTITION BY COLUMN (FLIGHT_ID)
         COLOCATE WITH (FLIGHTS);




  Replicated Table             Replicated Table
                               Table                        Replicated Table
  Partitioned Table            Partitioned Table            Partitioned Table
  Colocated Partition          Colocated Partition          Colocated Partition
  Redundant Partition          Redundant Partition          Redundant Partition

                        SQLF                         SQLF                         SQLF
Persistent Tables


            CREATE TABLE FLIGHTAVAILABILITY (
              FLIGHT_ID CHAR(6) NOT NULL ,
              SEGMENT_NUMBER INTEGER NOT NULL ,
              FLIGHT_DATE DATE NOT NULL ,
              ECONOMY_SEATS_TAKEN INTEGER DEFAULT 0, …)
              PARTITION BY COLUMN (FLIGHT_ID) COLOCATE WITH (FLIGHTS)
              PERSISTENT persistentStore ASYNCHRONOUS;

Data dictionary is always persisted in each server

                                                           sqlf backup /export/fileServerDirectory/sqlfireBackupLocation




       Replicated Table                Replicated Table
                                       Table                                         Replicated Table
       Partitioned Table               Partitioned Table                             Partitioned Table
       Colocated Partition             Colocated Partition                           Colocated Partition
       Redundant Partition             Redundant Partition                           Redundant Partition

                             SQLF                              SQLF                                             SQLF
Demo
         Scaling with partitioned tables.


                                                                         FLIGHTAVAILABILITY
                                                                         ---------------------------------------------

                        FLIGHTS                                   FLIGHT_ID CHAR(6) NOT NULL ,
                                                                   SEGMENT_NUMBER INTEGER NOT NULL ,
            ---------------------------------------------
                                                                   FLIGHT_DATE DATE NOT NULL ,
                                                                   ECONOMY_SEATS_TAKEN INTEGER ,
      FLIGHT_ID CHAR(6) NOT NULL ,
                                                                  …..
      SEGMENT_NUMBER INTEGER NOT NULL ,
      ORIG_AIRPORT CHAR(3),                                 1–M
                                                                  PRIMARY KEY ( FLIGHT_ID,
      DEPART_TIME TIME,
                                                                   SEGMENT_NUMBER,
…..
                                                                   FLIGHT_DATE))
PRIMARY KEY (FLIGHT_ID,
                                                                  FOREIGN KEY (FLIGHT_ID,
SEGMENT_NUMBER)
                                                                       SEGMENT_NUMBER)
                                                                      REFERENCES FLIGHTS (
                                                                       FLIGHT_ID,
                                                                       SEGMENT_NUMBER)
                                1–1




                FLIGHTHISTORY
            ---------------------------------------------
                                                                   SEVERAL CODE/DIMENSION TABLES
            FLIGHT_ID CHAR(6),                                                ---------------------------------------------
            SEGMENT_NUMBER INTEGER,
            ORIG_AIRPORT CHAR(3),                             AIRLINES: AIRLINE INFORMATION (VERY STATIC)
            DEPART_TIME TIME,                                 COUNTRIES : LIST OF COUNTRIES SERVED BY FLIGHTS
            DEST_AIRPORT CHAR(3),                             CITIES:
      …..                                                     MAPS: PHOTOS OF REGIONS SERVED
Hash partitioning for linear scaling




Key Hashing provides single hop access to its partition
But, what if the access is not based on the key … say, joins are involved
Pure hash-based partitioning will only get you so far.

 Consider this query :
                select * from flights, flightAvailability
             where flights.id = flightAvailability.flightid
                    and flight.fromAirport = ‘CPH’;


 If both tables are simply hash partitioned the join logic will
  need execution on all nodes where flightavailability data is
  stored.


 This will not scale.
  • joins across distributed nodes could involve distributed locks and
    potentially a lot of intermediate data transfer across nodes
To scale we need partition-aware DB design.

 DB architect must think about how data maps to partitions.
 The main idea is to:
  • minimize excessive data distribution by keeping the most frequently accessed
   and joined data collocated on partitions.
 Read Pat Helland‟s “Life beyond Distributed Transactions” and the
  Google MegaStore paper.
SQLFire allows partition-aware design with the “colocated” keyword.


                               Entity Groups




                                           FlightID is the
                                           entity group Key




Table FlightAvailability partitioned by FlightID colocated with Flights
Solving this scalability problem with SQLFire.

 Create flightAvailability as follows:
                CREATE TABLE flightAvailability
                                 …
           partitioned by flightid colocate with flights;


 Re-run the query:
              select * from flights, flightAvailability
            where flights.id = flightAvailability.flightid
                  and flight.fromAirport = ‘CPH’;


 The query is restricted to nodes containing flights with CPH
  as the fromAirport.
More about partition-aware database design.

 OLTP systems tend to be partitionable.
  • Typically it is the number of entities that grows over time and not the size of
    the entity.
     Customer count perpetually grows, not the size of the customer info


  • Most often access is very restricted and based on select entities
     given a FlightID, fetch flightAvailability records
     given a customerID, add/remove orders, shipment records



 Identify partition key for “Entity Group”
  • "entity groups": set of entities across several related tables that can all share a
    single identifier
     flightID is shared between the parent and child tables
     CustomerID shared between customer, order and shipment tables
Scaling Application logic with
Parallel “Data Aware procedures”
Stored Procedures in SQLFire.

 SQLFire stored procedures.
  • Written in pure Java rather than proprietary extensions.
  • Created and defined based on SQL standards.
  • Supports “data awareness” and run only on nodes where applicable data
   resides.
  • They support a map/reduce-like execution style.
 Benefits:
  • Write procedures in pure Java or take advantage of existing Java libraries.
  • Easily take advantage of SQLFire as a highly scalable distributed system.
Procedures

          Java Stored Procedures may be created according to the
                               SQL Standard



 CREATE PROCEDURE getOverBookedFlights
 (IN argument OBJECT, OUT result OBJECT)
 LANGUAGE JAVA PARAMETER STYLE JAVA
 READS SQL DATA DYNAMIC RESULT SETS 1
 EXTERNAL NAME com.acme.OverBookedFLights;



  SQLFire also supports the JDBC type Types.JAVA_OBJECT. A parameter of type
            JAVA_OBJECT supports an arbitrary Serializable Java object.




          In this case, the procedure will be executed on the server to
              which a client is connected (or locally for Peer Clients)
Data Aware Procedures

                Parallelize procedure and prune to nodes with required data


Extend the procedure call with the following syntax:
                                                                                    Client
 CALL [PROCEDURE]
 procedure_name
 ( [ expression [, expression ]* ] )
 [ WITH RESULT PROCESSOR processor_name ]
 [ { ON TABLE table_name [ WHERE whereClause ] }
     |
     { ON {ALL | SERVER GROUPS
       (server_group_name [, server_group_name ]*) }}                                  Fabric Server 1     Fabric Server 2


 ]


CALL getOverBookedFlights( <bind arguments>
ON TABLE FLIGHTAVAILABILITY
                                                                    Hint the data the procedure depends on
WHERE FLIGHTID = <SomeFLIGHTID> ;


         If table is partitioned by columns in the where clause the procedure execution is pruned to nodes with
                                       the data (node with <someFLIGHTID> in this case)
Parallelize procedure then aggregate (reduce)


                                                                        CALL [PROCEDURE]
                                                                        procedure_name
register a Java Result Processor (optional in some cases):
                                                                        ( [ expression [, expression ]* ] )
   CALL SQLF.CreateResultProcessor(                                     [ WITH RESULT PROCESSOR processor_name ]
    processor_name,
    processor_class_name);                                              [ { ON TABLE table_name [ WHERE whereClause ] }        |
                                                                            { ON {ALL | SERVER GROUPS
                                                                              (server_group_name [, server_group_name ]*) }}
                                                                        ]

               Client




                  Fabric Server 1        Fabric Server 2     Fabric Server 3
Consistency model
Consistency Model without Transactions

 Replication within cluster is always eager and synchronous
 Row updates are always atomic; No need to use transactions
 FIFO consistency: writes performed by a single thread are seen by
  all other processes in the order in which they were issued
 Consistency in Partitioned tables
  • a partitioned table row owned by one member at a point in time
  • all updates are serialized to replicas through owner
  • "Total ordering" at a row level: atomic and isolated
 Membership changes and consistency – need another hour 
 Pessimistic concurrency support using „Select for update‟
 Support for referential integrity
SQLFire Transactions

 Highly scalable without any centralized coordinator or lock
  manager
 We make some important assumptions
  • Most OLTP transactions are small in duration and size
  • Write-write conflicts are very rare in practice
 How does it work?
  • Each data node has a sub-coordinator to track TX state
  • Eagerly acquire local “write” locks on each replica
     Object owned by a single primary at a point in time
  • Fail fast if lock cannot be obtained
 Atomic and works with the cluster Failure detection system
 Isolated until commit
  • Only support local isolation during commit
Scaling disk access with shared
    nothing disk files and a
   “journaling” store design
Disk persistence in SQLF


                                                       Memory                                          Memory
                                                       Tables                                          Tables


                             LOG                                             LOG
                           Compressor                                      Compressor




                                     OS Buffers                                      OS Buffers

                                           Record1                                         Record1
                                 Record1

                                 Record2
                                           Record2    Append only                Record1

                                                                                 Record2
                                                                                           Record2    Append only
                                 Record3
                                           Record3
                                                     Operation logs              Record3
                                                                                           Record3
                                                                                                     Operation logs




 Parallel log structured
  storage                                                             •   Don’t seek to disk
 Each partition writes in                                            •   Don’t flush all the way to disk
  parallel                                                                 – Use OS scheduler to time
                                                                              write
 Backups write to disk also
                                                                      •   Do this on primary + secondary
  • Increase reliability against h/w
                                                                      •   Realize very high throughput
    loss
Performance benchmark
How does it perform? Scale?

 Scale from 2 to 10 servers (one per host)
 Scale from 200 to 1200 simulated clients (10 hosts)
 Single partitioned table: int PK, 40 fields (20 ints, 20 strings)
How does it perform? Scale?

 CPU% remained low per server – about 30% indicating many more
  clients could be handled
Is latency low with scale?

 Latency decreases with server capacity
 50-70% take < 1 millisecond
 About 90% take less than 2 milliseconds
SQLFire beta available now

http://vmware.com/go/sqlfire


Q&A

Contenu connexe

Tendances

Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...Principled Technologies
 
Exchange 2010 ha ctd
Exchange 2010 ha ctdExchange 2010 ha ctd
Exchange 2010 ha ctdKaliyan S
 
Ari Zilka Cluster Architecture Patterns
Ari Zilka Cluster Architecture PatternsAri Zilka Cluster Architecture Patterns
Ari Zilka Cluster Architecture Patternsdeimos
 
MySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMat Keep
 
Bank Data Frank Peterson DB2 10-Early_Experiences_pdf
Bank Data   Frank Peterson DB2 10-Early_Experiences_pdfBank Data   Frank Peterson DB2 10-Early_Experiences_pdf
Bank Data Frank Peterson DB2 10-Early_Experiences_pdfSurekha Parekh
 
Increased database performance and reduced costs with Dell PowerEdge FX2 & VM...
Increased database performance and reduced costs with Dell PowerEdge FX2 & VM...Increased database performance and reduced costs with Dell PowerEdge FX2 & VM...
Increased database performance and reduced costs with Dell PowerEdge FX2 & VM...Principled Technologies
 
Throughput comparison: Dell PowerEdge R720 drive options
Throughput comparison: Dell PowerEdge R720 drive optionsThroughput comparison: Dell PowerEdge R720 drive options
Throughput comparison: Dell PowerEdge R720 drive optionsPrincipled Technologies
 
SQL Server 2008 R2 Parallel Data Warehouse
SQL Server 2008 R2 Parallel Data WarehouseSQL Server 2008 R2 Parallel Data Warehouse
SQL Server 2008 R2 Parallel Data WarehouseMark Ginnebaugh
 
Real-Time Loading to Sybase IQ
Real-Time Loading to Sybase IQReal-Time Loading to Sybase IQ
Real-Time Loading to Sybase IQSybase Türkiye
 
Improve DB2 z/OS Test Data Management
Improve DB2 z/OS Test Data ManagementImprove DB2 z/OS Test Data Management
Improve DB2 z/OS Test Data Managementsoftbasemarketing
 
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiGustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiSoftware Guru
 
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...Principled Technologies
 
Solving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration DilemmaSolving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration DilemmaRandy Goering
 
SQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciSQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciMark Ginnebaugh
 
Consolidating older database servers onto Dell PowerEdge FX2 with FC830 serve...
Consolidating older database servers onto Dell PowerEdge FX2 with FC830 serve...Consolidating older database servers onto Dell PowerEdge FX2 with FC830 serve...
Consolidating older database servers onto Dell PowerEdge FX2 with FC830 serve...Principled Technologies
 

Tendances (18)

Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
 
Exchange 2010 ha ctd
Exchange 2010 ha ctdExchange 2010 ha ctd
Exchange 2010 ha ctd
 
Ari Zilka Cluster Architecture Patterns
Ari Zilka Cluster Architecture PatternsAri Zilka Cluster Architecture Patterns
Ari Zilka Cluster Architecture Patterns
 
MySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached API
 
Bank Data Frank Peterson DB2 10-Early_Experiences_pdf
Bank Data   Frank Peterson DB2 10-Early_Experiences_pdfBank Data   Frank Peterson DB2 10-Early_Experiences_pdf
Bank Data Frank Peterson DB2 10-Early_Experiences_pdf
 
Increased database performance and reduced costs with Dell PowerEdge FX2 & VM...
Increased database performance and reduced costs with Dell PowerEdge FX2 & VM...Increased database performance and reduced costs with Dell PowerEdge FX2 & VM...
Increased database performance and reduced costs with Dell PowerEdge FX2 & VM...
 
Twp perf-oracle-1
Twp perf-oracle-1Twp perf-oracle-1
Twp perf-oracle-1
 
Throughput comparison: Dell PowerEdge R720 drive options
Throughput comparison: Dell PowerEdge R720 drive optionsThroughput comparison: Dell PowerEdge R720 drive options
Throughput comparison: Dell PowerEdge R720 drive options
 
SQL Server 2008 R2 Parallel Data Warehouse
SQL Server 2008 R2 Parallel Data WarehouseSQL Server 2008 R2 Parallel Data Warehouse
SQL Server 2008 R2 Parallel Data Warehouse
 
Real-Time Loading to Sybase IQ
Real-Time Loading to Sybase IQReal-Time Loading to Sybase IQ
Real-Time Loading to Sybase IQ
 
Improve DB2 z/OS Test Data Management
Improve DB2 z/OS Test Data ManagementImprove DB2 z/OS Test Data Management
Improve DB2 z/OS Test Data Management
 
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiGustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
 
CloverETL Training Sample
CloverETL Training SampleCloverETL Training Sample
CloverETL Training Sample
 
MySQL高可用
MySQL高可用MySQL高可用
MySQL高可用
 
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
Converged architecture advantages: Dell PowerEdge FX2s and FC830 servers vs. ...
 
Solving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration DilemmaSolving the DB2 LUW Administration Dilemma
Solving the DB2 LUW Administration Dilemma
 
SQL Server Workshop Paul Bertucci
SQL Server Workshop Paul BertucciSQL Server Workshop Paul Bertucci
SQL Server Workshop Paul Bertucci
 
Consolidating older database servers onto Dell PowerEdge FX2 with FC830 serve...
Consolidating older database servers onto Dell PowerEdge FX2 with FC830 serve...Consolidating older database servers onto Dell PowerEdge FX2 with FC830 serve...
Consolidating older database servers onto Dell PowerEdge FX2 with FC830 serve...
 

Similaire à SQLFire at VMworld Europe 2011

Spring One 2012 Presentation – Effective design patterns with NewSQL
Spring One 2012 Presentation – Effective design patterns with NewSQLSpring One 2012 Presentation – Effective design patterns with NewSQL
Spring One 2012 Presentation – Effective design patterns with NewSQLVMware vFabric
 
vFabric SQLFire for high performance data
vFabric SQLFire for high performance datavFabric SQLFire for high performance data
vFabric SQLFire for high performance dataVMware vFabric
 
Gemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSqlGemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSqlDuchess France
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle CoherenceBen Stopford
 
Scaling SQL and NoSQL Databases in the Cloud
Scaling SQL and NoSQL Databases in the Cloud Scaling SQL and NoSQL Databases in the Cloud
Scaling SQL and NoSQL Databases in the Cloud RightScale
 
Azure Cosmos DB - The Swiss Army NoSQL Cloud Database
Azure Cosmos DB - The Swiss Army NoSQL Cloud DatabaseAzure Cosmos DB - The Swiss Army NoSQL Cloud Database
Azure Cosmos DB - The Swiss Army NoSQL Cloud DatabaseBizTalk360
 
Ibm informix security functionality overview
Ibm informix security functionality overviewIbm informix security functionality overview
Ibm informix security functionality overviewBeGooden-IT Consulting
 
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016Alluxio, Inc.
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache CassandraDataStax
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom Joshua Long
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for AndroidJakir Hossain
 
Azure SQL - more or/and less than SQL Server
Azure SQL - more or/and less than SQL ServerAzure SQL - more or/and less than SQL Server
Azure SQL - more or/and less than SQL ServerRafał Hryniewski
 

Similaire à SQLFire at VMworld Europe 2011 (20)

Spring One 2012 Presentation – Effective design patterns with NewSQL
Spring One 2012 Presentation – Effective design patterns with NewSQLSpring One 2012 Presentation – Effective design patterns with NewSQL
Spring One 2012 Presentation – Effective design patterns with NewSQL
 
vFabric SQLFire for high performance data
vFabric SQLFire for high performance datavFabric SQLFire for high performance data
vFabric SQLFire for high performance data
 
Gemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSqlGemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSql
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle Coherence
 
Day2
Day2Day2
Day2
 
Azure storage deep dive
Azure storage deep diveAzure storage deep dive
Azure storage deep dive
 
Scaling SQL and NoSQL Databases in the Cloud
Scaling SQL and NoSQL Databases in the Cloud Scaling SQL and NoSQL Databases in the Cloud
Scaling SQL and NoSQL Databases in the Cloud
 
What's New in Apache Hive
What's New in Apache HiveWhat's New in Apache Hive
What's New in Apache Hive
 
Azure Cosmos DB - The Swiss Army NoSQL Cloud Database
Azure Cosmos DB - The Swiss Army NoSQL Cloud DatabaseAzure Cosmos DB - The Swiss Army NoSQL Cloud Database
Azure Cosmos DB - The Swiss Army NoSQL Cloud Database
 
Technical overview of Azure Cosmos DB
Technical overview of Azure Cosmos DBTechnical overview of Azure Cosmos DB
Technical overview of Azure Cosmos DB
 
Azure and cloud design patterns
Azure and cloud design patternsAzure and cloud design patterns
Azure and cloud design patterns
 
Ibm informix security functionality overview
Ibm informix security functionality overviewIbm informix security functionality overview
Ibm informix security functionality overview
 
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache Cassandra
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
Azure CosmosDb
Azure CosmosDbAzure CosmosDb
Azure CosmosDb
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for Android
 
Dev381.Pp
Dev381.PpDev381.Pp
Dev381.Pp
 
Boston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptxBoston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptx
 
Azure SQL - more or/and less than SQL Server
Azure SQL - more or/and less than SQL ServerAzure SQL - more or/and less than SQL Server
Azure SQL - more or/and less than SQL Server
 

Dernier

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Dernier (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

SQLFire at VMworld Europe 2011

  • 1. Managing High Performance Data with vFabric SQLFire Carter Shanklin Product Manager for vFabric © 2009 VMware Inc. All rights reserved
  • 2. Agenda  What is SQLFire?  Why SQL vs. NoSQL  Why SQLFire versus other SQL databases  SQLFire features + Demo  How SQLFire Scales • Hash partitioning • Entity groups and collocation • Data-aware stored procedures  Consistency model  Shared nothing persistence
  • 3. What is vFabric SQLFire?  SQLFire is a memory-optimized distributed SQL database.  SQLFire attacks scalability challenges in two ways: • Relaxes ACID semantics somewhat (in transactions and in replication) • Horizontally scalable. Add capacity by adding nodes.  SQLFire has built-in high availability and native support for replication to multiple datacenters.  SQLFire provides a real SQL interface. Ships with JDBC and ADO.NET bindings with more to come.  SQLFire can also be used as a cache in front of other databases.
  • 4. SQLFire at-a-glance Java C# Client Client JDBC or ADO.NET JDBC Many physical machine nodes appear as one logical system As data changes, subscribers are pushed Data transparently replicated and/or partitioned; notification events Redundant storage can be in memory and/or on disk Increase/Decrease capacity on the fly Shared Nothing disk Synchronous read through, persistence write through or Each cache instance can optionally persist to disk Asynchronous write-behind to other data sources and sinks File Other system Databases 4
  • 5. The database world is changing.  Many new data models (NoSQL) are emerging • Key-value • Column family (inspired by Google BigTable) • Document • Graph  Most focus on making model less rigid than SQL  Consistency model is not ACID Low scale High scale Very high scale STRICT – Tunable Eventual Full ACID Consistency (RDB)  Different tradeoffs for different goals
  • 6. SQLFire Versus NoSQL Attribute NoSQL SQLFire DB Interface Idiosyncratic (i.e. each is Standard SQL. custom). Querying Idiosyncratic or not present. SQL Queries. Data Tunable, most favor eventual Tunable, favors high Consistency consistency. consistency. Transactions Weak or not present. Linearly scalable transaction model. Interface Design Designed for simplicity. Designed for compatibility. Data Model Wide variety of different Relational model. models. Schema Focus on extreme flexibility, SQL model, requires DB Flexibility dynamism. migrations, etc.
  • 7. SQLFire Versus Other SQL Databases Attribute SQLFire Other SQL DBs DB Interface Standard SQL. Standard SQL. Data Tunable. Mix of eventual High consistency. Consistency consistency and high consistency. Transactions Supported. Very strong support. Scaling Model Scale out, commodity Scale up. servers.
  • 8. SQLFire challenges traditional DB design, not SQL Buffers primarily tuned for IO First write to LOG Second write to Data files  Too much I/O  Design roots don‟t necessarily apply today • Too much focus on ACID 8 • Disk synchronization bottlenecks Confidential
  • 9. SQLFire 1.0 Notable Features  Horizontally scalable with Partitioning and Replication  Multiple Topologies • Client/Server, Asynchronous replication over WAN  Queries • Distributed and memory-optimized  Procedures and Functions • Standard Java stored procedures with “data awareness”  Caching • Loader, writers, Eviction, Overflow and Expiration  Event framework • Listeners, triggers, Asynchronous write behind  Command line tools  Manageability, Security
  • 10. Scaling SQLFire Partitioning & Replication
  • 11. How SQLFire scales a common DB schema. FLIGHTAVAILABILITY --------------------------------------------- FLIGHTS FLIGHT_ID CHAR(6) NOT NULL , SEGMENT_NUMBER INTEGER NOT NULL , --------------------------------------------- FLIGHT_DATE DATE NOT NULL , ECONOMY_SEATS_TAKEN INTEGER , FLIGHT_ID CHAR(6) NOT NULL , ….. SEGMENT_NUMBER INTEGER NOT NULL , ORIG_AIRPORT CHAR(3), 1–M PRIMARY KEY ( FLIGHT_ID, DEPART_TIME TIME, SEGMENT_NUMBER, ….. FLIGHT_DATE)) PRIMARY KEY (FLIGHT_ID, FOREIGN KEY (FLIGHT_ID, SEGMENT_NUMBER) SEGMENT_NUMBER) REFERENCES FLIGHTS ( FLIGHT_ID, SEGMENT_NUMBER) 1–1 FLIGHTHISTORY --------------------------------------------- SEVERAL CODE/DIMENSION TABLES FLIGHT_ID CHAR(6), --------------------------------------------- SEGMENT_NUMBER INTEGER, ORIG_AIRPORT CHAR(3), AIRLINES: AIRLINE INFORMATION (VERY STATIC) DEPART_TIME TIME, COUNTRIES : LIST OF COUNTRIES SERVED BY FLIGHTS DEST_AIRPORT CHAR(3), CITIES: ….. MAPS: PHOTOS OF REGIONS SERVED Assume, thousands of flight rows, millions of flightavailability records
  • 12. Creating Tables CREATE TABLE AIRLINES ( AIRLINE CHAR(2) NOT NULL PRIMARY KEY, AIRLINE_FULL VARCHAR(24), BASIC_RATE DOUBLE PRECISION, DISTANCE_DISCOUNT DOUBLE PRECISION,…. ); Table SQLF SQLF SQLF
  • 13. Replicated Tables CREATE TABLE AIRLINES ( AIRLINE CHAR(2) NOT NULL PRIMARY KEY, AIRLINE_FULL VARCHAR(24), BASIC_RATE DOUBLE PRECISION, DISTANCE_DISCOUNT DOUBLE PRECISION,…. ) REPLICATE; Replicated Table Replicated Table Replicated Table SQLF SQLF SQLF
  • 14. Partitioned Tables CREATE TABLE FLIGHTS ( FLIGHT_ID CHAR(6) NOT NULL , SEGMENT_NUMBER INTEGER NOT NULL , ORIG_AIRPORT CHAR(3), DEST_AIRPORT CHAR(3) DEPART_TIME TIME, FLIGHT_MILES INTEGER NOT NULL) PARTITION BY COLUMN(FLIGHT_ID); Replicated Table Replicated Table Table Replicated Table Partitioned Table Partitioned Table Partitioned Table SQLF SQLF SQLF
  • 15. Partition Redundancy CREATE TABLE FLIGHTS ( FLIGHT_ID CHAR(6) NOT NULL , SEGMENT_NUMBER INTEGER NOT NULL , ORIG_AIRPORT CHAR(3), DEST_AIRPORT CHAR(3) DEPART_TIME TIME, FLIGHT_MILES INTEGER NOT NULL) PARTITION BY COLUMN (FLIGHT_ID) REDUNDANCY 1; Replicated Table Replicated Table Table Replicated Table Partitioned Table Partitioned Table Partitioned Table Redundant Partition Redundant Partition Redundant Partition SQLF SQLF SQLF
  • 16. Partition Colocation CREATE TABLE FLIGHTAVAILABILITY ( FLIGHT_ID CHAR(6) NOT NULL , SEGMENT_NUMBER INTEGER NOT NULL , FLIGHT_DATE DATE NOT NULL , ECONOMY_SEATS_TAKEN INTEGER DEFAULT 0, …) PARTITION BY COLUMN (FLIGHT_ID) COLOCATE WITH (FLIGHTS); Replicated Table Replicated Table Table Replicated Table Partitioned Table Partitioned Table Partitioned Table Colocated Partition Colocated Partition Colocated Partition Redundant Partition Redundant Partition Redundant Partition SQLF SQLF SQLF
  • 17. Persistent Tables CREATE TABLE FLIGHTAVAILABILITY ( FLIGHT_ID CHAR(6) NOT NULL , SEGMENT_NUMBER INTEGER NOT NULL , FLIGHT_DATE DATE NOT NULL , ECONOMY_SEATS_TAKEN INTEGER DEFAULT 0, …) PARTITION BY COLUMN (FLIGHT_ID) COLOCATE WITH (FLIGHTS) PERSISTENT persistentStore ASYNCHRONOUS; Data dictionary is always persisted in each server sqlf backup /export/fileServerDirectory/sqlfireBackupLocation Replicated Table Replicated Table Table Replicated Table Partitioned Table Partitioned Table Partitioned Table Colocated Partition Colocated Partition Colocated Partition Redundant Partition Redundant Partition Redundant Partition SQLF SQLF SQLF
  • 18. Demo Scaling with partitioned tables. FLIGHTAVAILABILITY --------------------------------------------- FLIGHTS FLIGHT_ID CHAR(6) NOT NULL , SEGMENT_NUMBER INTEGER NOT NULL , --------------------------------------------- FLIGHT_DATE DATE NOT NULL , ECONOMY_SEATS_TAKEN INTEGER , FLIGHT_ID CHAR(6) NOT NULL , ….. SEGMENT_NUMBER INTEGER NOT NULL , ORIG_AIRPORT CHAR(3), 1–M PRIMARY KEY ( FLIGHT_ID, DEPART_TIME TIME, SEGMENT_NUMBER, ….. FLIGHT_DATE)) PRIMARY KEY (FLIGHT_ID, FOREIGN KEY (FLIGHT_ID, SEGMENT_NUMBER) SEGMENT_NUMBER) REFERENCES FLIGHTS ( FLIGHT_ID, SEGMENT_NUMBER) 1–1 FLIGHTHISTORY --------------------------------------------- SEVERAL CODE/DIMENSION TABLES FLIGHT_ID CHAR(6), --------------------------------------------- SEGMENT_NUMBER INTEGER, ORIG_AIRPORT CHAR(3), AIRLINES: AIRLINE INFORMATION (VERY STATIC) DEPART_TIME TIME, COUNTRIES : LIST OF COUNTRIES SERVED BY FLIGHTS DEST_AIRPORT CHAR(3), CITIES: ….. MAPS: PHOTOS OF REGIONS SERVED
  • 19. Hash partitioning for linear scaling Key Hashing provides single hop access to its partition But, what if the access is not based on the key … say, joins are involved
  • 20. Pure hash-based partitioning will only get you so far.  Consider this query : select * from flights, flightAvailability where flights.id = flightAvailability.flightid and flight.fromAirport = ‘CPH’;  If both tables are simply hash partitioned the join logic will need execution on all nodes where flightavailability data is stored.  This will not scale. • joins across distributed nodes could involve distributed locks and potentially a lot of intermediate data transfer across nodes
  • 21. To scale we need partition-aware DB design.  DB architect must think about how data maps to partitions.  The main idea is to: • minimize excessive data distribution by keeping the most frequently accessed and joined data collocated on partitions.  Read Pat Helland‟s “Life beyond Distributed Transactions” and the Google MegaStore paper.
  • 22. SQLFire allows partition-aware design with the “colocated” keyword. Entity Groups FlightID is the entity group Key Table FlightAvailability partitioned by FlightID colocated with Flights
  • 23. Solving this scalability problem with SQLFire.  Create flightAvailability as follows: CREATE TABLE flightAvailability … partitioned by flightid colocate with flights;  Re-run the query: select * from flights, flightAvailability where flights.id = flightAvailability.flightid and flight.fromAirport = ‘CPH’;  The query is restricted to nodes containing flights with CPH as the fromAirport.
  • 24. More about partition-aware database design.  OLTP systems tend to be partitionable. • Typically it is the number of entities that grows over time and not the size of the entity.  Customer count perpetually grows, not the size of the customer info • Most often access is very restricted and based on select entities  given a FlightID, fetch flightAvailability records  given a customerID, add/remove orders, shipment records  Identify partition key for “Entity Group” • "entity groups": set of entities across several related tables that can all share a single identifier  flightID is shared between the parent and child tables  CustomerID shared between customer, order and shipment tables
  • 25. Scaling Application logic with Parallel “Data Aware procedures”
  • 26. Stored Procedures in SQLFire.  SQLFire stored procedures. • Written in pure Java rather than proprietary extensions. • Created and defined based on SQL standards. • Supports “data awareness” and run only on nodes where applicable data resides. • They support a map/reduce-like execution style.  Benefits: • Write procedures in pure Java or take advantage of existing Java libraries. • Easily take advantage of SQLFire as a highly scalable distributed system.
  • 27. Procedures Java Stored Procedures may be created according to the SQL Standard CREATE PROCEDURE getOverBookedFlights (IN argument OBJECT, OUT result OBJECT) LANGUAGE JAVA PARAMETER STYLE JAVA READS SQL DATA DYNAMIC RESULT SETS 1 EXTERNAL NAME com.acme.OverBookedFLights; SQLFire also supports the JDBC type Types.JAVA_OBJECT. A parameter of type JAVA_OBJECT supports an arbitrary Serializable Java object. In this case, the procedure will be executed on the server to which a client is connected (or locally for Peer Clients)
  • 28. Data Aware Procedures Parallelize procedure and prune to nodes with required data Extend the procedure call with the following syntax: Client CALL [PROCEDURE] procedure_name ( [ expression [, expression ]* ] ) [ WITH RESULT PROCESSOR processor_name ] [ { ON TABLE table_name [ WHERE whereClause ] } | { ON {ALL | SERVER GROUPS (server_group_name [, server_group_name ]*) }} Fabric Server 1 Fabric Server 2 ] CALL getOverBookedFlights( <bind arguments> ON TABLE FLIGHTAVAILABILITY Hint the data the procedure depends on WHERE FLIGHTID = <SomeFLIGHTID> ; If table is partitioned by columns in the where clause the procedure execution is pruned to nodes with the data (node with <someFLIGHTID> in this case)
  • 29. Parallelize procedure then aggregate (reduce) CALL [PROCEDURE] procedure_name register a Java Result Processor (optional in some cases): ( [ expression [, expression ]* ] ) CALL SQLF.CreateResultProcessor( [ WITH RESULT PROCESSOR processor_name ] processor_name, processor_class_name); [ { ON TABLE table_name [ WHERE whereClause ] } | { ON {ALL | SERVER GROUPS (server_group_name [, server_group_name ]*) }} ] Client Fabric Server 1 Fabric Server 2 Fabric Server 3
  • 31. Consistency Model without Transactions  Replication within cluster is always eager and synchronous  Row updates are always atomic; No need to use transactions  FIFO consistency: writes performed by a single thread are seen by all other processes in the order in which they were issued  Consistency in Partitioned tables • a partitioned table row owned by one member at a point in time • all updates are serialized to replicas through owner • "Total ordering" at a row level: atomic and isolated  Membership changes and consistency – need another hour   Pessimistic concurrency support using „Select for update‟  Support for referential integrity
  • 32. SQLFire Transactions  Highly scalable without any centralized coordinator or lock manager  We make some important assumptions • Most OLTP transactions are small in duration and size • Write-write conflicts are very rare in practice  How does it work? • Each data node has a sub-coordinator to track TX state • Eagerly acquire local “write” locks on each replica  Object owned by a single primary at a point in time • Fail fast if lock cannot be obtained  Atomic and works with the cluster Failure detection system  Isolated until commit • Only support local isolation during commit
  • 33. Scaling disk access with shared nothing disk files and a “journaling” store design
  • 34. Disk persistence in SQLF Memory Memory Tables Tables LOG LOG Compressor Compressor OS Buffers OS Buffers Record1 Record1 Record1 Record2 Record2 Append only Record1 Record2 Record2 Append only Record3 Record3 Operation logs Record3 Record3 Operation logs  Parallel log structured storage • Don’t seek to disk  Each partition writes in • Don’t flush all the way to disk parallel – Use OS scheduler to time write  Backups write to disk also • Do this on primary + secondary • Increase reliability against h/w • Realize very high throughput loss
  • 36. How does it perform? Scale?  Scale from 2 to 10 servers (one per host)  Scale from 200 to 1200 simulated clients (10 hosts)  Single partitioned table: int PK, 40 fields (20 ints, 20 strings)
  • 37. How does it perform? Scale?  CPU% remained low per server – about 30% indicating many more clients could be handled
  • 38. Is latency low with scale?  Latency decreases with server capacity  50-70% take < 1 millisecond  About 90% take less than 2 milliseconds
  • 39. SQLFire beta available now http://vmware.com/go/sqlfire Q&A

Notes de l'éditeur

  1. &lt;-- Strict(Full ACID) ----FIFO(tunable) ---- Eventual ---&gt; (Inpired by Amazon dynamo) RDBMS is synonymous with ACID Tunable: ACID transactions is a choice; by default it could be FIFO Eventual: All bets are off ... you may write and read back and get a different answer or multiple answers (netflix example)