Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle NOSQL Database A Practical Introduction – [Session# CON6779] Anand Chandak & Tim Goh Product Management Oracle NOSQL Database October 26, 2015
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement 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. 3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Agenda Introduction Oracle NoSQL Use Cases Product Demo Summary
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |5 What is Oracle NoSQL Database ReliableFlexibleFastSimple Advanced 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 © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle NoSQL Database for Business, Developers, IT Oracle Confidential – Internal/Restricted/Highly Restricted6 Setup, Admin, API & Integration Built-in HA, Predictable Performance Parallel Access & Scale-out Simple: Fast: Flexible: Reliable: Flexible Schema & Agile Development “ Oracle NoSQL solution provides benefits straight out of the box such as replication, distribution of data, zero maintenance and overheads, low latency… the ability to scale out is really key to us.” - Stuart, Managing Director, Online Gaming Company
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Forrester Wave TM : NoSQL Key-Value Databases, Q Oracle Confidential – Internal/Restricted/Highly Restricted7 “Oracle’s NoSQL database, based on BerkelyDB, has strong adoption and maturity.” “…Oracle continues to do well in the NoSQL category with a comprehensive solution to support most enterprise needs. “ “Oracle NoSQL key-value database is a mature, high-performing, scale-out storage engine and provides transactional semantics, fine-grained concurrency, primary and secondary indexes, and high availability features. “ Comments from Forrester: Source: Forrester
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Query NoSQL data from Oracle Database and Hive Access NoSQL data from Hadoop and Spark for DW and analytics Share data with Oracle Coherence for extensible in-memory cache grid Persist history & event streams for processing with Oracle Event Processing Store & query RDF data using Oracle RDF for NoSQL Replicate changes in Oracle Database to NoSQL DB using Oracle Golden Gate Monitor your NoSQL cluster using Oracle Enterprise Manager 8 Enterprise ready -- Integrated out of the box
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |9 Where is NoSQL Database Used Simple Data Management Globally Distributed, “Always On” data Competitive Advantages of “Fast Data” Lower TCO, commodity HW scale-out ERP EAM Inventory Control Accting & Payroll Process Mgmt Business Analytics CRM … … Driver Application Real Time Event Processing Distributed, Web- scale Applications Online Gaming … … Mobile Data Management Time Series & Sensor Data Mgmt
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Elastic configuration Highly available Secondary indexes Flexible Schema (Tables / JSON / Binary) C, Java, Python & Node.js client APIs Data center support Secure access Oracle technology integrated Product Features and Architecture 10 Application Storage Nodes Datacenter B Storage Nodes Datacenter A Application NoSQL DB Driver Application NoSQL DB Driver Application
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Finance Large credit card network provider Fraud rule and history management 6,500 ops/sec, 85% update on read Manufacturing Large airline manufacturer Developing next generation planes 750K key inserts/sec, 6TB/hour 11 Telecoms Large mobile telecom operator Mobile personalized advertizing 24,000 ops/sec, 100% update on read Customer Loyalty Operationalize analytics to NoSQL Customer Portal Addressed processing conflicts 20M+ customers in multiple countries Oracle NoSQL Database Customer Success ……many more
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Pizza Delivery Business and Challenges 12 Tim’s 15,000 stores in 100 countries 17 billion pizzas a year 500 million deliveries a year 1.37 million deliveries a day 57,083 deliveries per hour
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | High quality pizza = customer satisfaction – No soggy crust, lukewarm cheese, cold pizza, crushed pizza – On-time delivery, friendly customer service Traffic challenges in some cities, metros, countries Driver safety, compensation, and well-being Increase profit from the business Support a fast growing business locally and globally Pizza Delivery Business Challenges
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Volume of data – 1.3 Million feeds every 15 minutes – # of operations / second ranges: 2,853 (average), 14,265 (peak), and more for sudden spike in orders Real-time data collection and analysis Variety of data & flexible schema – – Vehicle location, mileage, gas consumption, – Pizza Temperature – Vehicle profile, Driver profile, Customer profile, etc.. Ease of system scaling out with growing business expansion Pizza Delivery Technical Challenges
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Pizza Delivery – RDBMS Approach 15 Tim’s
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Oracle Confidential – Internal/Restricted/Highly Restricted16 RDBMS Data Model
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Pizza Delivery - NoSQL 17 Tim’s Application NoSQL DB Driver
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Oracle Confidential – Internal/Restricted/Highly Restricted18 Customer.Orders orderID : String OrderItems: { { pizza : { id: String Name : String …… } Toppings : { } } DeliveryAddress :{ building : String street : String } Receipt { amount : long tax : Integer …. } Hashtags: { } Customer customerID : Integer username : String firstName : String lastName : String Address: { street : String city : String state : String ……….. } twitterURL : Vehicle vin : String make : String model : String year : String fuelType ENUM Insurance { } Vehicle.trip timestamp: String driverID: Integer startOdometer: String distance: Integer …… Feeds { location : { } current Time : Long fuelUsed : Long temperature : String speed …… } NoSQL Data Model No Foreign Keys No Joins
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Oracle Confidential – Internal/Restricted/Highly Restricted19 NoSQL DB Driver Topology- and latency- aware for optimized read/write and HA Application Fleet Operational Feeds Pizza Fleet Management - Architecture Runs on commodity HW and Oracle Engineered Systems Horizontally scalable NoSQL data store for aggregated data capture and display
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 20 Pizza Fleet Management – Sample Tables
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Summary of what we saw in code… Get a handle to a KVStore Instance Create a NoSQL Table using Application code. Insert records into NoSQL Database Retrieve records from NoSQL Database
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Fleet Management dashboard - screenshots Order By BEST Mileage 22 Dials showing BEST or WORST mileage of fleets in REAL TIME. Line graph displaying historical performance for the selected fleets. Oracle NoSQL DB’s Secondary Index and Ordered query capability use to display statistics. Highlights
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Sample Code 23 /* Connect to the NoSQL store */ store = KVStoreFactory.getStore (new KVStoreConfig(storeName, hostName + ":" + hostPort)); tableAPI = store.getTableAPI(); /* Insert Feeds row, in the table */ Table table = tableAPI.getTable(“Vehicle.Trip"); Row row = table.createRow(); BufferedReader br= new BufferedReader(new FileReader("vehicle.trip.dat")); while ((feedJson = br.readLine()) != null) { //Read the Feed JSON …… } ArrayValue feeds = row.putArray(“Feeds”); row.put(“vin”,vin); … tableAPI.put(row, null (a return row), null(a write option)); …..put, putIfPresent, putIfAbsent, putIfVersion /* Catch possible Exceptions*/ Durability, Timeout, Illegal Argument, Fault Exceptions
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Sample Code – Part 1 24 /* Read vin row for dashboard, Create a primary key and assign the field value */ PrimaryKey key = fleetTable.createPrimaryKey(); key.put(“vin”, vin); Row row =tableAPI().get(key, new ReadOptions(null, 0, null)); …… or use multiGet, List myRows = tableAPI.multiGet(key, null, null); /* Read ordered Mileage, in a shard or in parallel across all shards*/ TableIteratorOptions tio = new TableIteratorOptions(direction, null, 0,null); /* get the index. Index on Vehicle Make */ indexKey = tripTable.getIndex(indexName).createIndexKey(); PrimaryKey key = fleetTable.createPrimaryKey(); rows = TableAPI().tableIterator(indexKey, null, tio); /* Catch possible Exceptions*/ Consistency, Timeout, IllegalArgument, Fault Exceptions
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Simple operations on huge volume and variety of data – Overwhelming amount of real-time data from the fleet are captured and processed Low latency – High write / read throughputs needed to produce accurate real-time fleet data analysis and for dashboard display Simple deployment – Simple deployment topology and configuration to support high throughput, ease of expansion, high durability, high availability, disaster recovery Lower cost of operations – More operations on less hardware; lower licensing costs; auto-rebalancing requires less administration. Oracle NoSQL Is The Right Solution For Tim’s Pizzeria
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Predictability, Reliability & Support Global, mission-critical application deployment experience Decades of enterprise-grade non-relational database technology Oracle Support available for both Enterprise and Community Edition Designed for Predictability and Manageability 26 Bulk Insert Test Cluster Expansion Test Rolling Upgrade Test
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What’s the big deal – Twitter sees ~500M tweets/day This is 350K a minute Capture all tweets with 3 commodity servers – 1.25M ops/sec – 2 billion records – 2 TB of data – 95% read, 5% update – Low latency, High Scalability 27 YCSB on SSD-backed commodity servers
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |28 Summary Advanced 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. Community -or- Enterprise Edition – Enterprise Edition Closed Source. Standard Oracle License – Community Edition has all of the basic functionality and APIs. Gets you started – Enterprise Edition for large, production, multi-data center, Oracle integration- centric customers and/or non-GPL compliant customers. Simple: setup, admin, integration Fast: parallel processing, throughputs Flexible: schema, agile development Reliable: HA, predictable performance
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle NoSQL Database at Open World TitleDate, Time, Location CON6779. Oracle NoSQL Database: A Practical IntroductionOct 26, 1:30PM, Mosc. South 308 HOL Oracle NoSQL Database for Administrators Oct 26, 5:00 PM & Oct 27, 5:30 PM Hotel Nikko - Bay View (25 th floor) CON2532. Using Oracle NoSQL Database to Prioritize High-Value CustomersOct 26, 5:15 PM, Mosc. South 254 CON8782: Oracle NoSQL Database and the Internet of ThingsOct 27, 12:15 PM, Mosc. South 306 MTE9622. Oracle NoSQL Database: Meet the ExpertsOct 27, 7:15 PM -- Mosc. South 303 CON8778. Oracle NoSQL Database: What’s New – Functionality and Use CasesOct 28, 11:00 AM -- Mosc. South 308 THT Oracle NoSQL Database for Financial ServicesOct 28, 4:00PM, Mosc. South, Big Data Showcase HOL Oracle NoSQL Database for Application Developers Oct 28, 2:45 PM & Oct 29, 2:00 PM Hotel Nikko - Bay View (25 th floor) CON8082. Oracle NoSQL DB for Developers—REST, JavaScript, Python, and Text SearchOct 29, 9:30AM PM -- Mosc. South 308 NoSQL DB Booth SLD-029 – Mosc. South DemoGrounds, Left SideSept 29, Sept 30, Oct 1 29
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The preceding 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 © 2015, Oracle and/or its affiliates. All rights reserved. |
32 Create Data Schema
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |33 Load and Write Demo Data – Part 1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |34 Load and Write Demo Data – Part 2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |35 Read Data