Orient DB on the cloud - Cloud Party 2013

1,616 views

Published on

OrientDB, graph/document database, portato sulla piattaforma cloud di Amazon

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,616
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
13
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Orient DB on the cloud - Cloud Party 2013

  1. 1. Orient DB on the Cloud Un approccio pratico Gabriele De Carli - @Gabber_84 Luigi Dell’Aquila - @ldellaquila
  2. 2. Cos’è Orient DB? • NoSQL* • Document/Graph Database • REST/JSON • Scalable • Multi Platform • ACID Transaction
  3. 3. Il modello dei dati • Database • Cluster • Class - Inheritance • Vertex/Edge • Document • Schema • Schemaful • Schemaless • Schema-mixed
  4. 4. Interfacce di interrogazione • HTTP REST • Native • Java • Scala • JavaScript • PHP • C • Ruby • .NET • Python • Node.js • Clojure • Tinkerpop Blueprints compliant
  5. 5. NoSQL ma…
  6. 6. SQL!
  7. 7. Esempi CREATE CLASS PERSON; INSERT INTO PERSON (NAME, SURNAME) VALUES (“MARIO”, “ROSSI”); SELECT * FROM PERSON WHERE SURNAME = “ROSSI”; SELECT NAME, SURNAME, ADDRESS.CITY.REGION.COUNTRY FROM PERSON WHERE SURNAME = “ROSSI” AND ADDRESS.CITY.REGION.COUTRY.CONTINENT.NAME = “EUROPE”; CREATE CLASS PERSON EXTENDS V; CREATE CLASS FRIEND EXTENDS E; CREATE VERTEX PERSON SET NAME = “MARIO”, SURNAME = “ROSSI” CREATE VERTEX PERSON SET NAME = “MARCO”, SURNAME = “VERDI” CREATE EDGE FRIEND FROM #10:1 TO #10:2 CREATE EDGE FRIEND FROM (SELECT FROM PERSON WHERE SURNAME = “ROSSI”) TO (SELECT FROM PERSON WHERE SURNAME = “VERDI”)
  8. 8. Esempi SELECT FROM CITY WHERE COUNTRY.NAME.substring(1,3).toUpperCase() = “TAL” SELECT FROM AGENDA WHERE EMAIL MATCHES 'bA-Z0-9._%+-?+@A-Z0-9.-?+.A-Z?{2,4}b’ SELECT MAX(INCOMING) AS MAX_INCOMING, MAX(COST) AS MAX_COST FROM BALANCE
  9. 9. In più (in ordine sparso) • Supporto Transazionale • Javascript nativo • Funzioni • TinkerPop - Gremlin • Java Object API • Local/remote/embedded mode • Veloce! 150.000 record/secondo (flat, no index)
  10. 10. Replication (high availability)
  11. 11. Replication
  12. 12. Replication multicast
  13. 13. Replication Multi Master
  14. 14. Replication multicast AWS
  15. 15. Replication
  16. 16. Replication • ~ 0 config • Multi Master • Load Balancing, Auto Scaling • Fault Tolerant
  17. 17. HOW-TO 1/7 • Orient DB >= 1.6.0-SNAPSHOT • Istanziare una macchina su EC2 (Micro è OK) • Installare Orient DB (distributed) sulla macchina come servizio e configurare Hazelcast per usare AWS • Creare una AMI dall’istanza
  18. 18. HOW-TO 2/7 Amazon key pairs
  19. 19. HOW-TO 3/7 Amazon security group
  20. 20. HOW-TO 4/7 Amazon New Instance (T1 Micro)
  21. 21. HOW-TO 5/7 Amazon New Instance (T1 Micro)
  22. 22. HOW-TO 6/7 Orient/bin/orientdb.sh (+ link simbolico in /etc/rcX.d/)
  23. 23. HOW-TO 7/7 Orient/config/hazelcast.xml
  24. 24. DEMO
  25. 25. Java (Graph API)
  26. 26. Java (Graph API)
  27. 27. JavaScript
  28. 28. Risorse
  29. 29. Web http://www.orientdb.org/ http://www.orientechnologies.com/ https://github.com/orientechnologies/orientdb/
  30. 30. Libri
  31. 31. Training & Certification http://www.orientechnologies.com/training.htm academy@orientechnologies.com

×