Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Sneak peek: Couchbase Analytics – Couchbase Connect New York 2017

169 views

Published on

Due to the lack of built-in analytics, many NoSQL database customers export data from their operational databases into analytical platforms that are installed and managed separately. This approach is complex to manage, costly to operate and makes application queries across both repositories difficult and error prone. But most importantly, it creates barriers to getting real-time operational analytics. The Couchbase Server Analytics service adds analytical capabilities to Couchbase Server, enabling real-time and ad hoc analytics over operational data, all within the same Couchbase cluster.
The Couchbase Analytics service, currently a Developer Preview feature, is the newest member of the Couchbase data platform family of services. This session will provide a sneak peek at this service, which delivers parallel evaluation of analytical queries on current data with minimal impact on the operational performance of the Couchbase cluster. We will share an architectural overview of the new service, the SQL++ based query interface, and a glimpse at the roadmap for this important new capability. We will also review the current technical resources, documentation, and deliver a demo.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Sneak peek: Couchbase Analytics – Couchbase Connect New York 2017

  1. 1. ©2017 Couchbase Inc. Sneak peek: Couchbase Analytics David Segleau Dir.Technical Product Marketing TillWestmann Sr. Director Server Development 1
  2. 2. ©2017 Couchbase Inc. Agenda • Vision • Queries in Couchbase Analytics • Couchbase Analytics from the Inside Out • What is in the Developer Preview? • Q&A 2
  3. 3. ©2017 Couchbase Inc. Why Analytics? • Customers want smarter applications • Trending data – what’s hot? • Recommendations – what’s next? • Availability and Utilization – quantity on hand, still available? • Enterprises want better insights • Patterns hidden in the data • Correlations and cohorts • Dashboards and predictions 3
  4. 4. ©2017 Couchbase Inc. Why Couchbase Analytics? • Support OLTP and OLAP in a single platform • Eliminate the need for a separate OLAP system • Eliminate ETL • Reduces latency • Reduces complexity • Enables more intelligent applications • Enable data exploration and ad hoc analytics 4
  5. 5. ©2017 Couchbase Inc. What is Couchbase Analytics? • Extend Couchbase Platform to power real-time analytics 5 • Ad-hoc queries (“Ask me anything!”) • Workload isolation • Independent scaling • Common programming model & data model • Unified management • Fast data synchronization Scale out architecture Query Mobile & IoT AnalyticsPreview Memory-first architecture Unified Programming Search Core Database Engine
  6. 6. ©2017 Couchbase Inc.©2017 Couchbase Inc. 6 Queries in Couchbase Analytics SQL++
  7. 7. ©2017 Couchbase Inc. SQL++ Data: Beer Sample { "name": "Piranha PaleAle", "abv": 5.7, "ibu": 0, "srm": 0, "upc": 0, "type": "beer", "brewery_id": "110f04166d", "updated": "2010-07-22 20:00:20", "description": "", "style": "American-Style PaleAle", "category": "NorthAmerican Ale" } { "name": "Commonwealth Brewing #1", "city": "Boston", "state": "Massachusetts", "code": "", "country": "United States", "phone": "", "website": "", "type": "brewery", "updated": "2010-07-22 20:00:20", "description": "", "address": [ ], "geo": { "accuracy": "APPROXIMATE", "lat": 42.3584, "lng": -71.0598 } } 7
  8. 8. ©2017 Couchbase Inc. SQL++: Simple Join "Get 3 beers with their breweries" SELECT bw.name AS brewer, br.name AS beer FROM breweries bw, beers br WHERE br.brewery_id = meta(bw).id ORDER BY bw.name, br.name LIMIT 3; [{ "brewer": "(512) Brewing Company", "beer": "(512) ALT" }, { "brewer": "(512) Brewing Company", "beer": "(512) Bruin" }, { "brewer": "(512) Brewing Company", "beer": "(512) IPA" }] 8
  9. 9. ©2017 Couchbase Inc. SQL++: Non-key Self Join "Get 3 beer names used by different breweries" SELECT b1.name AS beer, b1.brewery_id AS brewer1, b2.brewery_id AS brewer2 FROM beers b1, beers b2 WHERE b1.name = b2.name AND b1.brewery_id != b2.brewery_id ORDER BY b1.brewery_id LIMIT 3; [{ "brewer1": "aberdeen_brewing", "brewer2": "hoffbrau_steaks_brewery_2", "beer": "ScottishAle" }, { "brewer1": "aberdeen_brewing", "brewer2": "carlyle_brewing", "beer": "ScottishAle" }, { "brewer1": "aberdeen_brewing", "brewer2": "belhaven_brewery", "beer": "ScottishAle" }] 9
  10. 10. ©2017 Couchbase Inc. SQL++: Nested Outer Join "Get 2 breweries and the list of their beers" SELECT bw.name AS brewer, ( SELECT br.name, br.abv FROM beers br WHERE br.brewery_id = meta(bw).id ) AS beers FROM breweries bw ORDER BY bw.name LIMIT 2; [{ "beers": [ { "abv": 8.2, "name": "(512) Pecan Porter" }, { "abv": 5.8, "name": "(512) Pale" }, ... ], "brewer": "(512) Brewing Company" }, { "beers": [ { "abv": 7.2, "name": "21A IPA" }, { "abv": 5.8, "name": "North Star Red" }, ... ], "brewer": "21st Amendment Brewery Cafe" }] 10
  11. 11. ©2017 Couchbase Inc. SQL++: Grouping and Aggregation "Get all breweries that produce more than 37 beers" SELECT br.brewery_id, COUNT(*) AS num_beers FROM beers br GROUP BY br.brewery_id HAVING num_beers > 37 ORDER BY num_beers DESC; [{ "num_beers": 57, "brewery_id": "midnight_sun_brewing_co" }, { "num_beers": 49, "brewery_id": "rogue_ales" }, { "num_beers": 38, "brewery_id": "anheuser_busch" } ] 11
  12. 12. ©2017 Couchbase Inc. Couchbase Analytics DDL: Lifecycle 12 • Analytics extension for shadow datasets CREATE BUCKET beerbucket WITH { "name": "beer-sample", "nodes":"127.0.0.1" }; CREATE SHADOW DATASET beers ON beerbucket WHERE `type` = "beer"; CREATE SHADOW DATASET breweries ON beerbucket WHERE `type` = "brewery"; CONNECT BUCKET beerbucket WITH { "password": "!@#", "timeout": 2000 }; SELECT * FROM beers ORDER BY abv DESC LIMIT 12; DISCONNECT BUCKET beerbucket; DROP DATASET breweries ; DROP DATASET beers; DROP BUCKET beerbucket;
  13. 13. ©2017 Couchbase Inc.©2017 Couchbase Inc. 13 Couchbase Analytics from the Inside Out
  14. 14. ©2017 Couchbase Inc. Scale out architecture Query Mobile & IoT AnalyticsPreview Memory-first architecture Unified Programming Search Core Database Engine Why another service? • Extend Couchbase Platform to power real-time analytics 14 • Ad-hoc queries (“Ask me anything!”) • Workload isolation • Independent scaling • Common programming model & data model • Unified management • Fast data synchronization
  15. 15. ©2017 Couchbase Inc. Couchbase Query and Analytics 15  Many queries  Each touches a little data  Fewer queries  Each touches a lot of data Couchbase 4.x Query Couchbase Analytics Optimized for Analytics (OLAP) Optimized for Operations (OLTP)
  16. 16. ©2017 Couchbase Inc. Example: Join, Grouping, and Aggregation 16 "Get the 10 chattiest users in a timeframe" SELECT user.id, COUNT(message) AS count FROM gbook_messages AS message, gbook_users AS user WHERE message.author_id = user.id AND message.send_time BETWEEN "2001-11-28T09:57:13" AND "2001-11-29T09:57:13" GROUP BY user.id ORDER BY count DESC LIMIT 10;
  17. 17. ©2017 Couchbase Inc. Couchbase Query and Analytics – PerformanceTradeoff 17 1m (<10) 1h (<500) 1d (<5000) Join GBy CBA Join GBy N1QL GSI 1w (<25K) 1mo (<100K) 3mo (<300K) 6mo (<600K) Join GBy CBA Join GBy N1QL GSI interval (# records)
  18. 18. ©2017 Couchbase Inc. Couchbase Analytics Coupling 18 • Separate services, separate nodes • Multi-Dimensional Scaling • Workload isolation • Parallel shadowing of data(sets) via DCP • Low impact on data nodes • Low latency 18 ANALYTICS ANALYTICS ANALYTICS ANALYTICS DATA DATA DATA OLTP OLAP
  19. 19. ©2017 Couchbase Inc.©2017 Couchbase Inc. 19 What’s in the Developer Preview?
  20. 20. ©2017 Couchbase Inc. What is in the Developer Preview? • Extend Couchbase Platform to power real-time analytics 20 • Ad-hoc queries (“Ask me anything!”) • Workload isolation • Independent scaling • Common programming model & data model • Unified management • Fast data synchronization ✘ ✔ ✔ ✔ ✔ ✔ Scale out architecture Query Mobile & IoT AnalyticsPreview Memory-first architecture Unified Programming Search Core Database Engine
  21. 21. ©2017 Couchbase Inc. What is in the DP? 21 • Stand-alone service • HTTP APIs • SQL++ queries • Data shadowing • Minimal administration • Query workbench • SDK support • "Installer" • Zip-file • Shell script for single machine • Ansible scripts for local/EC2 installation CCDriver NCService NCDriver NCDriver NCService SQL++ Compiler HTTP API Workbench Metadata Manager Storage Manager Dataflo w Engi ne Storage Manager Dataflo w Engi ne
  22. 22. ©2017 Couchbase Inc. Try it out! 2222 https://www.couchbase.com/downloads
  23. 23. ©2017 Couchbase Inc.©2017 Couchbase Inc. Questions? 23
  24. 24. ©2017 Couchbase Inc.©2017 Couchbase Inc. ThankYou! 24
  25. 25. ©2017 Couchbase Inc. 25 The CouchbaseConnect mobile app Take our in-app survey!
  26. 26. ©2017 Couchbase Inc. 26 Share your opinion on Couchbase 1. Go here: http://gtnr.it/2eRxYWn 2. Create a profile 3. Provide feedback (~15 minutes)
  27. 27. ©2017 Couchbase Inc.©2017 Couchbase Inc. Follow us on social media Twitter @couchbase Facebook /couchbase Instagram @couchbase Linkedin /company/couchbase

×