ROME 11-12 april 2014ROME 11-12 april 2014
OrientDB: a Document-Graph Database
ready for the Cloud
OrientDB Committer
Orie...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Relational Databases:
Everybody knows what a TABLE is
Everybody knows SQL
ROME 11-12 april 2014 - Luigi Dell’Aquila
These are tables,
Data ARE Tables!
ROME 11-12 april 2014 - Luigi Dell’Aquila
These are tables,
Data ARE Tables!
ROME 11-12 april 2014 - Luigi Dell’Aquila
These are tables,
Data ARE Tables!
ROME 11-12 april 2014 - Luigi Dell’Aquila
But this is not
ROME 11-12 april 2014 - Luigi Dell’Aquila
But this is not
ROME 11-12 april 2014 - Luigi Dell’Aquila
But this is not
ROME 11-12 april 2014 - Luigi Dell’Aquila
But this is not
ROME 11-12 april 2014 - Luigi Dell’Aquila
But this is not
ROME 11-12 april 2014 - Luigi Dell’Aquila
These are
GRAPHS!
ROME 11-12 april 2014 - Luigi Dell’Aquila
And sometimes
Representing them in tables
Can be difficult
And
Inefficient
ROME 11-12 april 2014 - Luigi Dell’Aquila
Think about it…
ROME 11-12 april 2014 - Luigi Dell’Aquila
When you write your code
You have to deal with
Links, References, Pointers
ROME 11-12 april 2014 - Luigi Dell’Aquila
When you write your code
You have to deal with
Collections and Maps
(and dynamic...
ROME 11-12 april 2014 - Luigi Dell’Aquila
When you write your code
You have to deal with
Nested and complex objects
ROME 11-12 april 2014 - Luigi Dell’Aquila
When you write your code
You have to deal with
Class hierarchies,
Inheritance, P...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Would You Like
A Storage Layer
That Supports ALL
These Conceps
Out Of The Box?
ROME 11-12 april 2014
This is why
Was born
- Luigi Dell’Aquila
ROME 11-12 april 2014 - Luigi Dell’Aquila
Two data models:
Graph
and
Document
ROME 11-12 april 2014 - Luigi Dell’Aquila
Classes, not Tables
create class Person
create class Student extends Person
sele...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Dynamic schema
create class Person
insert into Person (name, surname) values (“L...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Complex attributes
Update person
set address = {
“street”: “5th Ave”,
“city”: “N...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Physical links
(no Join!)
Update person set address.city =
(select from city whe...
ROME 11-12 april 2014 - Luigi Dell’Aquila
The Graph API
(TinkerPop Blueprints)
Traverse out(“Friend”) from
(select from Pe...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Every record has unique ID
Select from Person
{"result": [
{
"@rid": "#13:0",
"@...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Every record has unique ID
Select from Person
{"result": [
{
"@rid": "#13:0",
"@...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Every record has unique ID
Select from Person
{"result": [
{
"@rid": "#13:0",
"@...
ROME 11-12 april 2014 - Luigi Dell’Aquila
Record ID (RID)
=
Physical position
ROME 11-12 april 2014 - Luigi Dell’Aquila
Traversing relationships
=
Following a physical path
ROME 11-12 april 2014 - Luigi Dell’Aquila
It means:
• Accessing linked data is very efficient
• No calculation *
• Indepen...
ROME 11-12 april 2014 - Luigi Dell’Aquila
But OrientDB
Gives you more!
ROME 11-12 april 2014 - Luigi Dell’Aquila
Javascript In the Storage
Extend the query language
With you own functions
ROME 11-12 april 2014 - Luigi Dell’Aquila
Javascript functions
As REST services
ROME 11-12 april 2014 - Luigi Dell’Aquila
But of course you can use it
from
ROME 11-12 april 2014 - Luigi Dell’Aquila
90’s are gone
Today you need
ROME 11-12 april 2014 - Luigi Dell’Aquila
Scalability
ROME 11-12 april 2014 - Luigi Dell’Aquila
High availability
ROME 11-12 april 2014 - Luigi Dell’Aquila
Fault tolerance
ROME 11-12 april 2014 - Luigi Dell’Aquila
Today everybody
(with a little luck)
Can write a killer app
And reach billions o...
ROME 11-12 april 2014 - Luigi Dell’Aquila
provides:
Replication (Multi Master)
and
Sharding
Also on cloud infrastructures
ROME 11-12 april 2014 - Luigi Dell’Aquila
HAZELCAST HAZELCAST
HAZELCAST
Multi Master
ROME 11-12 april 2014 - Luigi Dell’Aquila
Example
ROME 11-12 april 2014 - Luigi Dell’Aquila
HAZELCAST HAZELCAST
HAZELCAST
Amazon
Elastic
Load
Balancing
+
Auto
Scaling
ROME 11-12 april 2014 - Luigi Dell’Aquila
HOWTO 1/3
Key pair
ROME 11-12 april 2014 - Luigi Dell’Aquila
HOWTO 2/3
Security group
ROME 11-12 april 2014 - Luigi Dell’Aquila
HOWTO 3/3
ROME 11-12 april 2014ROME 11-12 april 2014
http://www.orientechnologies.com
http://www.orientechnologies.com/training
http...
ROME 11-12 april 2014ROME 11-12 april 2014
http://www.orientechnologies.com/event/orientdb-
planet-first-conference-orient...
Upcoming SlideShare
Loading in …5
×

OrientDB: a Document-Graph Database ready for the Cloud - Dell'Aquila

703 views

Published on

Slides from Luigi Dell'Aquila talk @ codemotion roma 2014

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
703
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

OrientDB: a Document-Graph Database ready for the Cloud - Dell'Aquila

  1. 1. ROME 11-12 april 2014ROME 11-12 april 2014 OrientDB: a Document-Graph Database ready for the Cloud OrientDB Committer OrientDB Academy Coordinator at Orient Technologies LTD Project Manager at AssetData S.r.l. Email: l.dellaquila – at – orientechnologies.com Twitter: @ldellaquila Luigi Dell’Aquila
  2. 2. ROME 11-12 april 2014 - Luigi Dell’Aquila Relational Databases: Everybody knows what a TABLE is Everybody knows SQL
  3. 3. ROME 11-12 april 2014 - Luigi Dell’Aquila These are tables, Data ARE Tables!
  4. 4. ROME 11-12 april 2014 - Luigi Dell’Aquila These are tables, Data ARE Tables!
  5. 5. ROME 11-12 april 2014 - Luigi Dell’Aquila These are tables, Data ARE Tables!
  6. 6. ROME 11-12 april 2014 - Luigi Dell’Aquila But this is not
  7. 7. ROME 11-12 april 2014 - Luigi Dell’Aquila But this is not
  8. 8. ROME 11-12 april 2014 - Luigi Dell’Aquila But this is not
  9. 9. ROME 11-12 april 2014 - Luigi Dell’Aquila But this is not
  10. 10. ROME 11-12 april 2014 - Luigi Dell’Aquila But this is not
  11. 11. ROME 11-12 april 2014 - Luigi Dell’Aquila These are GRAPHS!
  12. 12. ROME 11-12 april 2014 - Luigi Dell’Aquila And sometimes Representing them in tables Can be difficult And Inefficient
  13. 13. ROME 11-12 april 2014 - Luigi Dell’Aquila Think about it…
  14. 14. ROME 11-12 april 2014 - Luigi Dell’Aquila When you write your code You have to deal with Links, References, Pointers
  15. 15. ROME 11-12 april 2014 - Luigi Dell’Aquila When you write your code You have to deal with Collections and Maps (and dynamic data structures!)
  16. 16. ROME 11-12 april 2014 - Luigi Dell’Aquila When you write your code You have to deal with Nested and complex objects
  17. 17. ROME 11-12 april 2014 - Luigi Dell’Aquila When you write your code You have to deal with Class hierarchies, Inheritance, Polymorphism
  18. 18. ROME 11-12 april 2014 - Luigi Dell’Aquila Would You Like A Storage Layer That Supports ALL These Conceps Out Of The Box?
  19. 19. ROME 11-12 april 2014 This is why Was born - Luigi Dell’Aquila
  20. 20. ROME 11-12 april 2014 - Luigi Dell’Aquila Two data models: Graph and Document
  21. 21. ROME 11-12 april 2014 - Luigi Dell’Aquila Classes, not Tables create class Person create class Student extends Person select from Person Polymorphic query: returns both instances of Person and Student
  22. 22. ROME 11-12 april 2014 - Luigi Dell’Aquila Dynamic schema create class Person insert into Person (name, surname) values (“Luigi”, “Dell’Aquila”) No need to fully specify the class structure, you can work in schemaless mode
  23. 23. ROME 11-12 april 2014 - Luigi Dell’Aquila Complex attributes Update person set address = { “street”: “5th Ave”, “city”: “NY” }, tags = [“developer”, “artist”, “geek”] Collections and embedded properties
  24. 24. ROME 11-12 april 2014 - Luigi Dell’Aquila Physical links (no Join!) Update person set address.city = (select from city where name = ‘Rome’) where name = ‘Luigi’ Select address.city.country.name from Person where name = ‘Luigi’ Dot notation instead of Join No need for foreign keys O(1) computational cost – compared to O(log N) in relational Join
  25. 25. ROME 11-12 april 2014 - Luigi Dell’Aquila The Graph API (TinkerPop Blueprints) Traverse out(“Friend”) from (select from Person where name = ‘Luigi’) while address.city = ‘Rome’ Find my friends network in my city (friends, firends of frineds, friends of friends of friends…) Deep traversal, no need to know in advance HOW deep
  26. 26. ROME 11-12 april 2014 - Luigi Dell’Aquila Every record has unique ID Select from Person {"result": [ { "@rid": "#13:0", "@class": “Person", "name": "Luigi", "surname": "Dell'Aquila", "friendOf": "#13:1" } ]}
  27. 27. ROME 11-12 april 2014 - Luigi Dell’Aquila Every record has unique ID Select from Person {"result": [ { "@rid": "#13:0", "@class": “Person", "name": "Luigi", "surname": "Dell'Aquila", "friendOf": "#13:1" } ]}
  28. 28. ROME 11-12 april 2014 - Luigi Dell’Aquila Every record has unique ID Select from Person {"result": [ { "@rid": "#13:0", "@class": “Person", "name": "Luigi", "surname": "Dell'Aquila", "friendOf": "#13:1" } ]}
  29. 29. ROME 11-12 april 2014 - Luigi Dell’Aquila Record ID (RID) = Physical position
  30. 30. ROME 11-12 april 2014 - Luigi Dell’Aquila Traversing relationships = Following a physical path
  31. 31. ROME 11-12 april 2014 - Luigi Dell’Aquila It means: • Accessing linked data is very efficient • No calculation * • Independent from cluster size ** • Deep traversal is allowed and encouraged *** * In RDMS, a Join is calculated EVERY TIME you execute a query ** RDBS use index-based optimization to speed up joins, but index access is O(log N), so it depends on data size – what about Big Data??? *** in RDMS multiple joins are inefficient (would you dare to write a query with 1000 joins?)
  32. 32. ROME 11-12 april 2014 - Luigi Dell’Aquila But OrientDB Gives you more!
  33. 33. ROME 11-12 april 2014 - Luigi Dell’Aquila Javascript In the Storage Extend the query language With you own functions
  34. 34. ROME 11-12 april 2014 - Luigi Dell’Aquila Javascript functions As REST services
  35. 35. ROME 11-12 april 2014 - Luigi Dell’Aquila But of course you can use it from
  36. 36. ROME 11-12 april 2014 - Luigi Dell’Aquila 90’s are gone Today you need
  37. 37. ROME 11-12 april 2014 - Luigi Dell’Aquila Scalability
  38. 38. ROME 11-12 april 2014 - Luigi Dell’Aquila High availability
  39. 39. ROME 11-12 april 2014 - Luigi Dell’Aquila Fault tolerance
  40. 40. ROME 11-12 april 2014 - Luigi Dell’Aquila Today everybody (with a little luck) Can write a killer app And reach billions of users
  41. 41. ROME 11-12 april 2014 - Luigi Dell’Aquila provides: Replication (Multi Master) and Sharding Also on cloud infrastructures
  42. 42. ROME 11-12 april 2014 - Luigi Dell’Aquila HAZELCAST HAZELCAST HAZELCAST Multi Master
  43. 43. ROME 11-12 april 2014 - Luigi Dell’Aquila Example
  44. 44. ROME 11-12 april 2014 - Luigi Dell’Aquila HAZELCAST HAZELCAST HAZELCAST Amazon Elastic Load Balancing + Auto Scaling
  45. 45. ROME 11-12 april 2014 - Luigi Dell’Aquila HOWTO 1/3 Key pair
  46. 46. ROME 11-12 april 2014 - Luigi Dell’Aquila HOWTO 2/3 Security group
  47. 47. ROME 11-12 april 2014 - Luigi Dell’Aquila HOWTO 3/3
  48. 48. ROME 11-12 april 2014ROME 11-12 april 2014 http://www.orientechnologies.com http://www.orientechnologies.com/training https://github.com/orientechnologies/orientdb/ Job opportunities: jobs@assetdata.it References
  49. 49. ROME 11-12 april 2014ROME 11-12 april 2014 http://www.orientechnologies.com/event/orientdb- planet-first-conference-orientdb-rome-italy/ OrientDB Planet

×