OrientDB uses Hazelcast to achieve a distributed configuration with multi-master replication. By using these together you can scale up horizontally by adding new servers without stopping or reconfigure the cluster. In this webinar, you’ll be introduced to OrientDB and how it compares to other NoSQL DBMS. You will also learn how and why Hazelcast is being used with OrientDB to achieve scale, elasticity and performance.
Both Hazelcast and Orient Technologies are providing professional open source support to their respective projects under the Apache software license.
2. Agenda
What is OrientDB
Master-Slave replication
New Distributed Architecture goals
Why we choose Hazelcast
Multi-Master replication features
Future roadmap
3. What is ?
Copyright (c) - Orient Technologies LTD 3
4. Best of both worlds
Graph Document
Performance Flexibility
Copyright (c) - Orient Technologies LTD 4
5. Complex Domains
Person
name
surname
phone
email
Customer Provider
type
delivery
discount
True Polymorphism
Copyright (c) - Orient Technologies LTD 5
6. ACID Transactions
db.begin();
try {
…
db.commit();
} catch( Exception e ) {
db.rollback();
}
Eventually consistency is cool,
but many times you need
full ACID transactions
distributed across servers
Copyright (c) - Orient Technologies LTD 6
7. SQL + extensions
Everybody knows SQL
We’ve just added a few new
operators and functions to support
Tree and Graphs concepts
9. Commercial Friendly
Apache license
FREE for any usage
!
We like to keep it simple for users:
no (A)GPL
Copyright (c) - Orient Technologies LTD 9
10. Is OrientDB a
Distributed
DBMS ?
Copyright (c) - Orient Technologies LTD 10
11. Short history
!
In 2012, we had a Master/Slave replication
!
While it scaled up well on reads, users
complained of a single Master node
bottleneck
It’s quite easy to scale up reads, the hard
part is to scale up both reads and writes
Copyright (c) - Orient Technologies LTD 11
12. How Master/Slave works
Copyright (c) - Orient Technologies LTD
12
C C C
Master
Node
Slave
Node
Slave
Node
Writes
Master
node is the
bottleneck
13. Master/Slave
!
PROS:
- Relatively easy to develop
!
CONS:
- The master is the bottleneck for writes
- No matter how many servers you have, the
throughput is limited by the Master node
Copyright (c) - Orient Technologies LTD 13
14. What happened to OrientDB's M/S architecture?
This is the old
MASTER/SLAVE
replication
Copyright (c) - Orient Technologies LTD 14
15. 2012: new architectural goals
Multi-Master: all the nodes must accept writes
Sharding: split data in multiple partitions
Better Fail-Over
Simplified configuration with Auto-Discovery
Copyright (c) - Orient Technologies LTD 15
16. How to achieve this?
We evaluated different approaches such as:
Akka (actor model)
JBoss Infinispan
Queue Engines: ActiveMQ, RabbitMQ, ZeroMQ
and Hazelcast, the winner!
Copyright (c) - Orient Technologies LTD 16
17. Why ?
!
- It has everything you need to build distributed software:
- Auto-discovery
- RPC
- Synchronization
- Queues and Topics
- Embeddable
- Easy API, good documentation
- Stable in terms of:
- Run-time
- API changes
- Mature product with many users in production
- Same license as OrientDB: Apache2
Copyright (c) - Orient Technologies LTD 17
20. Clients see the distributed configuration
C
Master
Node
updated distributed
configuration is broadcasted to
all the connected clients
Master
Node
Copyright (c) - Orient Technologies LTD 20
21. Auto-reconnect in case of failure
In case of failure, the
clients auto-reconnect to
C C
the available nodes
Master
Node
Master
Node
Copyright (c) - Orient Technologies LTD 21
22. Auto-deploy of databases
automatically deployed
C
to the new joining
Master
Node
C
Master
Node
DB are
nodes
C
C
DB DB
Copyright (c) - Orient Technologies LTD 22
24. Classes rely on Cluster to store records
1 class -> 1 cluster Class
Customer
customer
By default
Cluster
Copyright (c) - Orient Technologies LTD 24
25. Classes can be split into more clusters
Customer
customer_usa
Class
multiple clusters
and assign them to
customer_china
Define
each node
Cluster Cluster
customer_europe
Cluster
Copyright (c) - Orient Technologies LTD 25
34. Linear and Elastic scalability
C
Master
Node
C
on both read & writes!
Master
Node
C
C
Master
Node
C
C
C
C
Master
Node
C
C
C
C Master
Node
C
C
C
Master
Node
C
C
C
Master
Node
C
C
Copyright (c) - Orient Technologies LTD 34
35. Hazelcast’s role
Auto-Discovering (Multicast/TCP-IP/Amazon)
Queues for requests and responses
Store metadata in distributed Maps
Distributed Locks
Copyright (c) - Orient Technologies LTD 35
36. OrientDB’s Future Roadmap
OrientDB 2.0 (Sept 2014) has even better
performance: +300% improvement on all the
distributed operations
Pluggable conflict resolution strategy
Auto-discovery also by Clients
Copyright (c) - Orient Technologies LTD 36