Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1
2 NoSQL and Oracle RDBMS – A perfect fit Chao Huang Senior Manager, Oracle NoSQL Database development
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 3 What is Oracle NoSQL DB Elegant Simplicity A Cloud-scale Distributed Key-Value store with Multi-TBs to PBs capacity Transactional guarantees High availability Elastic Scaling Dynamic partitioning Predictable performance Simple administration
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 4 Oracle NoSQL DB Building Blocks Berkeley DB Java Edition Ideal Storage for Key-Value pairs ACID transactions High availability High throughput Simple administration Already proven in Amazon Dynamo Voldemort (Linkedin) GenieDB
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 5 Oracle NoSQL DB Building Blocks What’s added to BDB JE Dynamic Partitioning (aka Sharding) Intelligent routing of requests Load balancing Bounded latency Multi-Node backup Monitoring
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 6 Supported OS – Linux and Solaris 10 Oracle NoSQL DB is written in Java Java and C APIs Bindings available for Jython, Jruby, Clojure, Groovy, Rhino Compatibility Where Can You Use it ?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 7 What Versions Are Available ? Oracle NoSQL DB Community Edition (AGPL) Oracle NoSQL Enterprise Edition Extra features for enterprise use (External Tables, RDF/SPARQL, OEP, Coherence, SNMP) Enterprise Support
Copyright © 2013, Oracle and/or its affiliates. All rights reserved M ops/sec 2 billion records 2 TB of data 95% read, 5% update Low latency High Scalability YCSB Performance – Reads + Writes
Copyright © 2013, Oracle and/or its affiliates. All rights reserved K ops /sec 2 billion records Low latency Highly Scalable YCSB Performance - Inserts
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 10 Use Cases
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 11 NoSQL for Fraud Scoring Objectives Solution Benefits Application Data Ingestion Transaction Authorization Processor Transaction Authorization Processor Combine data sources for complex scoring Detect, alert analyst with low latency Handle burst seasonal transaction volumes Oracle Coherence cluster for real time transaction object management Oracle NoSQL Database for fraud model and customer profile management Oracle Database for statistics and fraud modeling-related data Simple data model, flexible transactions Scalable, Low Latency data management Easy configuration and administration Enterprise Support NoSQL DB Driver Financial Services coordinated theft prevention
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 12 Objectives Solution Benefits Centralized view of customer data within federated database environment Dynamic, customer influence tactics Oracle NoSQL database for central repository of meta data for customer activity, scheduling and “next generation experience” events Oracle database for financial data, reservation and property management Simple, flexible data format Highly scalable with predictable performance Enterprise support, technology commitment and roadmap NoSQL DB Driver Event Scheduling Application Event Scheduling Application Staff & End Customers Customer Profiles Customer Care & End Customers Reservation Systems NoSQL for Customer Experience Management Brand enhancement and loyalty enrichment
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 13 Objectives Solution Benefits Effective segmented advertizing platform Improve revenue by increasing granularity of market segmentation Oracle NoSQL database for cookie management and ad content lookup Oracle database and Hadoop/MapReduce for market segmentation analysis, ad generation and recommendation Oracle Database for complex analytics Ease of management and administration Scalability and predictable performance Integrated storage and processing technologies Enterprise support Multi-Dimensional Reporting NoSQL DB Driver Advertising Svr Acquire, Analyze, Prepare Content Delivery Business Users End Customers Web Click-stream NoSQL for Online Advertising Platform for real-time marketing
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 14 SKU Brand Price Color Strings Major key: Minor key: Byte Array Value: Macy’s $59.00, $21.99 Red,Blue, Green Image Rating Flexible Data Model Key-Value Pairs
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 15 Define major key path Define minor key path Create the key Retrieve the record Use Avro Bindings to deserialize in the application Reads /Smith/Bob/ - /birthdate /Smith/Bob/ - /phone /Smith/Bob/ - /image /Smith/Bob/ - /userID kvstore.get(myKey); kvstore.multiGet(myKey, null, null); kvstore.multiGetIterator (Direction.Forward, 100, myKey, null, null); kvstore.storeIterator (Direction.UNORDERED, 100, myKey, null, null); KeyRange kr = new KeyRange(“Bob”, true, “Pat”, true) Kvstore.storeIterator (Direction.UNORDERED, 100, myKey, kr, null); CRUD
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 16 Construct the key Construct the value – Avro format Use one of the put methods Writes CRUD /Smith/Bob/ - /birthdate /Smith/Bob/ - /phone /Smith/Bob/ - /image /Smith/Bob/ - /userID kvstore.put(myKey, myValue); kvstore.putIfAbsent(myKey, myValue); kvstore.putIfPresent(myKey, myValue); kvstore.putIfVersion(myKey, myValue, version);
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 17 Construct the key Use delete method Delete a specified version Delete multiple records with same major key Deletes CRUD /Smith/Bob/ - /birthdate /Smith/Bob/ - /phone /Smith/Bob/ - /image /Smith/Bob/ - /userID kvstore.delete(myKey); kvstore.deleteIfVersion(myKey, version); kvstore.multiDelete(myKey);
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 18 CRUD Sequence of Operations All records need to share the same major key Sequences only support write operations Sequence is performed in isolation
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 19 Write Durability Durability per Operation Check quorum
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 20 Read Consistency Consistency per Operation
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 21 CDR CDR01 CDR0N time0X s Data Modeling
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 22 Data Modeling Application TypeMajor KeyMinor KeyValue SessionUser/Session IDSession typeSession data AdvertisingCampaign IDCampaign typeAd content LogsTimestampApplication nameLog file SensorDevice IDDay or HourSensor data User dataUser nameContact, profileUser attributes ContentTitleDocument typeText, pdf, JSON/XML/HTML, Images, Video
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 23 SN – Physical (or virtual machine) with CPU + disk Each SN serves 1 or more replication nodes Each replication node is part of a single Shard Each Shard has 1 master Terminology Storage SN1 SN2 SN3 Shard 0 Rep Node Master Rep Node Replic a Shard N Rep Node Master Rep Node Replic a … Partitions Hash Fn Key Space
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 24 Provides linear scale-out of write ops/sec No need to develop sharding logic in Application Hash function to map a key to a partition Each partition is routed to a single shard Auto-Sharding Sharding Shard 0 Rep Node Master Rep Node Replic a Shard N Rep Node Master Rep Node Replic a … Partitions Hash Fn
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 25 Master-Slave replication Supports Heterogeneous platform hardware/OS/JVM Dynamic group membership Configurable consistency/durability Linear scale out for read ops/sec Logical Replication High Availability Replication Shard 0 Rep Node Master Rep Node Replica
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 26 Data Center Support Primary Data Center Proximity to application(s) accessing data SN's are preferred during elections Holds simple majority New HA feature required: ability to specify which nodes can participate in majority Secondary Data Center Holds current copy of data in case PDC dies Minority of replicas Assume sufficient B/W between PDC and SDC
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 27 Accessible from both command line (CLI) and web console Highly Available service Configure database, start and stop services, monitor performance Automatic Rebalancing SNMP and JMX support Roadmap – will be available via Oracle Enterprise Manager Administration Service Administration
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 28 Oracle NoSQL Extensions External Table Support Database External Table Metadata Data Dictionary External Table Queries Access Driver Data Formatter Layer NoSQL Driver Column1 | Colum2 | ColumnN Column1,| Colum2 | ColumnN CSV Output 1 Configuration File/table *.dat Files publish 2345
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 29 Oracle NoSQL Extensions Database Integration Oracle DB ODI, OLH External Tables
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 30 Oracle NoSQL Extensions Hadoop Integration Hadoop Cluster C or Java App KV Input Format
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 31 Oracle NoSQL Extensions Oracle Event Processing
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 32 Oracle NoSQL Extensions RDF Unified content metadata for federated resources Validate semantic and structural consistency Social Media Analysis Analysis Analyze social relations using curated metadata - Blogs, wikis, video - Calendars, IM, voice Semantic Metadata Layer Find related content & relations by navigating connected entities “Reason” across entities Text Mining & Entity Analytics
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 33 Why Oracle NoSQL Database It’s Oracle A trusted vendor here for the long term Scalable, Available with Predictable Latency Differentiating Features Always-On Elastic Processing Configurable ACID Transactions at scale Easy to use, Smart Topology configuration Integration with the Oracle technology stack High Performance Tested at scale Easier to manage We don’t loose transactions
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 34
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 35