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.

Presentation of OrientDB v2.2 - Webinar

2,286 views

Published on

After 11 months of development, we're happy to announce OrientDB v.2.2.

Published in: Software
  • Be the first to comment

Presentation of OrientDB v2.2 - Webinar

  1. 1. What’s New in OrientDB v2.2? Next Generation DBMS with a Native Multi-Model Engine Luca Garulli, CEO and Founder
  2. 2. What’s OrientDB? Quick Overview
  3. 3. Confidential The OrientDB Journey 1998 2009 2010 2011 20152012 20142013 Orient ODBMS: First ever ODBMS with index-free adjacency OrientDB: First ever multi-model DBMS released as Open Source AdoptionR&D 2016 0 12K 70K 3K 1K 200 Downloads/m v2.2 is GA! (May 18, 2016)
  4. 4. OrientDB is a Multi-Model DBMS Object Key/Valu e Multi-Model represents the intersection of multiple models in just one product
  5. 5. Confidential Polyglot vs Multi-Model Polyglot (NoSQL 1.0) Multimodel (NoSQL 2.0) Polyglot Persistence is a fancy term to mean that when storing data, it is best to use multiple data storage technologies, chosen based upon the way data is being used by individual applications or components Multi-model databases are intended to offer the data modelling advantages of polyglot persistence without its disadvantages. complexity, in particular, is reduced. The first multi-model database was OrientDB. https://en.wikipedia.org/wiki/Multi-model_databasehttp://www.jamesserra.com/archive/2015/07/what-is-polyglot-persistence/ ECOMMERCE PRODUCT CATALOG SHOPPING CART RECOMMENDATI ON ECOMMERCE PRODUCT CATALOG SHOPPING CART RECOMMENDATI ON TRANSACTIONA L TRANSACTIONA L SEARCH SEARCH SPATIAL SPATIAL
  6. 6. Confidential Complexity Quadrant RelationshipComplexity> Data Complexity > Relational Key Value Column Graph Document Multi-Model
  7. 7. Confidential Increasing Global Footprint OrientDB climbed 24 positions on the DB-Engines.com ranking being the technology with the highest year-on-year growth within the top 50.
  8. 8. OrientDB Stability Quality and Transparency
  9. 9. Confidential Quality & Transparency - Code Coverage • OrientDB is the only DBMS with Code Coverage public metrics • Code Coverage (line) from 55% of v2.1 to 66% of v2.2 (consider that the code base grew also)
  10. 10. Confidential Quality & Transparency - Issues Considering the functionality/complexity of OrientDB, our open bugs are significantly lower than the average of other Open Source DBMSs
  11. 11. Confidential 24x7 Support Service We introduced 24x7 support with 2h SLA. (>60% of our existing clients upgraded from 10x5 to 24x7)
  12. 12. OrientDB v2.2 Top Features
  13. 13. Confidential Live Query Typical scenario: Poll the database to check for updates Problem 1: Execute many requests consuming resources Problem 2: No real-time notification
  14. 14. Confidential Live Query - Action! Live Query allows you to work in Reactive Mode: the DBMS pushes updates to the client Much less resources consumed Real-time notification
  15. 15. Confidential Live Query - SQL Example Receives all the updates on any order LIVE SELECT FROM Order Receives all the updates only for orders placed in Austin LIVE SELECT FROM Order WHERE address.city = ‘Austin’ Receives updates when any stocks has an update of >1$ LIVE SELECT FROM Stock WHERE variationUSD > 1 Receives updates when any arriving flights have delays LIVE SELECT FROM ArrivingFlights where delay > 0
  16. 16. Confidential Live Query - Java Example class MyLiveQueryListener implements OLiveResultListener { public List<ORecordOperation> ops = new ArrayList<ORecordOperation>(); @Override public void onLiveResult(int iLiveToken, ORecordOperation iOp) throws OException { System.out.println("New result from server for live query "+iLiveToken); System.out.println("operation: "+iOp.type); System.out.println("content: "+iOp.record); } public void onError(int iLiveToken) { } public void onUnsubscribe(int iLiveToken) { } } // Instantiate the query listener MyLiveQueryListener listener = new MyLiveQueryListener(); // Execute the query List<ODocument> result = db.query(new OLiveQuery<ODocument>( "live select from Test", listener));
  17. 17. Confidential Live Query - Node.js Example var OrientDB = require('orientjs'); var server = OrientDB({host: 'localhost', port: 2424}); var db = server.use({name: 'test', username: 'admin', password: 'admin'}); db.liveQuery("live select from V”) .on('live-insert', function(data){ //new record inserted in the database, var myRecord = data.content; // your code here... }) .on('live-delete', function(data){ //record just deleted, receiving the old content var myRecord = data.content; // your code here... }) .on('live-update', function(data){ //record updated, receiving the new content var myRecord = data.content; // your code here... })
  18. 18. Confidential For more information look at: http://orientdb.com/docs/last/Release-2.2.0.html#parallel-queries Parallel Query SELECT FROM V WHERE amount < 100 PARALLEL Activate: • query.parallelAuto enable automatic parallel query, if requirements are met. By default is false Tuning: • query.parallelMinimumRecords is the minimum number of records to activate parallel query automatically. Default is 300,000 • query.parallelResultQueueSize is the size of the queue that holds results on parallel execution. The queue is blocking, so in case the queue is full, the query threads will be in a wait state. Default is 20,000 results Manual usage Automatic usage
  19. 19. Confidential Command Cache Use it only if: • The Database is mostly reads (compared to writes) • There are a few heavy queries that result in small result sets • You have available RAM to use for caching results Stored under: databases/<your-db>/command-cache.json Default content: { "enabled": false, "evictStrategy": "PER_CLUSTER", "minExecutionTime": 10, "maxResultsetSize": 500 } For more information, look at http://orientdb.com/docs/last/Command-Cache.html. PER_CLUSTER: removes all the query results only related to the modified cluster. This operation is more expensive then INVALIDATE_ALL INVALIDATE_ALL removes all the query results at every Create, Update and Delete operation. This is faster than PER_CLUSTER if many writes occur.
  20. 20. Confidential Command Cache - Studio
  21. 21. Confidential Sequences Like with an RDBMS, this allows you to keep counters. Example: CREATE SEQUENCE idseq CREATE SEQUENCE mySequence TYPE CACHED START 1000 INCREMENT 1 CACHE 50 INSERT INTO account SET id = sequence('mySequence').next() ALTER SEQUENCE mySequence START 10000 DROP SEQUENCE mySequence They can be created as: •ORDERED (default) each call to .next() will result in a new value •CACHED, the sequence will cache N items on each node, thus improving the performance if many .next() calls are required. However, this may create holes For more information look at: http://orientdb.com/docs/last/Sequences-and-auto-increment.html.
  22. 22. Confidential Incremental Backup orientdb> connect plocal:/databases/mydb admin admin orientdb {db=Whisky}> backup database /tmp/backup -incremental The incremental backup setting also allows you to specify an LSN version to start with. Example: orientdb {db=Whisky}> backup database /tmp/backup -incremental=93222 Incremental Restore orientdb> create database remote:localhost/mydb root root plocal graph - restore=/tmp/backup Creating database [remote:localhost/mydb] using the storage type [plocal]... Connecting to database [remote:localhost/mydb] with user 'admin'...OK Database created successfully. Current database is: remote:localhost/mydb For more information look at: http://orientdb.com/docs/last/Incremental-Backup-And-Restore.html. Non-Stop Incremental Backup
  23. 23. Confidential For more information look at: http://orientdb.com/docs/last/Incremental-Backup-And-Restore.html. Incremental Backup - Studio Retention days are the number of days you want to keep the backup files on your hard drive
  24. 24. Confidential For more information look at: http://orientdb.com/docs/last/Incremental-Backup-And-Restore.html. Incremental Backup - Studio You can restore a backup with just one click
  25. 25. Confidential For more information look at: http://orientdb.com/docs/last/Incremental-Backup-And-Restore.html. Incremental Backup - Studio
  26. 26. Confidential Security - OSystem • OSystem is the server’s database • Server Users can be managed using this database • Contains Auditing Logs • Contains Backup/Restore Event Logs • In the future, it will contain Metrics too
  27. 27. Confidential Security - Password Hashing • PBKDF2 HASH algorithm with a 24-bit length SALT per user for a configurable number of iterations • Used for database and server users <user name=“root" password=“{PBKDF2WithHmacSHA256}2BC91B997B:3CBB55E954C48B771A6B5D2FDD8D7:65536” resources="*"/> SALT = 65536 by default {ALGORITHM} as prefix ensures back compatibility with previous OrientDB versions
  28. 28. Confidential Security - Encryption at REST orientdb> CONFIG SET storage.encryptionKey T1JJRU5UREJfSVNfQ09PTA== orientdb> CREATE DATABASE plocal:/tmp/db/encrypted-db admin admin plocal document -encryption=aes Create an encrypted database Encrypt only one cluster orientdb> ALTER CLUSTER Salary encryption aes Open an encrypted database orientdb> CONFIG SET storage.encryptionKey T1JJRU5UREJfSVNfQ09PTA== orientdb> CONNECT plocal:/tmp/db/encrypted-db admin admin
  29. 29. Confidential Security - Password Validator Password Validator is pluggable. Register your own implementation in security.json file The password validator in the bundle is flexible enough for most use cases
  30. 30. Confidential Security - Authenticator Authenticators are executed in chain, so the order matters Authenticators are pluggable. Register your own implementation in security.json file
  31. 31. Confidential Security - Kerberos Support Support for Kerberos authentication and full browser SPNEGO support. See the security configuration page for full details on configuring this authenticator for Kerberos.
  32. 32. Confidential Sends auditing logs to the SysLog daemon. Add this in config/orientdb-server-config.xml file: <!-- SYS LOG CONNECTOR, TO TURN ON SET THE 'ENABLED' PARAMETER TO 'true' --> <handler class="com.orientechnologies.security.syslog.ODefaultSyslog"> <parameters> <parameter name="enabled" value="true"/> <parameter name="debug" value="false"/> <parameter name="hostname" value="localhost"/> <parameter name="port" value="514"/> <parameter name="appName" value="OrientDB"/> </parameters> </handler> For more information look at: http://orientdb.com/docs/last/SysLog-Plugin.html Security - SysLog
  33. 33. Confidential Distributed - Easier Configuration Support for elastic configuration computed at run-time: writeQuorum: “majority” = N/2+1 writeQuorum: “all” = all nodes Static node ownership configuration: "client_usa": { "owner": "usa", "servers" : [ "usa", "europe", "asia" ] }
  34. 34. Confidential Distributed - Changed Transport B A C No more Hazelcast Queues. Now there’s a direct connection via the OrientDB Binary Protocol From 3x to 10x faster with just 3 nodes. With 10 nodes, it’s even 100x faster!
  35. 35. Confidential Distributed - Multi-Thread Execution A Parallel execution with the operations ordering guaranteed
  36. 36. Confidential Distributed - Delta Synchronisation B A C Only the delta is sent to the server Server Restart takes only a few seconds now! Server C is restarted
  37. 37. Confidential Distributed - Replica Server B A C writeQuorum: “majority” R1 R5R4R3R2 Master Servers = 3 Replica Servers = 5 Only Master Servers concur in the writeQuorum …
  38. 38. Confidential Distributed - Load Balancing B A C … Client Strategies: • STICKY (default) • ROUND_ROBIN_CONNECT • ROUND_ROBIN_REQUEST
  39. 39. Confidential Distributed - Improved Output 2016-06-01 16:19:10:384 INFO [asia] Distributed servers status: +------+------+------------------------------------+-----+---------+-----------------+-----------------+--------------------------+ |Name |Status|Databases |Conns|StartedOn|Binary |HTTP |UsedMemory | +------+------+------------------------------------+-----+---------+-----------------+-----------------+--------------------------+ |usa |ONLINE|GratefulDeadConcerts=ONLINE (MASTER)|4 |16:17:07 |192.168.1.88:2425|192.168.1.88:2481|133.92MB/491.00MB (27.28%)| |asia* |ONLINE|GratefulDeadConcerts=ONLINE (MASTER)|4 |16:18:56 |192.168.1.88:2427|192.168.1.88:2483|84.86MB/491.00MB (17.28%) | |europe|ONLINE|GratefulDeadConcerts=ONLINE (MASTER)|2 |16:18:32 |192.168.1.88:2426|192.168.1.88:2482|97.65MB/491.00MB (19.89%) | +------+------+------------------------------------+-----+---------+-----------------+-----------------+--------------------------+ Current node has * Server’s role (MASTER/REPLICA) per database Status Servers listen on Binary and HTTP ports
  40. 40. Confidential Distributed - Improved Output 2016-06-01 16:19:10:363 INFO [asia] New distributed configuration for database: GratefulDeadConcerts (version=44) LEGEND: X = Owner, o = Copy +-------------+-----------+----------+------+------+------+ | | | |MASTER|MASTER|MASTER| | | | |ONLINE|ONLINE|ONLINE| +-------------+-----------+----------+------+------+------+ |CLUSTER |writeQuorum|readQuorum| usa |europe| asia | +-------------+-----------+----------+------+------+------+ |* | 2 | 1 | X | o | o | |e_2 | 2 | 1 | o | o | X | |e_7 | 2 | 1 | o | X | o | |followed_by_1| 2 | 1 | o | X | o | |followed_by_2| 2 | 1 | o | X | o | |internal | 2 | 1 | | | | |ofunction_0 | 2 | 1 | o | X | o | |ofunction_1 | 2 | 1 | o | o | X | |orole_0 | 2 | 1 | o | X | o | |orole_1 | 2 | 1 | o | o | X | |oschedule_0 | 2 | 1 | o | X | o | |osequence_1 | 2 | 1 | o | o | X | |ouser_0 | 2 | 1 | o | X | o | |ouser_1 | 2 | 1 | o | o | X | |sung_by | 2 | 1 | o | X | o | |sung_by_6 | 2 | 1 | o | o | X | |v_3 | 2 | 1 | o | X | o | |v_7 | 2 | 1 | o | o | X | |written_by | 2 | 1 | o | X | o | |written_by_7 | 2 | 1 | o | X | o | +-------------+-----------+----------+------+------+------+ It’s much easier to understand which server owns which cluster
  41. 41. Confidential Distributed - New SQL Commands Remove a server from the configuration HA REMOVE SERVER <server-name> Force the resynchronisation of the entire database HA SYNC DATABASE Force the resynchronisation of one cluster HA SYNC CLUSTER <cluster-name>
  42. 42. Confidential Teleporter *Officially supported RDBMS: Oracle, Microsoft SQLServer, MySQL and Postgres
  43. 43. Confidential Teleporter First Results First 5 users’ feedback by importing from an Oracle DBMS to OrientDB using Teleporter: • Importing setup took less than 5 minutes • Importing of databases of 5 Million records from Oracle took about 30 minutes • Zero or Minor changes in queries • up to 10x increase in performance with simple queries (lookup on index and one JOIN) • up to 100x with complex traversal with +4 JOINs
  44. 44. Confidential Integration is the Key OrientDB ETL Teleporter JDBC Driver OrientDB can have a partial or complete copy of a RDBMS database. BI tools designed for RDBMS work on OrientDB too.
  45. 45. Confidential Enterprise Differentiation Core Features (Embedded, HA, Sharding, Replication, Console and GUI) Enterprise Features (Profiler, Incremental Backup, Auditing, Kerberos, Security and Encryption) Support (Product Support, Emergency Patches and Consultative Support) Additional Tools (Ops Manager and Teleporter) Community Enterprise License Open Source Apache 2 Commercial
  46. 46. Roadmap
  47. 47. Confidential Roadmap OrientDB v3.0 (Q4 2016) • Improve In-Memory Layout (mechanical-sympathy friendly) • 2x-5x Compression of Data on Disk and RAM • Improve Cross Data-Center Replication • Improve Teleporter to Import Automatically from Neo4j and MongoDB • Automatic Sharding (DHT + Pregel traversal) • TinkerPop Standard v3.0 support • New SQL Engine for faster Parallel and Distributed execution
  48. 48. Confidential Getting Started Course
  49. 49. Thank you! @orientdb OrientDB is a registered trademark by OrientDB LTD, all the other trademarks mentioned in this presentation are owned by their legit owners. Q&A For more information, look at: http://orientdb.com/docs/last/Release-2.2.0.html

×