Orient DB on the cloud - Cloud Party 2013
-
Upload
luigi-dellaquila -
Category
Technology
-
view
872 -
download
0
description
Transcript of Orient DB on the cloud - Cloud Party 2013
![Page 1: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/1.jpg)
Orient DB on the Cloud
Un approccio pratico
Gabriele De Carli - @Gabber_84 Luigi Dell’Aquila - @ldellaquila
![Page 2: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/2.jpg)
Cos’è Orient DB?
• NoSQL*
• Document/Graph Database
• REST/JSON
• Scalable
• Multi Platform
• ACID Transaction
![Page 3: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/3.jpg)
Il modello dei dati
• Database
• Cluster
• Class - Inheritance• Vertex/Edge• Document
• Schema• Schemaful• Schemaless• Schema-mixed
![Page 4: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/4.jpg)
Interfacce di interrogazione
• HTTP REST
• Native• Java• Scala• JavaScript• PHP• C• Ruby• .NET• Python• Node.js• Clojure
• Tinkerpop Blueprints compliant
![Page 5: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/5.jpg)
NoSQL ma…
![Page 6: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/6.jpg)
SQL!
![Page 7: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/7.jpg)
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”)
![Page 8: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/8.jpg)
Esempi
SELECT FROM CITY WHERE COUNTRY.NAME.substring(1,3).toUpperCase() = “TAL”
SELECT FROM AGENDA WHERE EMAIL MATCHES '\bA-Z0-9._%[email protected]?+\.A-Z?{2,4}\b’
SELECT MAX(INCOMING) AS MAX_INCOMING, MAX(COST) AS MAX_COST FROM BALANCE
![Page 9: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/9.jpg)
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)
![Page 10: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/10.jpg)
Replication (high availability)
![Page 11: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/11.jpg)
Replication
HAZELCAST
![Page 12: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/12.jpg)
Replication
HAZELCAST HAZELCASTmulticast
![Page 13: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/13.jpg)
Replication
HAZELCAST HAZELCAST
HAZELCAST
Multi Master
![Page 14: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/14.jpg)
Replication
HAZELCAST HAZELCASTmulticast
AWS
![Page 15: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/15.jpg)
Replication
HAZELCAST HAZELCAST
HAZELCAST
Amazon
Elastic Load
Balancing+
Auto Scaling
![Page 16: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/16.jpg)
Replication
• ~ 0 config
• Multi Master
• Load Balancing, Auto Scaling
• Fault Tolerant
![Page 17: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/17.jpg)
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
![Page 18: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/18.jpg)
HOW-TO 2/7
Amazon key pairs
![Page 19: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/19.jpg)
HOW-TO 3/7
Amazon security group
![Page 20: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/20.jpg)
HOW-TO 4/7
Amazon New Instance (T1 Micro)
![Page 21: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/21.jpg)
HOW-TO 5/7
Amazon New Instance (T1 Micro)
![Page 22: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/22.jpg)
HOW-TO 6/7
Orient/bin/orientdb.sh (+ link simbolico in /etc/rcX.d/)
![Page 23: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/23.jpg)
HOW-TO 7/7
Orient/config/hazelcast.xml
![Page 24: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/24.jpg)
DEMO
![Page 25: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/25.jpg)
Java (Graph API)
![Page 26: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/26.jpg)
Java (Graph API)
![Page 27: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/27.jpg)
JavaScript
![Page 28: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/28.jpg)
Risorse
![Page 29: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/29.jpg)
Web
http://www.orientdb.org/
http://www.orientechnologies.com/
https://github.com/orientechnologies/orientdb/
![Page 30: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/30.jpg)
Libri
![Page 31: Orient DB on the cloud - Cloud Party 2013](https://reader033.fdocuments.us/reader033/viewer/2022052522/554f62f4b4c9058a148b490d/html5/thumbnails/31.jpg)
Training & Certification
http://www.orientechnologies.com/training.htm