SlideShare a Scribd company logo
1 of 29
VoltDB: an SQL Developer’s Perspective
Tim Callaghan, VoltDB Field Engineer
tcallaghan@voltdb.com
March 3, 2009 |
Agenda
• VoltDB Technical Overview
• Comparing VoltDB to Traditional OLTP
• Migration and Development
• Q+A
2
March 3, 2009 |
About Me
• VoltDB Field Engineer/Community Advocate
• Joined VoltDB in September, 2009
• Support commercial and community customers
• Built many examples and POCs
• Technical background
• 18 years of Oracle design/development/administration
• User of many programming languages – database and
traditional
• See last slide for full contact information
3
March 3, 2009 |
VoltDB
Technical
Overview
4
March 3, 2009 |
Before I Begin…
VoltDB is available in community and
commercial editions
Runs on Linux + Mac*
5
March 3, 2009 |
X
X
X
X X
Scaling Traditional OLTP Databases
• Sharding improves performance but
introduces…
• Management complexity
+ disjointed backup/recovery and replication
+ manual effort to re-partition data
• Application complexity
+ shard awareness
+ cross partition joins
+ cross partition transactions
• And, each shard still suffers from traditional OLTP
performance limitations
• If you can shard, your application is probably
great in VoltDB.
March 3, 2009 |
Technical Overview
• “OLTP Through the Looking Glass”
http://cs-www.cs.yale.edu/homes/dna/papers/oltpperf-sigmod08.pdf
• VoltDB avoids the overhead of traditional databases
• K-safety for fault tolerance
- no logging
• In memory operation for maximum throughput
- no buffer management
• Partitions operate autonomously
and single-threaded
- no latching or locking
• Built to horizontally scale
X
X
X
X
7
March 3, 2009 |
X
X
X
X X
Technical Overview – Partitions (1/3)
• 1 partition per physical CPU core
• Each physical server has multiple VoltDB partitions
• Data - Two types of tables
• Partitioned
+ Single column serves as partitioning key
+ Rows are spread across all VoltDB partitions by partition column
+ Transactional data (high frequency of modification)
• Replicated
+ All rows exist within all VoltDB partitions
+ Relatively static data (low frequency of modification)
• Code - Two types of work – both ACID
• Single-Partition
+ All insert/update/delete operations within single partition
+ Majority of transactional workload
• Multi-Partition
+ CRUD against partitioned tables across multiple partitions
+ Insert/update/delete on replicated tables
March 3, 2009 |
Technical Overview – Partitions (2/3)
• Single-partition vs. Multi-partition
1 101 2
1 101 3
4 401 2
1 knife
2 spoon
3 fork
Partition 1
2 201 1
5 501 3
5 502 2
1 knife
2 spoon
3 fork
Partition 2
3 201 1
6 601 1
6 601 2
1 knife
2 spoon
3 fork
Partition 3
table orders : customer_id (partition key)
(partitioned) order_id
product_id
table products : product_id
(replicated) product_name
select count(*) from orders where customer_id = 5
single-partition
select count(*) from orders where product_id = 3
multi-partition
insert into orders (customer_id, order_id, product_id) values (3,303,2)
single-partition
update products set product_name = ‘spork’ where product_id = 3
multi-partition
March 3, 2009 |
Technical Overview – Partitions (3/3)
• Looking inside a
VoltDB partition…
• Each partition contains
data and an execution
engine.
• The execution engine
contains a queue for
transaction requests.
• Requests are
executed sequentially
(single threaded).
Work
Queue
execution engine
Table Data
Index Data
- Complete copy of all replicated tables
- Portion of rows (about 1/partitions) of
all partitioned tables
March 3, 2009 |
Technical Overview – Compiling
• The database is
constructed from
• The schema (DDL)
• The work load (Java
stored procedures)
• The Project (users,
groups, partitioning)
• VoltCompiler creates
application catalog
• Copy to servers along
with 1 .jar and 1 .so
• Start servers
CREATE TABLE HELLOWORLD (
HELLO CHAR(15),
WORLD CHAR(15),
DIALECT CHAR(15),
PRIMARY KEY (DIALECT)
);
Schema
import org.voltdb. * ;
@ProcInfo(
partitionInfo = "HELLOWORLD.DIA
singlePartition = true
)
public class Insert extends VoltPr
public final SQLStmt sql =
new SQLStmt("INSERT INTO HELLO
public VoltTable[] run( String hel
import org.voltdb. * ;
@ProcInfo(
partitionInfo = "HELLOWORLD.DIA
singlePartition = true
)
public class Insert extends VoltPr
public final SQLStmt sql =
new SQLStmt("INSERT INTO HELLO
public VoltTable[] run( String hel
import org.voltdb. * ;
@ProcInfo(
partitionInfo = "HE
singlePartition = t
public final SQLStmt
public VoltTable[] run
Stored Procedures
<?xml version="1.0"?>
<project>
<database name='data
<schema path='ddl.
<partition table=‘
</database>
</project>
Project.xml
March 3, 2009 |
Technical Overview - Transactions
• All access to VoltDB is via Java
stored procedures (Java + SQL)
• A single invocation of a stored
procedure is a transaction
(committed on success)
• Limits round trips between DBMS
and application
• High performance client
applications communicate
asynchronously with VoltDB
SQL
March 3, 2009 |
Technical Overview – Clusters/Durability
• Scalability
• Increase RAM in servers to add capacity
• Add servers to increase performance / capacity
• Consistently measuring 90% of single-node
performance increase per additional node
• High availability
• K-safety for redundancy
• Snapshots
• Scheduled, continuous, on demand
• Spooling to data warehouse
• Disaster Recovery/WAN replication (Future)
• Asynchronous replication
March 3, 2009 |
Comparing
VoltDB to
Traditional OLTP
(in no particular order)
14
March 3, 2009 |
Asynchronous Communications
• Client applications communicate asynchronously with
VoltDB
• Stored procedure invocations are placed “on the wire”
• Responses are pulled from the server
• Allows a single client application to generate > 100K TPS
• Our client library will simulate synchronous if needed
Traditional
salary := get_salary(employee_id);
VoltDB
callProcedure(asyncCallback, “get_salary”, employee_id);
15
March 3, 2009 |
Transaction Control
• VoltDB does not support client-side transaction control
• Client applications cannot:
+ insert into t_colors (color_name) values (‘purple’);
+ rollback;
• Stored procedures commit if successful, rollback if failed
• Client code in stored procedure can call for rollback
16
March 3, 2009 |
Interfacing with VoltDB
• Client applications interface with VoltDB via stored
procedures
• Java stored procedures – Java and SQL
• No ODBC/JDBC
17
March 3, 2009 |
Lack of concurrency
• Single-threaded execution within partitions (single-
partition) or across partitions (multi-partition)
• No need to worry about locking/dead-locks
• great for “inventory” type applications
+ checking inventory levels
+ creating line items for customers
• Because of this, transactions execute in microseconds.
• However, single-threaded comes at a price
• Other transactions wait for running transaction to complete
• Don’t do anything crazy in a SP (request web page, send email)
• Useful for OLTP, not OLAP
18
March 3, 2009 |
Throughput vs. Latency
• VoltDB is built for throughput over latency
• Latency measured in mid single-digits in a properly sized
cluster
• Do not estimate latency as (1 / TPS)
19
March 3, 2009 |
SQL Support
• SELECT, INSERT (using values), UPDATE, and
DELETE
• Aggregate SQL supports AVG, COUNT, MAX, MIN, SUM
• Materialized views using COUNT and SUM
• Hash and Tree Indexes
• SQL functions and functionality will be added over time,
for now I do it in Java
• Execution plan for all SQL is created at compile time and
available for analysis
20
March 3, 2009 |
SQL in Stored Procedures
• SQL can be parameterized, but not dynamic
“select * from foo where bar = ?;” (YES)
“select * from ? where bar = ?;” (NO)
March 3, 2009 |
Connecting to the Cluster
• Clients connect to one or more nodes in the
VoltDB cluster, transactions are forwarded to
the correct node
• Clients are not aware of partitioning strategy
• In the future we may send back data in the
response indicating if the transaction was sent to
the correct node.
March 3, 2009 |
Schema Changes
• Traditional OLTP
• add table…
• alter table…
• VoltDB
• modify schema and stored procedures
• build catalog
• deploy catalog
• V1.0: Add/drop users, stored procedures
• V1.1: Add/drop tables
• Future: Add/drop column, …
March 3, 2009 |
Table/Index Storage
• VoltDB is entirely in-memory
• Cluster must collectively have enough RAM to
hold all tables/indexes (k + 1 copies)
• Even data distribution is important
March 3, 2009 |
Migration
and
Development
25
March 3, 2009 |
Migrating to VoltDB
1. Grab your existing DDL, SQL, and stored
procedures.
2. Compile your VoltDB Application.
3. Sorry…
• Review your application as a whole
• Partitioning is HUGE
• Everything inside stored procedures
• SQL requirements
March 3, 2009 |
Client Libraries
• We support Java and C++ natively
• PHP is via C++/SWIG
• SWIG can produce many others
• Long-term roadmap is native PHP, Python, C#,
and others.
• Community has developed Erlang (wire
protocol) and Ruby (HTTP/JSON)
• HTTP/JSON interface also available
• Easily used by most languages
• Server can handle ~1,000 requests per second
March 3, 2009 |
Getting Data In and Out
• In: Create simple client application to read flat
file and load into table(s).
• 1 SQL stored procedures can be defined in XML
• Working on a generic utility for loading
• Out: Snapshot to flat file
• Snapshots can be converted to CSV/TSV data
• Out: EL
• Special type of tables in VoltDB
+ export (insert/update/delete) or export only (insert only)
+ client application reads from buffers and acks when done
• currently targeting file-system, JDBC coming
March 3, 2009 |
Q & A
• Visit http://voltdb.com to…
• Download VoltDB
• Get sample app code
• Join the VoltDB community
• VoltDB user groups: www.meetup.com/voltdb
• Follow VoltDB on Twitter @voltdb
• Contact me
• tcallaghan@voltdb.com (email)
• @tmcallaghan (Twitter)
29

More Related Content

Similar to VoltDB.ppt

Gib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorGib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorDaniel Toomey
 
Adding Support for Networking and Web Technologies to an Embedded System
Adding Support for Networking and Web Technologies to an Embedded SystemAdding Support for Networking and Web Technologies to an Embedded System
Adding Support for Networking and Web Technologies to an Embedded SystemJohn Efstathiades
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceAntonio García-Domínguez
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum versionsqlserver.co.il
 
IBM InterConnect 2015 - IIB Effective Application Development
IBM InterConnect 2015 - IIB Effective Application DevelopmentIBM InterConnect 2015 - IIB Effective Application Development
IBM InterConnect 2015 - IIB Effective Application DevelopmentAndrew Coleman
 
Distributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container EraDistributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container EraGlenn Davis
 
Distributed Logging Architecture in Container Era
Distributed Logging Architecture in Container EraDistributed Logging Architecture in Container Era
Distributed Logging Architecture in Container EraSATOSHI TAGOMORI
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Gabriele Bartolini
 
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp0220140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02Francisco Gonçalves
 
IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform
 IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform
IoT Ingestion & Analytics using Apache Apex - A Native Hadoop PlatformApache Apex
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesAlfredo Abate
 
Using Release(deallocate) and Painful Lessons to be learned on DB2 locking
Using Release(deallocate) and Painful Lessons to be learned on DB2 lockingUsing Release(deallocate) and Painful Lessons to be learned on DB2 locking
Using Release(deallocate) and Painful Lessons to be learned on DB2 lockingJohn Campbell
 
Hia 1693-effective application-development_in_iib
Hia 1693-effective application-development_in_iibHia 1693-effective application-development_in_iib
Hia 1693-effective application-development_in_iibAndrew Coleman
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLEDB
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.Renzo Tomà
 
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...Continuent
 
Long and winding road - 2014
Long and winding road  - 2014Long and winding road  - 2014
Long and winding road - 2014Connor McDonald
 
AWS Redshift Introduction - Big Data Analytics
AWS Redshift Introduction - Big Data AnalyticsAWS Redshift Introduction - Big Data Analytics
AWS Redshift Introduction - Big Data AnalyticsKeeyong Han
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentTimothy Fitz
 
Domino Server Health - Monitoring and Managing
 Domino Server Health - Monitoring and Managing Domino Server Health - Monitoring and Managing
Domino Server Health - Monitoring and ManagingGabriella Davis
 

Similar to VoltDB.ppt (20)

Gib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorGib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk Migrator
 
Adding Support for Networking and Web Technologies to an Embedded System
Adding Support for Networking and Web Technologies to an Embedded SystemAdding Support for Networking and Web Technologies to an Embedded System
Adding Support for Networking and Web Technologies to an Embedded System
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum version
 
IBM InterConnect 2015 - IIB Effective Application Development
IBM InterConnect 2015 - IIB Effective Application DevelopmentIBM InterConnect 2015 - IIB Effective Application Development
IBM InterConnect 2015 - IIB Effective Application Development
 
Distributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container EraDistributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container Era
 
Distributed Logging Architecture in Container Era
Distributed Logging Architecture in Container EraDistributed Logging Architecture in Container Era
Distributed Logging Architecture in Container Era
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
 
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp0220140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
 
IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform
 IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform
IoT Ingestion & Analytics using Apache Apex - A Native Hadoop Platform
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
Using Release(deallocate) and Painful Lessons to be learned on DB2 locking
Using Release(deallocate) and Painful Lessons to be learned on DB2 lockingUsing Release(deallocate) and Painful Lessons to be learned on DB2 locking
Using Release(deallocate) and Painful Lessons to be learned on DB2 locking
 
Hia 1693-effective application-development_in_iib
Hia 1693-effective application-development_in_iibHia 1693-effective application-development_in_iib
Hia 1693-effective application-development_in_iib
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.
 
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
 
Long and winding road - 2014
Long and winding road  - 2014Long and winding road  - 2014
Long and winding road - 2014
 
AWS Redshift Introduction - Big Data Analytics
AWS Redshift Introduction - Big Data AnalyticsAWS Redshift Introduction - Big Data Analytics
AWS Redshift Introduction - Big Data Analytics
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous Deployment
 
Domino Server Health - Monitoring and Managing
 Domino Server Health - Monitoring and Managing Domino Server Health - Monitoring and Managing
Domino Server Health - Monitoring and Managing
 

Recently uploaded

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 

VoltDB.ppt

  • 1. VoltDB: an SQL Developer’s Perspective Tim Callaghan, VoltDB Field Engineer tcallaghan@voltdb.com
  • 2. March 3, 2009 | Agenda • VoltDB Technical Overview • Comparing VoltDB to Traditional OLTP • Migration and Development • Q+A 2
  • 3. March 3, 2009 | About Me • VoltDB Field Engineer/Community Advocate • Joined VoltDB in September, 2009 • Support commercial and community customers • Built many examples and POCs • Technical background • 18 years of Oracle design/development/administration • User of many programming languages – database and traditional • See last slide for full contact information 3
  • 4. March 3, 2009 | VoltDB Technical Overview 4
  • 5. March 3, 2009 | Before I Begin… VoltDB is available in community and commercial editions Runs on Linux + Mac* 5
  • 6. March 3, 2009 | X X X X X Scaling Traditional OLTP Databases • Sharding improves performance but introduces… • Management complexity + disjointed backup/recovery and replication + manual effort to re-partition data • Application complexity + shard awareness + cross partition joins + cross partition transactions • And, each shard still suffers from traditional OLTP performance limitations • If you can shard, your application is probably great in VoltDB.
  • 7. March 3, 2009 | Technical Overview • “OLTP Through the Looking Glass” http://cs-www.cs.yale.edu/homes/dna/papers/oltpperf-sigmod08.pdf • VoltDB avoids the overhead of traditional databases • K-safety for fault tolerance - no logging • In memory operation for maximum throughput - no buffer management • Partitions operate autonomously and single-threaded - no latching or locking • Built to horizontally scale X X X X 7
  • 8. March 3, 2009 | X X X X X Technical Overview – Partitions (1/3) • 1 partition per physical CPU core • Each physical server has multiple VoltDB partitions • Data - Two types of tables • Partitioned + Single column serves as partitioning key + Rows are spread across all VoltDB partitions by partition column + Transactional data (high frequency of modification) • Replicated + All rows exist within all VoltDB partitions + Relatively static data (low frequency of modification) • Code - Two types of work – both ACID • Single-Partition + All insert/update/delete operations within single partition + Majority of transactional workload • Multi-Partition + CRUD against partitioned tables across multiple partitions + Insert/update/delete on replicated tables
  • 9. March 3, 2009 | Technical Overview – Partitions (2/3) • Single-partition vs. Multi-partition 1 101 2 1 101 3 4 401 2 1 knife 2 spoon 3 fork Partition 1 2 201 1 5 501 3 5 502 2 1 knife 2 spoon 3 fork Partition 2 3 201 1 6 601 1 6 601 2 1 knife 2 spoon 3 fork Partition 3 table orders : customer_id (partition key) (partitioned) order_id product_id table products : product_id (replicated) product_name select count(*) from orders where customer_id = 5 single-partition select count(*) from orders where product_id = 3 multi-partition insert into orders (customer_id, order_id, product_id) values (3,303,2) single-partition update products set product_name = ‘spork’ where product_id = 3 multi-partition
  • 10. March 3, 2009 | Technical Overview – Partitions (3/3) • Looking inside a VoltDB partition… • Each partition contains data and an execution engine. • The execution engine contains a queue for transaction requests. • Requests are executed sequentially (single threaded). Work Queue execution engine Table Data Index Data - Complete copy of all replicated tables - Portion of rows (about 1/partitions) of all partitioned tables
  • 11. March 3, 2009 | Technical Overview – Compiling • The database is constructed from • The schema (DDL) • The work load (Java stored procedures) • The Project (users, groups, partitioning) • VoltCompiler creates application catalog • Copy to servers along with 1 .jar and 1 .so • Start servers CREATE TABLE HELLOWORLD ( HELLO CHAR(15), WORLD CHAR(15), DIALECT CHAR(15), PRIMARY KEY (DIALECT) ); Schema import org.voltdb. * ; @ProcInfo( partitionInfo = "HELLOWORLD.DIA singlePartition = true ) public class Insert extends VoltPr public final SQLStmt sql = new SQLStmt("INSERT INTO HELLO public VoltTable[] run( String hel import org.voltdb. * ; @ProcInfo( partitionInfo = "HELLOWORLD.DIA singlePartition = true ) public class Insert extends VoltPr public final SQLStmt sql = new SQLStmt("INSERT INTO HELLO public VoltTable[] run( String hel import org.voltdb. * ; @ProcInfo( partitionInfo = "HE singlePartition = t public final SQLStmt public VoltTable[] run Stored Procedures <?xml version="1.0"?> <project> <database name='data <schema path='ddl. <partition table=‘ </database> </project> Project.xml
  • 12. March 3, 2009 | Technical Overview - Transactions • All access to VoltDB is via Java stored procedures (Java + SQL) • A single invocation of a stored procedure is a transaction (committed on success) • Limits round trips between DBMS and application • High performance client applications communicate asynchronously with VoltDB SQL
  • 13. March 3, 2009 | Technical Overview – Clusters/Durability • Scalability • Increase RAM in servers to add capacity • Add servers to increase performance / capacity • Consistently measuring 90% of single-node performance increase per additional node • High availability • K-safety for redundancy • Snapshots • Scheduled, continuous, on demand • Spooling to data warehouse • Disaster Recovery/WAN replication (Future) • Asynchronous replication
  • 14. March 3, 2009 | Comparing VoltDB to Traditional OLTP (in no particular order) 14
  • 15. March 3, 2009 | Asynchronous Communications • Client applications communicate asynchronously with VoltDB • Stored procedure invocations are placed “on the wire” • Responses are pulled from the server • Allows a single client application to generate > 100K TPS • Our client library will simulate synchronous if needed Traditional salary := get_salary(employee_id); VoltDB callProcedure(asyncCallback, “get_salary”, employee_id); 15
  • 16. March 3, 2009 | Transaction Control • VoltDB does not support client-side transaction control • Client applications cannot: + insert into t_colors (color_name) values (‘purple’); + rollback; • Stored procedures commit if successful, rollback if failed • Client code in stored procedure can call for rollback 16
  • 17. March 3, 2009 | Interfacing with VoltDB • Client applications interface with VoltDB via stored procedures • Java stored procedures – Java and SQL • No ODBC/JDBC 17
  • 18. March 3, 2009 | Lack of concurrency • Single-threaded execution within partitions (single- partition) or across partitions (multi-partition) • No need to worry about locking/dead-locks • great for “inventory” type applications + checking inventory levels + creating line items for customers • Because of this, transactions execute in microseconds. • However, single-threaded comes at a price • Other transactions wait for running transaction to complete • Don’t do anything crazy in a SP (request web page, send email) • Useful for OLTP, not OLAP 18
  • 19. March 3, 2009 | Throughput vs. Latency • VoltDB is built for throughput over latency • Latency measured in mid single-digits in a properly sized cluster • Do not estimate latency as (1 / TPS) 19
  • 20. March 3, 2009 | SQL Support • SELECT, INSERT (using values), UPDATE, and DELETE • Aggregate SQL supports AVG, COUNT, MAX, MIN, SUM • Materialized views using COUNT and SUM • Hash and Tree Indexes • SQL functions and functionality will be added over time, for now I do it in Java • Execution plan for all SQL is created at compile time and available for analysis 20
  • 21. March 3, 2009 | SQL in Stored Procedures • SQL can be parameterized, but not dynamic “select * from foo where bar = ?;” (YES) “select * from ? where bar = ?;” (NO)
  • 22. March 3, 2009 | Connecting to the Cluster • Clients connect to one or more nodes in the VoltDB cluster, transactions are forwarded to the correct node • Clients are not aware of partitioning strategy • In the future we may send back data in the response indicating if the transaction was sent to the correct node.
  • 23. March 3, 2009 | Schema Changes • Traditional OLTP • add table… • alter table… • VoltDB • modify schema and stored procedures • build catalog • deploy catalog • V1.0: Add/drop users, stored procedures • V1.1: Add/drop tables • Future: Add/drop column, …
  • 24. March 3, 2009 | Table/Index Storage • VoltDB is entirely in-memory • Cluster must collectively have enough RAM to hold all tables/indexes (k + 1 copies) • Even data distribution is important
  • 25. March 3, 2009 | Migration and Development 25
  • 26. March 3, 2009 | Migrating to VoltDB 1. Grab your existing DDL, SQL, and stored procedures. 2. Compile your VoltDB Application. 3. Sorry… • Review your application as a whole • Partitioning is HUGE • Everything inside stored procedures • SQL requirements
  • 27. March 3, 2009 | Client Libraries • We support Java and C++ natively • PHP is via C++/SWIG • SWIG can produce many others • Long-term roadmap is native PHP, Python, C#, and others. • Community has developed Erlang (wire protocol) and Ruby (HTTP/JSON) • HTTP/JSON interface also available • Easily used by most languages • Server can handle ~1,000 requests per second
  • 28. March 3, 2009 | Getting Data In and Out • In: Create simple client application to read flat file and load into table(s). • 1 SQL stored procedures can be defined in XML • Working on a generic utility for loading • Out: Snapshot to flat file • Snapshots can be converted to CSV/TSV data • Out: EL • Special type of tables in VoltDB + export (insert/update/delete) or export only (insert only) + client application reads from buffers and acks when done • currently targeting file-system, JDBC coming
  • 29. March 3, 2009 | Q & A • Visit http://voltdb.com to… • Download VoltDB • Get sample app code • Join the VoltDB community • VoltDB user groups: www.meetup.com/voltdb • Follow VoltDB on Twitter @voltdb • Contact me • tcallaghan@voltdb.com (email) • @tmcallaghan (Twitter) 29