1 copyright © 2013, oracle and/or its affiliates. all...
TRANSCRIPT
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1
Oracle NoSQL Database: Release 3.0 – What’s new and why you care
Dave Segleau – NoSQL Product Manager
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 3
The following is intended to outline our general product direction. It is
intended for information purposes only, and may not be incorporated into
any contract. It is not a commitment to deliver any material, code, or
functionality, and should not be relied upon in making purchasing
decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole
discretion of Oracle.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 4
Agenda
NoSQL Background
Release 3.0 Highlights
Customer Response
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 5
How Does NoSQL Fit With Big Data?
SQL
JDBC,
ODBC
General
Purpose
Managed
Schemas
Security,
Backups
Analytics
…
Distributed,
Batch
Processing
Distributed,
Replicated
File System
Driver
Application
NoSQL databases
Flexible
Schemas
Sharded,
Replicated
Database
High Speed,
Simple Ops
More Flexible Schema
Management
Globally Distributed,
“Always On” data
Competitive Advantages
of “Fast Data”
Lower TCO,
commodity HW scale-out
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 6
Why NoSQL?
Cost
‘Flexible schema’ development paradigm
Simple, typically not managed by IT
Scalable, reliable, distributed architecture
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 7
NoSQL or Relational?
?
NoSQL DBMS
Schema private to application
Collections of data objects
Basic Availability, Soft-state, Eventual consistency
Schema shared by multiple applications
Atomic, Consistent, Isolated, Durable
Inter-related collections of data objects
Relational DBMS
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 8
NoSQL and Relational Working Together
Relational NoSQL
Low-latency
web-scale
access
Operational
transactions
Reporting
and Analysis
Document-
centric data
access
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 10
What is Oracle NoSQL Database?
1011001010010
0100110101010
1011100101010
100100101
Reliable Flexible Fast Simple
Non-Relational Key-Value database designed as cost effective, high
performance solution for simple operations on collections of data with built in
high availability and elastic scale-out.
less is more
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 11
Oracle NoSQL Database NoSQL for Developers and IT
Setup, Admin, API & Integration
Built-in HA, Predictable Performance
Parallel Access & Scale-out
Simple:
Fast:
Flexible:
Reliable:
Flexible schema & Agile development
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 13
Features
Release
3.0
Oracle NoSQL Database Scalable, Highly Available, Key-Value Database
Application
Storage Nodes Datacenter B
Storage Nodes Datacenter A
Application
NoSQL DB Driver
Application
NoSQL DB Driver
Application
Key-value, JSON & RDF data
Large Object API
BASE & ACID Transactions
Data Center Support
Online Rolling Upgrade
Online Cluster Management
Table data model
Secondary Indices
Secondary Zones (Data Centers)
Security
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 14
Agenda
NoSQL Background
Release 3.0 Highlights
Customer Response
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 15
Oracle NoSQL DB Release 3.0 Enterprise Ready
Ease of Adoption
Security
Business Continuity
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 16
Oracle NoSQL DB Release 3.0
Lower barrier to adoption
Simplifies application development shorter
time to market
Allows secondary indexing of multiple fields
Sets foundation for future SQL query access
from Oracle DB
Previous Key/Value and JSON schema APIs
still supported
Simplified application modeling
– Uses familiar table concepts
– Introduces strongly typed fields
– Automatic mapping of Major/Minor key
structure
– Defines JSON schema automatically
– Supports table evolution
– Easy to/from JSON objects
– ACID & BASE transactions
– Compatible with Release 2.0 JSON schemas
Table Data Model Benefits
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 17
Oracle NoSQL DB Release 3.0
table create -name Users
add-field -name userid -type integer
add-field -name lastname -type string
add-field -name firstname -type string
add-field -name email -type string
primary-key -field userid
shard-key -field userid
exit
plan add-table -name Users -wait
Simple Table Example
Can be specified as a JSON string
Must be proper subset of primary-key
By default shard-key == primary-key
userid lastname firstname email
Value Primary Key
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 18
Oracle NoSQL DB Release 3.0
table create -name Users
add-field -name userid -type integer
add-field -name lastname -type string
add-field -name firstname -type string
add-field -name email -type string
primary-key -field userid
exit
plan add-table -name Users –wait
table create -name Users.Folders
add-field -name foldername -type string
add-field -name msgcount -type integer
add-field -name favorite –type boolean -default 'F'
primary-key -field foldername
exit
plan add-table -name Users.Folders -wait
Nested Table Example
userid lastname firstname email
Tables
Users
Users.Folders
[Value] Primary Key
[Value]
userid foldername msgcount favorite
Primary Key Shard Key
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 19
Oracle NoSQL DB Release 3.0
More applications, more use cases
– Primary and Secondary Indexes (expanded data access)
– Indexes automatically maintained (fast and consistent)
– Provides sorted results
Higher performance, scalable implementation, low overhead
– Shard-local indexing low latency, transactionally consistent record access
– Parallel B-tree scans, locally ordered, merged result set
– Improved index cache utilization
Secondary Index Benefits
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 20
Get() API specifies index
Equality or range searches
Sorted, multi-column indexes
– Composite index on values
– Parallel Index Scans
– Ordered results
– Indexes on arrays
Oracle NoSQL DB Release 3.0 Secondary Indexes
userid firstname lastname email
Table
Users
Equality search on lastname + firstname
get all records for “Jones, Tom”
Equality search on lastname and range on firstname
get all records for “Jones” where firstname starts with “T”
Range or Equality search on lastname by itself
get all records for “Jones”
get all records where lastname starts with “Johns”
Can’t search on just firstname
plan add-index –table Users -name Users_idx1 –field lastname –field firstname
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 21
Secondary Index Storage
Pkey A Value A
F1 F2 F3 V1 V2 V3
Pkey B Value B
F1 F2 F3 V1 V2 V3 Skey A Pkey A
V2 V3 F1 F2 F3
Skey B Pkey B
V2 V3 F1 F2 F3
Skey A Pkey A
V1 F1 F2 F3
Skey B Pkey B
V1 F1 F2 F3
Primary Records
Secondary Indexes Shard 1
Writes
Reads
Shard 2
Shard N
Index on (V1)
Index on (V2, V3)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 22
Oracle NoSQL DB Release 3.0
Flexible configuration
– Primary Zone: low latency, durable operations (for production)
– Secondary Zone: asynchronous replication (for batch or globally
distributed data centers)
Better application workload management
– Topology-aware driver knows where to send queries
– Flexible application-level control, if needed
Secondary Data Center (Zones) Benefits
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 23
Oracle NoSQL DB Release 3.0
Primary Zones
– Durability guarantees
– Low latency writes, HA
2nd’ary Read-Only Zones
– Asynchronous replication
– Analytic workloads
– Report generation
Topology Aware Client Driver
Application controls
– Can restrict operations to specific zones
– New Read Consistency: No Master
Zones
DC1 DC2 DC3
Primary Zones
Reports
Batch Analytics
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 24
Oracle NoSQL DB Release 3.0
Protected Data Access
Simple, flexible user authentication
Comprehensive data encryption over the wire
Security Benefits
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 25
Configurable enforcement
Authentication
– User/Password
– Configurable client time-outs
– Oracle Wallet integration
– Internal components self-authenticate
Encryption over the wire
– All channels SSL encrypted
Data Access Protection
Oracle NoSQL DB Release 3.0 Security Overview
Store
Shard
M
Shard
M
R
Shard
M
R R
Application
NoSQL Driver
R R
R
Username
Password
SSL
SSL SSL
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 26
Best Practices
Tables
– Highest level abstraction, simple to model, familiar to developers
– System managed Secondary indices, Table evolution support
– Future: Security per table, Query Language
JSON Schemas
– Medium level abstraction, need to model keys (strings), appealing to JSON-centric applications
– Application managed Index Views, Schema evolution support
– Future: Limited security
Raw Key-Value
– Lowest level abstraction, need to model keys (strings), application serialized data, maximum
flexibility
– Application managed Index Views, record evolution and security – roll your own
Choosing a Data Model
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 27
Agenda
NoSQL Background
Release 3.0 Highlights
Customer Response
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 28
What We Have Heard from Customers
James Anthony, CTO, Passoker
“Oracle NoSQL already forms a critical component of our production environments, and the
enhancements in this new version take the product to a new level. We are particularly excited
about the secondary indexes and table functionality, and how this will provide significant
productivity and performance gains, as well as simplifying the code we use. In addition the
security enhancements allow us to ensure that we can meet the stringent security requirements
demanded by our client base”
Senior Data Architect, customer loyalty services provider
“Oracle NoSQL Database release 3.0 addresses the needs of Enterprises that want to leverage
NoSQL technology. For our company, the addition of security features like Encryption and
Authentication help us to fulfill our security requirements.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 29
What We Have Heard from Customers
Alok Pareek, Founder and Executive Vice President, WebAction
“The new release of Oracle NoSQL Database adds compelling value for developers and IT, like
security and data center monitoring enhancements which are critical for enterprise deployments.
For WebAction's data center automation application, we need to have a robust NoSQL back end
data store and Oracle NoSQL Database is a natural fit. The new table model and indexing
features are also a welcome addition to the latest release, and we plan to take advantage of
these features”
Various customers
“Combines best features from MongoDB and Cassandra”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 30
Oracle NoSQL DB Resources
Oracle.com
www.oracle.com/goto/bigdata
www.oracle.com/goto/nosql
Oracle Technology Network
http://www.oracle.com/technetwork/products/nosqldb/overview/index.html
Downloads, Documentation, Tutorials, White Papers are on OTN
“Oracle Big Data Handbook” on Amazon, Safari and others
“Oracle NoSQL Database: Real-Time Big Data Management for the
Enterprise” on Amazon, Safari and others
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 31
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 32
Appendix
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 33
Big Data Architecture
Data Warehouse Data Reservoir +
Oracle Big Data Connectors
Oracle Data Integrator
Oracle
Advanced
Analytics
Oracle
Database
Oracle Spatial
& Graph
Oracle NoSQL
Database
Cloudera Hadoop
Oracle R Distribution
Oracle Industry
Models
Oracle GoldenGate
Oracle Data Integrator
Oracle Event Processing
Oracle Event Processing
Apache Flume
Oracle GoldenGate
Oracle Advanced
Analytics
Oracle Database
Oracle Spatial
& Graph
Oracle Industry
Models
Oracle Data Integrator
Oracle NoSQL Database
Where does NoSQL fit?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 34
The NoSQL Landscape
NoSQL
Columnar & Key/Value
• Keyspaces, Tables & Records
• Key-based access
• Limited Transactions
• Broad set of use cases
Document
• Collections
• Document-based access
• JSON & XML
• “Objects as documents” use cases
Graph
• Interconnected graphs
• Relatedness-based access
• Properties and Graphs, RDF
• Specific use cases
• Developer- centric APIs
• Flexible schemas
• Partitioned/sharded data
• Horizontally scalable
• High Availability via Replication
• Integrated with Hadoop
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 35
Choose the RIGHT storage option for the job
Hadoop Distributed File
System (HDFS) Oracle NoSQL Database Oracle Database
File System Key-Value Database Relational Database
No inherent structure Simple data structure Complex data structures, rich SQL
High volume writes High volume random reads and
writes High volume OLTP with 2-PC
Limited functionality,
roll-your-own applications
Simple get/put high speed storage,
flex configuration
Security, Backup/Restore, Data life
cycle mgmt, XML, etc.
Batch Oriented Real-Time, web-scale specialized
applications
General purpose SQL platform,
multiple applications, ODBC, JDBC
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 36
NoSQL Technology Choices What’s Really Important?
Technical Feature Importance Why
Storage Model Not really Will merge over time
Specific Features Somewhat Application requirements?
Performance Somewhat Rapid changes, YMWV
Integration Critical Long term, Repetitive cost
Reliability/Support Critical Early products, Product
direction
Predictability Critical Production reqs & SLAs
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 37
Scalability Architecture – Applications View
Elastic Shards
(split, add, contract)
Store
Shard
M
Shard
M
R
Shard
M
R R
Application
NoSQL Driver
R R
R
Writes to elected
node
Reads from any
node in system
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 38
Metrics and Best Practices
No overhead, performs same as JSON schemas with AVRO
serialization
Use nested tables to encapsulate record types in a hierarchy
Use Arrays and Arrays of Records to store self contained sets
Record types can’t be indexed (future) -> flatten into simple types if
indexing is required
– UserName (FirstName, MI, LastName) -> FirstName, MI, LastName
Tables
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 39
Metrics and Best Practices
Same rationale as an RDBMS
– Reduces time for lookups/range scans
– Increases overhead for updates
– Provides sorted results
– Indexes are not “free” -- add only when benefitial
No optimizer -- application picks index to be used
Remember to calculate cache size requirement
New CLI option for get: -reportsize tells you the size of a key. Use output with
DBCacheSize
Indexes
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 40
Metrics and Best Practices
Data Centers may add write latency, depending on durability policy and
inter-data center latency
Options for tuning:
– Consider reducing durability policy ACK requirement if latency is high
– Simple rules
1. Allow Client Driver to perform load balancing
2. Use No-Master read consistency to restrict reads to replicas only
3. Use specific Secondary Zones to restrict read-only, batch, analytical
workloads
Data Centers/Zones