Cloud Barcamp Roma: OrientDB (su Libero Cloud) e le sue peculiarità

796 views

Published on

Graph Database: OrientDB, un approccio pratico by Luca Garulli - CEO di Orient Technologies Ltd. & Luigi Dell'Aquila - Software Architect.
OrientDB è un graph/document database nato e sviluppato attorno ai concetti e ai linguaggi web: come utilizzarlo (ovunque) per creare un'architettura in cloud per sviluppare applicazioni distribuite.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
796
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Cloud Barcamp Roma: OrientDB (su Libero Cloud) e le sue peculiarità

  1. 1. Orient DB su Libero Cloud Luigi Dell’Aquila - @ldellaquila
  2. 2. 1979 Primo DB relazionale disponibile sul mercato Copyright © 2010 Luca Garulli - www.orientechnologies.com
  3. 3. RDBMS In 30 anni abbiamo imparato a ragionare in termini di: • Tabelle • Chiavi/Join • SQL • Indici
  4. 4. Ma in 30 anni… • Internet • Big Data • Cloud • Nuovi modelli di dati e di analisi • I tempi e i cambiamenti!
  5. 5. La modellazione ER Logic scheme Physical scheme Optimization, denormalization
  6. 6. La modellazione Domain Data Model ER Logic scheme Physical scheme Optimization, denormalization
  7. 7. La modellazione id Name Surname Address 1 John Smith 3 id Street City 3 Rue de la Vie 4 id City Contry 4 Paris 15 id Coutnry 15 France
  8. 8. La modellazione id Name Surname 1 John Smith id person Street City type 3 1 Rue de la Vie 4 5 id City Contry 4 Paris 15 id Coutnry 15 France id Type 5 Home
  9. 9. La modellazione id Name Surname 1 John Smith id person Street City 3 1 Rue de la Vie 4 id person address type 1 1 3 5 id City Contry 4 Paris 15 id Coutnry 15 France id Coutnry 5 Home
  10. 10. Le query Select country.name from country Join city on country.id = city.country Join address on city.id = address.city Join personAddress on personAddress.address = address.id Join addressType on addressType.id = personAddress.type Join person on personAddress.person = person.id Where person.name = “John” And addressType.name = “home”
  11. 11. E questo? Amici degli amici… degli amici: Select * from ???
  12. 12. Questo è un grafo, non una tabella Amici degli amici… degli amici: “Traverse”
  13. 13. 1979 Primo DB relazionale disponibile sul mercato 2009 NoSQL movement Copyright © 2010 Luca Garulli - www.orientechnologies.com
  14. 14. Cos’è Orient DB? • NoSQL • Graph Database • REST/JSON • Scalable • Multi Platform • ACID Transaction
  15. 15. Il modello dei dati • Class - Inheritance • Vertex/Edge • Document • Schema • Schemaful • Schemaless • Schema-mixed
  16. 16. Interfacce di interrogazione • HTTP REST • Native • • • • • • • • • • • Java Scala JavaScript PHP C Ruby .NET Python Node.js Clojure Tinkerpop Blueprints
  17. 17. NoSQL ma…
  18. 18. SQL!
  19. 19. Esempi 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” SELECT NAME, SURNAME, ADDRESS.CITY.REGION.COUNTRY FROM PERSON WHERE SURNAME = “ROSSI” AND ADDRESS.CITY.REGION.COUTRY.CONTINENT.NAME = “EUROPE”; 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”)
  20. 20. Esempi SELECT FROM CITY WHERE COUNTRY.NAME.substring(1,3).toUpperCase() = “TAL” SELECT FROM AGENDA WHERE EMAIL MATCHES 'bAZ0-9._%+-?+@A-Z0-9.-?+.A-Z?{2,4}b’ SELECT name, $path, $depth FROM ( TRAVERSE * FROM Movie WHERE $depth <= 5 )
  21. 21. 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)
  22. 22. Replication (high availability)
  23. 23. Replication • ~ 0 config • Multi Master • Full replica or Sharding • Fault Tolerant • Automatic rerouting • Perfetto per il cloud!
  24. 24. Replication HAZELCAST
  25. 25. Replication HAZELCAST multicast HAZELCAST
  26. 26. Replication HAZELCAST HAZELCAST Multi Master HAZELCAST
  27. 27. DISTRIBUTED HOW-TO 1/1 • Unzip Orient DB package (>= 1.6.0) • bin/dserver.sh
  28. 28. OrientDB e Libero Cloud • Coming soon! • Registrazione e prova gratuita • http://cloud.libero.it/
  29. 29. DEMO
  30. 30. Risorse
  31. 31. Web http://www.orientdb.org/ http://www.orientechnologies.com/ https://github.com/orientechnologies/orientdb/
  32. 32. Libri
  33. 33. Training & Certification http://www.orientechnologies.com/training.htm academy@orientechnologies.com

×