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.

Getting Started with NuoDB Community Edition

401 views

Published on

These are the companion slides to our Getting Started with NuoDB Community Edition Webinar. (http://www.nuodb.com/resources/videos/webinar-getting-started-nuodb)

Published in: Software
  • Be the first to comment

  • Be the first to like this

Getting Started with NuoDB Community Edition

  1. 1. The elastic SQL database for hybrid cloud applications GETTING STARTED WITH NUODB February 15, 2017
  2. 2. LOGISTICS AND INTRODUCTIONS Christina Wong Director of Product Marketing 2 Boris Bulanov Vice President of Technology + All attendees are muted + Submit questions in the Q&A box on the right + Webinar is being recorded and will be available for replay
  3. 3. DATABASE MODERNIZATION LAGS BEHIND 3
  4. 4. POSSIBLE COMPROMISES 4 Traditional NoSQL Cloud Other NewSQL Familiar development (ANSI SQL) Maintain business database of record Straightforward to elastically scale Fast data access for the app Continuous availability Simple migration Deployment flexibility
  5. 5. WHAT’S NEEDED FOR CLOUD SUCCESS? 5 Virtualization, Commodity & Cloud Scale out / in ACID (consistency) Existing SQL skills & code SQL database abstraction What everyone wants: What they don’t want to lose “Elasticity” “SQL” “I want to elastically scale my SQL RDBMS to the cloud” Continuous Availability
  6. 6. NUODB, THE ELASTIC SQL DATABASE 6 Separate the application, transactions, and storage for elastic scalability In-memory transactions + Working data set + No shards / explicit partitioning + Scale throughput & clients on-demand Redundant, flexible storage + Durable persistence + Automatically replicate to multiple locations + Storage management independent of performance considerations One logical database + Both tiers survive failures and rolling upgrades at any peer + Allocate servers based on workload
  7. 7. A WALK THROUGH NUODB COMMUNITY EDITION
  8. 8. PROCESS + Introduction + Install + Manage + Run + Survive TOPICS TAKE-AWAYS + Simplicity  Dynamic configuration and management + Capacity on-demand  Elastic scale-out + Resilience  No single point of failure
  9. 9. TETE TE SM SM NuoDB ARCHITECTURE IN PRACTICE NuoDBdatabase App App App + Fully redundant + Elastically scalable + Continuously available Available host SM Storage Manager (SM) Transaction Engine (TE)TE Scale-out adds + Active/Active across single DC or multiple AZ’s
  10. 10. CE SAMPLE DEPLOYMENT TOPOLOGY 10 Host-0 Host-1 Host-2 Host-3 Host-4 B1 B2 B3 B4 SM 1 Journal Archive AP1 TE2 TE1 TE2
  11. 11. 1. INSTALL – PROVISION HOSTS + Provisioning hosts  Prepare • Machines are properly networked (for AWS see Appendix A) • Install on each host – see CE blog at http://www.nuodb.com/ce-tech-blog • Modify host configuration $ sudo vi /opt/nuodb/etc/default.properties • domainPassword = bird • peer = (SEE NEXT SLIDE)  Start Brokers $ sudo /opt/nuodb/etc/nuoagent start  Check Brokers $ /opt/nuodb/bin/nuodbmgr –-broker localhost –password bird nuodb [domain] > show domain summary 11
  12. 12. 1. INSTALL – CONFIGURE BROKERS 12 Host-0 Host-1 Host-2 Host-3 Host-4 B1 B2 B4 B3 peer = peer = host-1 peer = host-1 peer = host-1
  13. 13. 1. INSTALL – START DATABASE + Start Database  Create directory for database archive – ex. /home/ubuntu/dbs  Start SM nuodb [domain] > start process sm archive /home/ubuntu/dbs host host-4 database hockey initialize true  Start TEs nuodb [domain] > start process te host host-1 database hockey options '--dba-user dba --dba-password dba' nuodb [domain] > start process te host host-2 database hockey options '--dba-user dba --dba-password dba' nuodb [domain] > start process te host host-3 database hockey options '--dba-user dba --dba-password dba'  Pay attention to non-specified default parameters: • Commit – local (default) or remote – flexible commit protocol • Memory – 2GB (default) – garbage collection trigger 13
  14. 14. 1. INSTALL – POPULATE DATABASE + Populate Database $ /opt/nuodb/bin/nuosql hockey@localhost --user dba --password dba -- file /opt/nuodb/samples/quickstart/sql/create-db.sql $ /opt/nuodb/bin/nuosql hockey@localhost --user dba --password dba -- file /opt/nuodb/samples/quickstart/sql/Teams.sql $ /opt/nuodb/bin/nuosql hockey@localhost --user dba --password dba -- file /opt/nuodb/samples/quickstart/sql/Players.sql $ /opt/nuodb/bin/nuosql hockey@localhost --user dba --password dba -- file /opt/nuodb/samples/quickstart/sql/Scoring.sql 14
  15. 15. 1. INSTALL – PROVISIONED DATABASE 15 Host-0 Host-1 Host-2 Host-3 Host-4 B1 B2 B3 B4 TE2 TE1 TE3 SM 1 Journal Archive
  16. 16. 2. MANAGE – DOMAIN AND SYSTEM + DOMAIN - NuoDB Manager Utility $ /opt/nuodb/bin/nuodbmgr –-broker localhost –password bird nuodb [domain] > show domain health nuodb [domain] > show host properties host localhost + SYSTEM - NuoSQL client $ /opt/nuodb/bin/nuosql hockey –-user dba –-password dba SQL> select sqlstring, connid, nodeid from system.connections where handle = 1; SQL> select id, address, type, triptime from system.nodes; 16
  17. 17. 2. MANAGE – ENGINES AND SQL + ENGINES – Monitoring $ /opt/nuodb/bin/nuodbmgr –-broker localhost - -password bird --command "monitor domain" + SQL – Monitoring $ /opt/nuodb/bin/nuodbmgr --broker localhost --password bird --command "log database hockey categories sql-statements" 17
  18. 18. 3. RUN 18 Host-0 Host-1 Host-2 Host-3 Host-4 B1 B2 B3 B4 AP1 TE2 TE1 TE3 SM 1 Journal Archive
  19. 19. 3. RUN – JAVA CLIENT + Java Client Program … … 19
  20. 20. 3. RUN – COMPILE AND START + Compile $ javac -cp /opt/nuodb/jar/nuodbjdbc.jar SimpleDriver.java 20 Feb:12:19:37:14; work=1282.01op/s; time=4999.97; ave latency=2.05ms; ave tx=22.14ms Feb:12:19:37:19; work=1302.05op/s; time=10007.28; ave latency=2.04ms; ave tx=21.82ms Feb:12:19:37:24; work=1315.21op/s; time=15001.44; ave latency=2.02ms; ave tx=21.61ms Feb:12:19:37:29; work=1316.48op/s; time=20007.94; ave latency=2.03ms; ave tx=21.59ms Feb:12:19:37:34; work=1320.34op/s; time=25008.73; ave latency=2.02ms; ave tx=21.54ms Feb:12:19:37:39; work=1322.23op/s; time=30009.95; ave latency=2.02ms; ave tx=21.50ms Feb:12:19:37:44; work=1322.23op/s; time=30009.95; ave latency=2.02ms; ave tx=21.50ms Feb:12:19:37:44; Total statements=39,680; elapsed=30009.95ms (sleep=1404.909ms); rows=0; rate=1322.23op/s; ave latency=2.02ms; ave tx=21.50ms; + Run $ java -cp ./:/opt/nuodb/jar/nuodbjdbc.jar SimpleDriver -url jdbc:com.nuodb://localhost/hockey -user dba - password dba -threads 3 -time 60 -report 5 -batch 10
  21. 21. 4. SURVIVE - THE FAILURE SCENARIO 21 Host-0 Host-1 Host-2 Host-3 Host-4 B1 B2 B3 B4 AP1 TE2 TE1 TE3 SM 1 Journal Archive
  22. 22. + 1. Check Domain $ /opt/nuodb/bin/nuodbmgr –-broker localhost – password bird nuodb [domain] > show domain summary Database: hockey, (unmanaged), processes [3 TE, 1 SM], ACTIVE [TE]172.31.19.9:48005 [ pid = 6495 ] [ nodeId = 9 ] RUNNING [TE]172.31.26.217:48005 [ pid = 7232 ] [ nodeId = 11 ] RUNNING [SM]127.0.0.1:48005 [ pid = 1917 ] [ nodeId = 1 ] RUNNING [TE]172.31.29.177:48005 [ pid = 7609 ] [ nodeId = 8 ] RUNNING + 3. Kill TE nuodb [domain] > shutdown process Host: host-2 Process ID: 6495 Process shutdown cleanly 4. SURVIVE - START + 2. Check connections $ /opt/nuodb/bin/nuosql hockey –-user dba –- password dba SQL> select sqlstring, nodeid, connid from system.connections; SQLSTRING NODEID CONNID ------------------------------------------- ------- ------- SELECT * from User.Teams WHERE year < ? 9 22 SELECT * from User.Teams WHERE year < ? 9 23 9 24 select sqlstring, nodeid, connid from 9 25 SELECT * from User.Teams WHERE year < ? 11 9 11 10 11 11 11 12 8 25 SELECT * from User.Teams WHERE year < ? 8 26 8 27 22
  23. 23. + 4. Observe Client Application (change time parameter) $ java -cp ./:/opt/nuodb/jar/nuodbjdbc.jar SimpleDriver -url jdbc:com.nuodb://localhost/hockey -user dba -password dba -threads 3 -time 1000 -report 5 -batch 10 INFO: Feb:10:16:17:14; work=1342.00op/s; ave latency=2.12ms INFO: Feb:10:16:17:19; work=1342.00op/s; ave latency=2.12ms INFO: Feb:10:16:17:24; work=1342.00op/s; ave latency=2.12ms INFO: Feb:10:16:17:29; work=1343.00op/s; ave latency=2.12ms INFO: Feb:10:16:17:34; work=1344.00op/s; ave latency=2.11ms INFO: Feb:10:16:17:37; Communication failed with TE failing over... java.sql.SQLTransientConnectionException: End of stream reached INFO: Feb:10:16:17:37; Communication failed with TE failing over... java.sql.SQLTransientConnectionException: End of stream reached INFO: Feb:10:16:17:37; Communication failed with TE failing over… java.sql.SQLTransientConnectionException: End of stream reached INFO: Feb:10:16:17:39; work=1344.00op/s; ave latency=2.11ms INFO: Feb:10:16:17:44; work=1342.00op/s; ave latency=2.12ms INFO: Feb:10:16:17:49; work=1341.00op/s; ave latency=2.12ms 4. SURVIVE - CONTINUE + 5. Check connections $ /opt/nuodb/bin/nuosql hockey –-user dba –-password dba SQL> select sqlstring, nodeid, connid from system.connections; SQLSTRING NODEID CONNID ----------------------------------------- ------- ------- select sqlstring, nodeid, connid from system 8 28 8 29 SELECT * from User.Teams WHERE year < ? 8 30 8 31 SELECT * from User.Teams WHERE year < ? 8 32 8 33 11 13 11 14 11 15 SELECT * from User.Teams WHERE year < ? 11 16 11 17 23
  24. 24. PROCESS + Install + Manage + Run + Survive SUMMARY TAKE-AWAYS + Simplicity  Dynamic configuration and management + Capacity on-demand  Elastic scale-out + Resilience  No single point of failure
  25. 25. + Get started!  These Slides • To be sent following webinar  TechBlog Post w/installation details • www.nuodb.com/ce-tech-blog  GitHub Repository with samples • www.nuodb.com/github-getting- started QUESTIONS & NEXT STEPS + Upgrade for more robust features!  Jump Start program (for start-ups) • Free, fully redundant development database (2 TEs : 2 SMs) • www.nuodb.com/jump-start  Request evaluation • www.nuodb.com/evaluating-nuodb  Upgrade to Professional or Enterprise Edition • www.nuodb.com/contact-sales 25
  26. 26. APPENDIX A – AWS CONFIGURATION 26 + Recommended EC2 types  t2.micro • brokers only, experimenting  t2.large • development, functional test  r4.xlarge for TE • performance benchmarking with best memory per $  r3.xlarge for SM • performance benchmarking with best SSD per $  r4.xlarge/r3.xlarge and higher • production systems + Open ports in Security Groups  NuoDB default port range – 48004 – 49000  Example:

×