Big Data Community Webinar vom 16. Mai 2019: Oracle NoSQL DB im Überblick
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Die Oracle NoSQL DB im Überblick
Ein Key-Value Store mit nativer Unterstützung für JSON,
der auch Graphen und SQL “kann”
Karin Patenge | karin.patenge@oracle.com | @kpatenge
Principal Solution Engineer | BU Cloud & Core Technologies
Oracle Deutschland B.V. & Co. KG
Webinar | Big Data & Data Warehouse Community | 16. Mai 2019
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
3
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Agenda
Merkmale der Oracle NoSQL DB – Kurze Einführung
Die administrative Sicht
Die Sicht der Anwendungsentwicklung
Was wir heute nicht mehr besprechen (können)
Ihre Fragen
1
2
3
4
5
4
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Merkmale der Oracle NoSQL DB – Kurze Einführung
Die administrative Sicht
Die Sicht der Anwendungsentwicklung
Was wir heute nicht mehr besprechen (können)
Ihre Fragen
1
2
3
4
5
5
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Verschiedene Programmier-
APIs inklusive SQL
• Einfache GET/PUT
Operationen
• Datenmodelle:
• Key-Value (KVStore)
• JSON
• Table
• Graph (über Big Data
Spatial and Graph)
• BASE und ACID unterstützt
• Sekundärindizes
• Freie Community Edition
über Apache 2.0 Lizenz
• Basic Edition inkludiert in
Oracle DB EE Lizenz
Kurze Übersicht:
Technische Merkmale der Oracle NoSQL DB
Text
Datenbank
Kern-
Funktionalität
Fokus auf
Anwendungs-
entwicklung
Enterprise-
Grade
Software
• Verteilte Datenhaltung (Sharding)
• Flexibel, horizontal skalierbar (Shared
nothing)
• Vorhersagbare, geringe Latenzzeiten
• Hoher Durchsatz
• Hochverfügbar, ausfallsicher
• REST Interface für Administration
• Monitoring über JMX
• Geringer Administrationsaufwand
• Einfach zu erweitern, auch geografisch verteilt
• Automatisches Rebalancing
• Kerberos, Authentication
• Verschüsselte Daten (Transport/Speicherung)
• Time-To-Live (Daten mit “Verfallsdatum”)
• Mandantenfähigkeit (über Namespaces)
• Starke Integration in das Oracle Tech Portfolio
6
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Als Datenmanagementplattform für
Anwendungen, die:
– Hohe Datenvolumina produzieren und/oder
konsumieren, typischerweise in hoher
Geschwindigkeit oder durch die Menge an
Datenquellen
– Antworten auf Nutzeranfragen in Echtzeit oder
nahezu Echtzeit liefern müssen
– Sich häufig verändernde Datenmodelle
unterstützen müssen
– Sich elastisch an dynamische Arbeitslasten
anpassen müssen
• Branchenübergreifend
8
Und wofür setzen Sie die Datenbank / den KVStore ein?
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Informationen und Download
• Aktuelle Version 19.1.8
– Anpassungen an Release Cycle und Versionierung analog der Oracle DB
• Oracle Technology Network (OTN)
– Download (als .zip bzw. .tar.gz – Server, Examples, Treiber)
• Enterprise und Community Edition
www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads
• Basic Edition
edelivery.oracle.com
– Dokumentation (Server, Treiber, Get started, Tutorials, Videos, APIs, ...)
docs.oracle.com/en/database/other-databases/nosql-database
– Community
community.oracle.com/community/groundbreakers/database/nosql_database
9
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Merkmale der Oracle NoSQL DB – Kurze Einführung
Die administrative Sicht
Die Sicht der Anwendungsentwicklung
Was wir heute nicht mehr besprechen (können)
Ihre Fragen
1
2
3
4
5
10
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Architektur
Oracle NoSQL DB Application
NoSQLDB Treiber
SN1
RN1
SN5
RN5
SN9
RN9
SN2
RN2
SN6
RN6
SN10
RN10
SN3
RN3
SN7
RN7
SN11
RN11
SN4
RN4
SN8
RN8
SN12
RN12
SN13
RN13
SN14
RN14
SN15
RN15
SN16
RN16
RN17
RN18
SN17
RN19
RN20
RN21
Storage Nodes
Capacity = 1 Capacity = 3
Replication Factor = 3
(Total # of RNs in a Shard)
RM
Shard1 Shardn
R RM R
Shards ≡ Replication Groups WRITE  Master Replica Node (RN)
READ  Least busy Replica Node (Master or Replica)
11
Oracle NoSQL DB Application
NoSQLDB Treiber
Oracle NoSQL DB Application
NoSQLDB Treiber
Load Balancer / Web Server
Über External Tables
(setzt NoSQL DB EE
voraus)
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Beispiel 3x3 Cluster
• 3 Shards
• 3 Storage Nodes
• Beliebig erweiterbar
– Zusätzliche Zones
– Zusätzliche Shards
– Zusätzliche Storage Nodes
Storage
Node 3
(Capacity = 3)
Storage
Node 2
(Capacity = 3)
Storage
Node 1
(Capacity = 3)
M R R
M
R
RR
R M
Shard 1
Shard 2
Shard 3
Erläuterungen :
Shard ≡ Replication Group
Primary Zone ≡ Primary Data Center
M = Master
R = Replikat
Primary Zone
Get(shardKey=4567)
MD5Hash(4567)
Application
NoSQL DB Driver
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Deployment Optionen (I)
Eigene Verantwortung für
• Sizing
• Hardware: Netzwerk, Compute
Instanzen, Storage
• Installation, Upgrade, Patches
aller beteiligten Software
Komponenten
• Configuration, Deployment
• Load Balancing
13
„Do-it-yourself“ NoSQL DB Cluster
• Auf eigener Hardware
• Auf Oracle Cloud Infrastructure (OCI) Ressourcen
– mit Bare Metal Shapes
tinyurl.com/nosqldbbaremetal
– mit VM Shapes
tinyurl.com/nosqldbvmshapes
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• 3 Compute Instanzen mit je 3 Block Volumes attached
verteilt auf die 3 Availability Domains in Frankfurt
• Freigabe der Ports über Security Lists
[nosql@kp-nosql-db-ad1-0 ~]$ ./pingkvstore.sh
Pinging components of store kvstore based upon topology sequence #136
120 partitions and 3 storage nodes
Time: 2019-03-11 10:40:56 UTC Version: 18.3.10
Shard Status: healthy:3 writable-degraded:0 read-only:0 offline:0 total:3
Admin Status: healthy
Zone [name=Frankfurt id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false] RN
Status: online:9 read-only:0 offline:0 maxDelayMillis:0 maxCatchupTimeSecs:0
Storage Node [sn1] on 10.0.0.4:5000 Zone: [name=Frankfurt id=zn1 type=PRIMARY
allowArbiters=false masterAffinity=false] Status: RUNNING Ver: 18.3.10 2019-01-10
02:48:19 UTC Build id: 2e51533ae0d0 Edition: Enterprise
Admin [admin1] Status: RUNNING,MASTER
Rep Node [rg1-rn1] Status: RUNNING,REPLICA sequenceNumber:498 haPort:5031
available storage size:94 GB delayMillis:0 catchupTimeSecs:0
Rep Node [rg2-rn1] Status: RUNNING,REPLICA sequenceNumber:514 haPort:5032
available storage size:94 GB delayMillis:0 catchupTimeSecs:0
Rep Node [rg3-rn1] Status: RUNNING,MASTER sequenceNumber:500 haPort:5033
available storage size:94 GB
Storage Node [sn2] on 10.0.1.3:5000 Zone: [name=Frankfurt id=zn1 type=PRIMARY
allowArbiters=false masterAffinity=false] Status: RUNNING Ver: 18.3.10 2019-01-10
02:48:19 UTC Build id: 2e51533ae0d0 Edition: Enterprise
Admin [admin2] Status: RUNNING,REPLICA
Rep Node [rg1-rn2] Status: RUNNING,MASTER sequenceNumber:498 haPort:5031
available storage size:94 GB
Rep Node [rg2-rn2] Status: RUNNING,REPLICA sequenceNumber:514 haPort:5032
available storage size:94 GB delayMillis:0 catchupTimeSecs:0
Rep Node [rg3-rn2] Status: RUNNING,REPLICA sequenceNumber:500 haPort:5033
available storage size:94 GB delayMillis:0 catchupTimeSecs:0
Storage Node [sn3] on 10.0.2.3:5000 Zone: [name=Frankfurt id=zn1 type=PRIMARY
allowArbiters=false masterAffinity=false] Status: RUNNING Ver: 18.3.10 2019-01-10
02:48:19 UTC Build id: 2e51533ae0d0 Edition: Enterprise
Admin [admin3] Status: RUNNING,REPLICA
Rep Node [rg1-rn3] Status: RUNNING,REPLICA sequenceNumber:498 haPort:5031
available storage size:94 GB delayMillis:0 catchupTimeSecs:0
Rep Node [rg2-rn3] Status: RUNNING,MASTER sequenceNumber:514 haPort:5032
available storage size:94 GB
Rep Node [rg3-rn3] Status: RUNNING,REPLICA sequenceNumber:500 haPort:5033
available storage size:94 GB delayMillis:0 catchupTimeSecs:0
14
Beispiel: Deployment 3x3 Cluster auf OCI mit VM Shapes
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Voraussetzungen
– Java 8 oder höher
• Installation
– Download der Software
• Empfehlung: Server & Examples
– Nutzer „nosql“ anlegen
– Auspacken der Software
– Verzeichnisse einrichten
– Umgebungsvariablen setzen
• Deployment in 3 Schritten
1. makebootconfig
2. Starten der Storage Node Agents
3. Topologie deployen
15
Deployment: Ein paar Schritte zum NoSQL DB Cluster
[nosql@kp-nosql-db-ad1-0 scripts]$ cat makebootconfig.sh
#!/bin/bash
# Login as user nosql
# Use the makebootconfig utility to generate the configuration. We do this for each storage node
# -root the KVROOT directory
# -host node hostname or IP address
# -port specifies the registry port used by the Storage Node Agent
# -admin specifies the port used by Administration Service to listen for HTTP connections
# -harange specifies the range port used by the replication nodes and Administration
services
# -capacity specifies number of a Replication Nodes supported by Storage Node
# -num_cpus used when multiple Replication Nodes are configured on a Storage Node. If the
value is 0, the system will attempt to query the Storage Node to determine the number of processors
on the machine.
# -memory_mb total memory available for the cache and heap sizes. If the value is 0, the
store will attempt to determine the amount of memory on the machine, but that value is only
available when the JVM used is the Oracle Hotspot JVM.
# -store-security specifies if security will be used or not. In this example no security is used.
########### Bootstrap Storage Node 1 ##########
java -Xmx64m -Xms64m -jar $KVHOME/lib/kvstore.jar makebootconfig 
-root $KVROOT 
-host 10.0.0.4 
-port 5000 
-admin-web-port 5010 
-servicerange 5015,5025 
-harange 5030,5050 
-capacity 3 
-admindir /disk1/ondb/admin 
-admindirsize 50_GB 
-store-security none 
-memory_mb 6000 
-storagedir /disk1/ondb/data 
-storagedirsize 250_GB 
-storagedir /disk2/ondb/data 
-storagedirsize 250_GB 
-storagedir /disk3/ondb/data 
-storagedirsize 250_GB 
-rnlogdir /disk1/ondb/rnlog 
-rnlogdir /disk2/ondb/rnlog 
-rnlogdir /disk3/ondb/rnlog
echo " Done bootstrapping storage-node 1"
################################################
[nosql@kp-nosql-db-ad1-0 scripts]$
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Optionen
– Admin CLI
> java -jar $KVHOME/lib/kvstore.jar
runadmin -port 5000 -host localhost
-store kvstore
– REST Interface
• Setzt „admin-web-port“ in
makebootconfig voraus
• Wird automatisch gestartet
• Doku
https://docs.oracle.com/en/database/other
-databases/nosql-database/19.1/rest-
admin/index.html
16
Deployment prüfen
[nosql@kp-nosql-db-ad1-0 scripts]$ curl -i -X POST
"http://10.0.0.4:5010/V0/nosql/admin/topology" -d '{"command":"show"}'
HTTP/1.1 200 OK
access-control-allow-origin: *
content-type: application/json
content-length: 2972
X-content-type-options: nosniff
content-disposition: attachment; filename=api.json
Connection: keep-alive
{
"operation" : "show topology",
"returnCode" : 5000,
"description" : "Operation ends successfully",
"returnValue" : {
"storeName" : "kvstore",
"numPartitions" : 120,
"sequenceNumber" : 136,
"zns" : [ {
"resourceId" : "zn1",
"name" : "Frankfurt",
"repFactor" : 3,
"type" : "PRIMARY",
"allowArbiters" : false,
"masterAffinity" : false
} ],
"sns" : [ {
"resourceId" : "sn1",
"hostname" : "10.0.0.4",
"registryPort" : 5000,
"zone" : {
"resourceId" : "zn1",
"name" : "Frankfurt",
"repFactor" : 3,
"type" : "PRIMARY",
"allowArbiters" : false,
"masterAffinity" : false
},
"capacity" : "3",
"rootDirPath" : "/home/nosql/kvroot",
...
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Oracle Big Data Appliance
www.oracle.com/de/engineered-systems/big-data-appliance/
– Schnelles Setup, skalierbar, kosteneffizient (TCO)
– Vorintegrierte Full Rack Konfiguration
• Oracle's Sun x86 Servers
• InfiniBand und Ethernet Konnektivität
– Vorinstallierte SW Komponenten
• Cloudera Enterprise Technology Software inkl. Cloudera
CDH, Cloudera Manager, Cloudera Impala, Apache
Kafka, Apache Spark, ..., NoSQL DB CE, Oracle R, Big
Data Spatial and Graph, Big Data SQL, Konnektoren
– Perfekt ausbalanziert
– Erweiterbar
Deployment Optionen (II)
17
Engineered Systems mit NoSQL DB
– Einfaches Testen auf vorgefertigter Big Data
Lite VM (Zustimmung zu Oracle Big Data Lite
License Agreement)
tinyurl.com/oracle-bdl-vm-411
> java -jar
$KVHOME/lib/kvstore.jar kvlite
– Quickstart to KVLite
docs.oracle.com/en/database/other-
databases/nosql-database/19.1/kvlite/quick-start-
kvlite.pdf
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Oracle NoSQL DB Cloud Service
• Zielgruppe: Anwendungsentwicklung
• Verfügbar seit August 2018
– cloud.oracle.com/nosql
– Provisioniert auch über RZ in Frankfurt
• Fully-managed Cloud Service
– Elastisch
– Schnell, vorhersagbare Performanz
– Flexible Datenmodelle
– Minimale Administration (Nutzer und
Berechtigungen)
– Umfangreiche Sicherheitsfunktionen
– Von On-Premises in die Cloud (und wenn gewollt
auch wieder zurück)
In wenigen Schritten nutzbar
1. Download Client Software und auspacken
2. Arbeitslast  Ressourcen bestimmen
3. Anwendung entwickeln und testen/simulieren
4. Cloud Service abonnieren und aktivieren
5. Nutzer/in anlegen und Zugriffsrechte vergeben
6. Credentials Datei anlegen
7. Anwendung anpassen, kompilieren und starten
18
Deployment Optionen (III)
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Deployment Optionen (IV)
• Paketieren, Deployen und Starten von Anwendungen im Container
• Fokus auf Unterstützung der Anwendungsentwicklung
• Oracle NoSQL DB CE – „kvlite“
Single node - Single shard Oracle NoSQL DB Store
$ docker run -d --name=kvlite oracle/nosql
• Überblick
blogs.oracle.com/nosql/oracle-nosql-database-on-docker
• Quickstart Running Oracle NoSQL DB in Docker
hub.docker.com/r/oracle/nosql/
19
Oracle NoSQL DB als Docker Container
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Import/Export von
JSON|BSON|MongoDB JSON
> java -jar $KVHOME/lib/kvtool.jar
import -external -store kvstore -
helper-hosts kp-nosql-db-ad1-
0:5000,kp-nosql-db-ad2-0:5000,kp-
nosql-db-ad3-0:5000 -config
import_config -format MONGODB_JSON -
status /home/nosql/checkpoint_dir -
verbose
• SQL Schnittstelle (nutzt Table API)
> java -jar $KVHOME/lib/sql.jar -
helper-hosts kp-nosql-db-ad1-0:5000 -
store kvstore
• Integration in
SQL Developer
• Integration in Oracle Enterprise Manager
– Monitoring des KV Store und der Storage
Nodes über Plug-In
– Voraussetzung: JMX enabled
plan change-parameters -service sn1 -wait -
params
mgmtClass=oracle.kv.impl.mgmt.jmx.JmxAgent
– EM Agent Prozess benötigt Leserecht auf
$KVROOT
20
Nützliche Werkzeuge
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Offline
• 3 Schritte
1. Stoppen aller Storage Nodes
2. Neue Software installieren
(auspacken) und neues $KVHOME
setzen
3. Starten aller Storage Nodes
• KVStore temporär nicht erreichbar
Online
• Rolling upgrades
• Setzt Replication Factor > 2 voraus
• Script-Beispiel im examples/update
Ordner
– Upgrade auf einem der Admin Knoten
– Überprüfen, ob Software
Anforderungen erfüllt sind
– Reihenfolge bestimmen für Upgrade
der einzelnen Storage Nodes
– Upgrade der Storage Nodes
(nacheinander)
21
Upgrades
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Die gleiche Datenbank on-premises und in der Cloud
22
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Detaillierte Informationen in der Dokumentation
23
docs.oracle.com/en/database/other-databases/nosql-database
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Merkmale der Oracle NoSQL DB – Kurze Einführung
Die administrative Sicht
Die Sicht der Anwendungsentwicklung
Was wir heute nicht mehr besprechen (können)
Ihre Fragen
1
2
3
4
5
24
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Oracle NoSQL DB
• Programmiersprachen
– Java, JavaScript, Python, C, C#
• Apache 2.0 Lizenz
– Unterstützte NoSQL DB APIs:
• Key-Value
• Table
• SQL
• Codebeispiele
– Examples Download
• Graph Datastore & Analytics
– Erfordert zusätzlich Big Data Spatial and Graph
Oracle NoSQL DB Cloud Service
• Programmiersprachen
– Java
– Python und JavaScript (in Vorbereitung)
• Tools
– Eclipse Plugin
• Codebeispiele
– Examples Verzeichnis im SDK
• Geplant:
– Migration von on-premises in die Cloud (Oracle
NoSQL DB Cloud Service)
25
Verfügbare Treiber
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
$ tree -d examples
examples
├── admin
├── coherence
├── externaltables
│ └── table
├── hadoop
│ ├── hive
│ │ └── table
│ └── table
├── hello
├── jmx
├── parallelscan
├── pubsub
├── security
├── seqnum
├── sql
├── table
└── upgrade
$ cat $KVHOME/examples/hello/HelloBigDataWorld.java
...
/**
* Performs example operations and closes the KVStore.
*/
void runExample() {
final String keyString = "Hello";
final String valueString = "Big Data World!";
store.put(Key.createKey(keyString),
Value.createValue(valueString.getBytes()));
final ValueVersion valueVersion =
store.get(Key.createKey(keyString));
System.out.println(keyString + " " +
new
String(valueVersion.getValue().getValue()));
store.close();
}
...
$ cd $KVHOME
$ javac -cp lib/kvclient.jar:examples
examples/hello/HelloBigDataWorld.java
$ java -Xmx256m -Xms256m -cp lib/kvclient.jar:examples
hello.HelloBigDataWorld -port 5000 -store kvstore -host
localhost
Hello Big Data World!
26
„Hello World“
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
import oracle.kv.*;
import java.security.SecureRandom;
import java.math.BigInteger;
public class InsertData
{
static KVStore store;
public static void main(String[] args)
{
//connecting to the NoSQL Database
KVStoreConfig config = new KVStoreConfig("kvstore",
"localhost:5000");
store = KVStoreFactory.getStore(config);
SecureRandom random = new SecureRandom();
for(int i=1;;i++)
{
String key = new BigInteger(130, random).toString(32);
Key mykey = Key.createKey( key );
try{
store.put(mykey,Value.createValue("data".getBytes()));
System.out.print("Transaction " + i + "
succeeded.r");
Thread.sleep(1000);
}
catch(Exception e){
System.err.println("Transaction " + i + " failed.");
}
}
}
}
27
Einfaches Befüllen des KVStore (Insert Data)
• Insert Prozess wird nicht unterbrochen
bei
– Änderungen an der Topologie des KVStore
– Bei Ausfall eines Clusterknoten
• Automatisches Rebalancing der Daten
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Mehr Beispielcode
• Github
github.com/oracle/nosql-examples
• Dokumentation
docs.oracle.com/en/database/other-databases/nosql-database/19.1/develop.html
28
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Detaillierte Informationen in der Dokumentation
29
docs.oracle.com/en/database/other-databases/nosql-database/19.1/develop.html
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Die Oracle NoSQL DB als Graph-Datenbank
30
Graph aus Daten von Meetup.com
Umgebung: Big Data Lite VM. Visualisierung mittels Cytoscape.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Beispiel für Nutzung Oracle NoSQL DB als Graph DB
// Start Groovy Shell connecting to Oracle NoSQL DB
cd /opt/oracle/oracle-spatial-graph/property_graph/dal/groovy
./gremlin-opg-nosql.sh
server = new ArrayList();
server.add("bigdatalite.localdomain:5000");
// Create a graph config that contains the graph name "meetup"
cfg = GraphConfigBuilder.forPropertyGraphNosql() 
.setName("meetup") 
.setStoreName("kvstore") 
.setHosts(server) 
.addVertexProperty("type", PropertyType.STRING, "NA") 
.addVertexProperty("city_name", PropertyType.STRING, "NA") 
.addVertexProperty("city_country", PropertyType.STRING, "NA") 
.addVertexProperty("city_member_count", PropertyType.INTEGER, 0) 
.addVertexProperty("group_country", PropertyType.STRING, "NA") 
.addVertexProperty("group_visibility", PropertyType.STRING, "NA") 
.addVertexProperty("group_members", PropertyType.INTEGER, 0) 
.addVertexProperty("group_name", PropertyType.STRING, "NA") 
.addVertexProperty("member_name", PropertyType.STRING, "NA") 
.addVertexProperty("topic_name", PropertyType.STRING, "NA") 
.addVertexProperty("topic_urlkey", PropertyType.STRING, "NA") 
.addVertexProperty("event_yes_rsvp_count", PropertyType.INTEGER, 0) 
.addVertexProperty("event_rating_count", PropertyType.INTEGER, 0) 
.addVertexProperty("event_rating_average", PropertyType.INTEGER, 0) 
.hasEdgeLabel(true) 
.setLoadEdgeLabel(true) 
.setMaxNumConnections(2).build();
Importieren eines Graphen (Knoten und Kanten) über Groovy Shell
// Create an instance of the graph
opg = OraclePropertyGraph.getInstance(cfg);
opg.setClearTableDOP(2);
opg.clearRepository();
opg.getKVStoreConfig();
// Create an instance for the graph loader
opgdl=OraclePropertyGraphDataLoader.getInstance();
vfile="/home/oracle/Documents/Meetup/data/meetup.opv
efile="/home/oracle/Documents/Meetup/data/meetup.ope
// Load data into the graph
opgdl.loadData(opg, vfile, efile, 2);
// Do some checks
// Count vertices and edges
opg.countVertices();
opg.countEdges();
// Get vertices and edges
opg.getVertices();
opg.getEdges();
...
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Beispiel für Nutzung Oracle NoSQL DB als Graph DB
Notebook für Graph-Analyse mittels vorimplementierter Algorithmen
www.oracle.com/technetwork/oracle-labs/parallel-graph-analytix/overview
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Oracle NoSQL Database Cloud Service
34
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Oracle NoSQL Database Cloud Service im Überblick
• Oracle NoSQL DB als Service
• Oracle NoSQL Cloud Treiber
– APIs für Anwendungsentwicklung
• Oracle NoSQL Cloud SDK(s)
– Entwicklungsumgebung
– Cloud Simulator zum Testen einer
Anwendung (Simuliert lokal den NoSQL DB
Cloud Service)
– Eclipse Plugin für Entwicklung
– Beispiel-Code und Dokumentation
35
Zielgruppe: Anwendungsentwicklung
cloud.oracle.com/nosql
+
+
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 36
Schritt 1: Download Client Software und Auspacken
• cloud.oracle.com/nosql/download
• Oracle NoSQL Cloud Treiber
– Aktuell: Java
• Oracle NoSQL Cloud SDK
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 37
Schritt 2: Arbeitslast  Ressourcen bestimmen (Sizing)
• Web-Formular zum Berechnen der
benötigten Kapazitäten
– tinyurl.com/nosqldbcapacityestimator
– Eingabewerte
• Durchschnittliche Satzgröße (Key plus Value)
• (Erwarteter) Schreibdurchsatz
• (Erwarteter) Lesedurchsatz
• Auswahl Absolute | Eventual Consistency
• Anzahl der erwarteten Datensätze
– Ausgabewerte
• Schreibeinheiten
• Leseeinheiten
• Voraussichtlich benötigter Speicher (GB)
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 38
Preiskalkulation für Beispiel aus Schritt 2
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Anwendungsbeispiel:
– BasicTableExample.java
• Legt Tabelle USERS an
• Fügt Datensätze ein (PUT)
• Lesen von Datensätzen (GET)
• Löschen eines Datensatzes
• Cloud Simulator starten
• Anwendung kompilieren
• Anwendung ausführen
39
Schritt 3: Anwendung entwickeln und testen / simulieren
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Kurzer Schwenk: Eclipse Plug-in
• Unterstützung für Anwendungsentwicklung mit Java
40
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 41
Schritt 4: Cloud Service abonnieren und aktivieren
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 42
Schritt 5: Nutzer*in anlegen und Zugriffsrechte setzen


Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Unterordner .andc anlegen im USER
Ordner
• Datei credentials erzeugen und Infos
eintragen zu:
– Benutzername, Passwort, Client ID, Client
Secret
• Entitlement ID notieren
– Identity Cloud Service > ANDC > Configuration
> Resources
43
Schritt 6: Credentials Datei erzeugen
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 44
Schritt 6: Zusätzliche benötigte Infos
• Entitlement ID • URL vom Identity Cloud Service
https://idcs-xxx.identity.oraclecloud.com
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 45
Schritt 7: Anwendung anpassen, kompilieren und starten
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Mehr Informationen
46
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Merkmale der Oracle NoSQL DB – Kurze Einführung
Die administrative Sicht
Die Sicht der Anwendungsentwicklung
Was wir heute nicht mehr besprechen (können)
Ihre Fragen
1
2
3
4
5
47
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Secure Store
• Mandantenfähigkeit
• Oracle NoSQL DB als Document
Store
• Volltextindexierung und -suche mit
ElasticSearch
• Deployment Automation
– Shell-Skripte
– Terraform (Infrastructure-as-Code)
• Automatisierung von Admin
Operationen über REST API
• Integration mit Oracle Datenbank
– Big Data SQL über External Tables
– Predicate Pushdown
• Verarbeitung von Streaming Daten
• ...
48
Heute nicht mehr im Fokus: Themen für Vertiefungen
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Merkmale der Oracle NoSQL DB – Kurze Einführung
Die administrative Sicht
Die Sicht der Anwendungsentwicklung
Was wir heute nicht mehr besprechen (können)
Ihre Fragen
1
2
3
4
5
50
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 51
@OracleNoSQL @kpatenge @OracleBUDB
karin.patenge@oracle.com
https://www.linkedin.com/groups/4147754/
Ausgabe 06/2018 (Dezember)
Keine Angst vor Key-Value-Stores: Einblicke in die Oracle NoSQL DB
Vielen Dank für Ihre Teilnahme !
Mehr DWH / Big Data Community Workshops & Seminare über: www.oracle.com/de/database/data-warehouse/community.html

Weitere ähnliche Inhalte

PDF
20190604_DOAGDatabase2019_OracleNoSQLDB_for_DBAs
PDF
Klonen von Exadata-Datenbanken mit der Oracle ZFS Appliance - Ein Erfahrungsb...
PDF
20160310_ModernApplicationDevelopment_NoSQL_KPatenge
PDF
Rsyslog - Deutsche Qualitätsarbeit für Linux
PDF
DOAG2018 / Oracle DB erfolgreich betreiben auf SPARC/LDoms/Solaris/ZFS
PPT
PDF
Ausgewählte Performance Technologien
PDF
Überblick zu Oracle Database 12c Release 2
20190604_DOAGDatabase2019_OracleNoSQLDB_for_DBAs
Klonen von Exadata-Datenbanken mit der Oracle ZFS Appliance - Ein Erfahrungsb...
20160310_ModernApplicationDevelopment_NoSQL_KPatenge
Rsyslog - Deutsche Qualitätsarbeit für Linux
DOAG2018 / Oracle DB erfolgreich betreiben auf SPARC/LDoms/Solaris/ZFS
Ausgewählte Performance Technologien
Überblick zu Oracle Database 12c Release 2

Was ist angesagt? (20)

PDF
PDF
Keepalived & HA-Proxy as an alternative to commercial loadbalancer - August 2014
PDF
Komprimierung in der Oracle Datenbank (Stand 11gR2, 12c)
PDF
Oracle12c für Entwickler
PPTX
Dockerize It - Mit apex in die amazon cloud
PPTX
Storage Spaces Direct - Introduction
PPTX
Spezialitäten der Oracle Lizenzierung - DOAG Konferenz 2010 - OPITZ CONSULTI...
PDF
Sql best practices for SharePoint 2010
PDF
Platz da! Platz schaffen auf dem Domino Server - Vortrag von Ulrich Krause be...
PDF
SharePoint 2016 das fliegen lernen - SQL Server Performance Optimierung
PPTX
Neues zur Oracle Lizenzierung - DOAG Konferenz 2011 - OPITZ CONSULTING - Mic...
PDF
DOAG 2018 / Praktische Erfahrungen mit SPARC S7-2 Server
PDF
bccon-2014 adm06 hony,_i_shrunk_the_data
PPTX
Automatisiertes disaster recovery testing mit der oracle cloud
PDF
Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...
PDF
OSDC 2011 | GlusterFS by Thomas Halinka
PDF
Oracle Engineered Systems - Chance oder Risiko?
PDF
Ausgewählte PL/SQL Packages (1)
PDF
Private Cloud mit Open Source
PPTX
Best Practices SharePoint and SQL Installation
Keepalived & HA-Proxy as an alternative to commercial loadbalancer - August 2014
Komprimierung in der Oracle Datenbank (Stand 11gR2, 12c)
Oracle12c für Entwickler
Dockerize It - Mit apex in die amazon cloud
Storage Spaces Direct - Introduction
Spezialitäten der Oracle Lizenzierung - DOAG Konferenz 2010 - OPITZ CONSULTI...
Sql best practices for SharePoint 2010
Platz da! Platz schaffen auf dem Domino Server - Vortrag von Ulrich Krause be...
SharePoint 2016 das fliegen lernen - SQL Server Performance Optimierung
Neues zur Oracle Lizenzierung - DOAG Konferenz 2011 - OPITZ CONSULTING - Mic...
DOAG 2018 / Praktische Erfahrungen mit SPARC S7-2 Server
bccon-2014 adm06 hony,_i_shrunk_the_data
Automatisiertes disaster recovery testing mit der oracle cloud
Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...
OSDC 2011 | GlusterFS by Thomas Halinka
Oracle Engineered Systems - Chance oder Risiko?
Ausgewählte PL/SQL Packages (1)
Private Cloud mit Open Source
Best Practices SharePoint and SQL Installation
Anzeige

Ähnlich wie Big Data Community Webinar vom 16. Mai 2019: Oracle NoSQL DB im Überblick (20)

PDF
Oracle Database 12c Release 2
PDF
20181210_ITTage2018_OracleNoSQLDB_KPatenge
PDF
Oracle Technology Monthly Oktober 2017
PDF
Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)
PDF
Roadshow Oracle Database 12c: News & Features
PDF
200 verteilte Oracle- Server mit Ansible ausrollen
PDF
Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?
PDF
fn project serverless computing
PDF
OC|Webcast: Oracle Lizenzierung - Lizenznews 2021
PDF
Boost your APEX Deployment and Provisioning with Docker
PDF
Effizienter Hardware LifeCycle auf Oracle SPARC M7 Server
PDF
20181120_DOAG_OracleNoSQLDB_KPatenge
PDF
Praktische Erfahrungen mit den kleinen SPARC S7-2 Servern
PPTX
Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13
PDF
Überblick Oracle Datenbank 12c
PDF
Cloud-native and Enterprise Java? Hold my beer!
PPTX
Josua Braun, Senior Marketing Manager Storage @ Netgear
PDF
Meet Magento - High performance magento
PPTX
Do´s and Dont´s mit Oracle RDS
PDF
IPv6 Integration im Datacenter - wie komplex ist es wirklich?
Oracle Database 12c Release 2
20181210_ITTage2018_OracleNoSQLDB_KPatenge
Oracle Technology Monthly Oktober 2017
Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)
Roadshow Oracle Database 12c: News & Features
200 verteilte Oracle- Server mit Ansible ausrollen
Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?
fn project serverless computing
OC|Webcast: Oracle Lizenzierung - Lizenznews 2021
Boost your APEX Deployment and Provisioning with Docker
Effizienter Hardware LifeCycle auf Oracle SPARC M7 Server
20181120_DOAG_OracleNoSQLDB_KPatenge
Praktische Erfahrungen mit den kleinen SPARC S7-2 Servern
Tipps & Tricks zum Aufbau einer Unternehmenscloud mit CC13
Überblick Oracle Datenbank 12c
Cloud-native and Enterprise Java? Hold my beer!
Josua Braun, Senior Marketing Manager Storage @ Netgear
Meet Magento - High performance magento
Do´s and Dont´s mit Oracle RDS
IPv6 Integration im Datacenter - wie komplex ist es wirklich?
Anzeige

Mehr von Karin Patenge (16)

PDF
20190704_AGIT_Georaster_ImageryData_KPatenge
PDF
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
PDF
20181123 dn2018 graph_analytics_k_patenge
PDF
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
PDF
20181019 code.talks graph_analytics_k_patenge
PDF
OracleCode_Berlin_Jun2018_AnalyzeBitcoinTransactionDataUsingAsGraph
PPTX
Graph Analytics on Data from Meetup.com
PDF
5 Gründe für Oracle Spatial Technologies
PDF
IT-Tage 2017: Visuelle Analyse komplexer Datenbestände am Beispiel der Panama...
PDF
20171106_OracleWebcast_ITTrends_EFavuzzi_KPatenge
PDF
20171121_DOAGKonferenz_JSON_OracleNoSQL_KPatenge
PDF
Oracle NoSQL Database: Integration in den Oracle Enterprise Manager 12
PDF
20160229_ModernApplicationDevelopment_Python_KPatenge
PDF
Datenbank-gestützte Validierung und Geokodierung von Adressdatenbeständen
PPTX
Raster Algebra mit Oracle Spatial und uDig
PPTX
Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies
20190704_AGIT_Georaster_ImageryData_KPatenge
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
20181123 dn2018 graph_analytics_k_patenge
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
20181019 code.talks graph_analytics_k_patenge
OracleCode_Berlin_Jun2018_AnalyzeBitcoinTransactionDataUsingAsGraph
Graph Analytics on Data from Meetup.com
5 Gründe für Oracle Spatial Technologies
IT-Tage 2017: Visuelle Analyse komplexer Datenbestände am Beispiel der Panama...
20171106_OracleWebcast_ITTrends_EFavuzzi_KPatenge
20171121_DOAGKonferenz_JSON_OracleNoSQL_KPatenge
Oracle NoSQL Database: Integration in den Oracle Enterprise Manager 12
20160229_ModernApplicationDevelopment_Python_KPatenge
Datenbank-gestützte Validierung und Geokodierung von Adressdatenbeständen
Raster Algebra mit Oracle Spatial und uDig
Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

Big Data Community Webinar vom 16. Mai 2019: Oracle NoSQL DB im Überblick

  • 2. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Die Oracle NoSQL DB im Überblick Ein Key-Value Store mit nativer Unterstützung für JSON, der auch Graphen und SQL “kann” Karin Patenge | [email protected] | @kpatenge Principal Solution Engineer | BU Cloud & Core Technologies Oracle Deutschland B.V. & Co. KG Webinar | Big Data & Data Warehouse Community | 16. Mai 2019
  • 3. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3
  • 4. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Agenda Merkmale der Oracle NoSQL DB – Kurze Einführung Die administrative Sicht Die Sicht der Anwendungsentwicklung Was wir heute nicht mehr besprechen (können) Ihre Fragen 1 2 3 4 5 4
  • 5. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Merkmale der Oracle NoSQL DB – Kurze Einführung Die administrative Sicht Die Sicht der Anwendungsentwicklung Was wir heute nicht mehr besprechen (können) Ihre Fragen 1 2 3 4 5 5
  • 6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Verschiedene Programmier- APIs inklusive SQL • Einfache GET/PUT Operationen • Datenmodelle: • Key-Value (KVStore) • JSON • Table • Graph (über Big Data Spatial and Graph) • BASE und ACID unterstützt • Sekundärindizes • Freie Community Edition über Apache 2.0 Lizenz • Basic Edition inkludiert in Oracle DB EE Lizenz Kurze Übersicht: Technische Merkmale der Oracle NoSQL DB Text Datenbank Kern- Funktionalität Fokus auf Anwendungs- entwicklung Enterprise- Grade Software • Verteilte Datenhaltung (Sharding) • Flexibel, horizontal skalierbar (Shared nothing) • Vorhersagbare, geringe Latenzzeiten • Hoher Durchsatz • Hochverfügbar, ausfallsicher • REST Interface für Administration • Monitoring über JMX • Geringer Administrationsaufwand • Einfach zu erweitern, auch geografisch verteilt • Automatisches Rebalancing • Kerberos, Authentication • Verschüsselte Daten (Transport/Speicherung) • Time-To-Live (Daten mit “Verfallsdatum”) • Mandantenfähigkeit (über Namespaces) • Starke Integration in das Oracle Tech Portfolio 6
  • 7. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Als Datenmanagementplattform für Anwendungen, die: – Hohe Datenvolumina produzieren und/oder konsumieren, typischerweise in hoher Geschwindigkeit oder durch die Menge an Datenquellen – Antworten auf Nutzeranfragen in Echtzeit oder nahezu Echtzeit liefern müssen – Sich häufig verändernde Datenmodelle unterstützen müssen – Sich elastisch an dynamische Arbeitslasten anpassen müssen • Branchenübergreifend 8 Und wofür setzen Sie die Datenbank / den KVStore ein?
  • 8. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Informationen und Download • Aktuelle Version 19.1.8 – Anpassungen an Release Cycle und Versionierung analog der Oracle DB • Oracle Technology Network (OTN) – Download (als .zip bzw. .tar.gz – Server, Examples, Treiber) • Enterprise und Community Edition www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads • Basic Edition edelivery.oracle.com – Dokumentation (Server, Treiber, Get started, Tutorials, Videos, APIs, ...) docs.oracle.com/en/database/other-databases/nosql-database – Community community.oracle.com/community/groundbreakers/database/nosql_database 9
  • 9. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Merkmale der Oracle NoSQL DB – Kurze Einführung Die administrative Sicht Die Sicht der Anwendungsentwicklung Was wir heute nicht mehr besprechen (können) Ihre Fragen 1 2 3 4 5 10
  • 10. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Architektur Oracle NoSQL DB Application NoSQLDB Treiber SN1 RN1 SN5 RN5 SN9 RN9 SN2 RN2 SN6 RN6 SN10 RN10 SN3 RN3 SN7 RN7 SN11 RN11 SN4 RN4 SN8 RN8 SN12 RN12 SN13 RN13 SN14 RN14 SN15 RN15 SN16 RN16 RN17 RN18 SN17 RN19 RN20 RN21 Storage Nodes Capacity = 1 Capacity = 3 Replication Factor = 3 (Total # of RNs in a Shard) RM Shard1 Shardn R RM R Shards ≡ Replication Groups WRITE  Master Replica Node (RN) READ  Least busy Replica Node (Master or Replica) 11 Oracle NoSQL DB Application NoSQLDB Treiber Oracle NoSQL DB Application NoSQLDB Treiber Load Balancer / Web Server Über External Tables (setzt NoSQL DB EE voraus)
  • 11. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Beispiel 3x3 Cluster • 3 Shards • 3 Storage Nodes • Beliebig erweiterbar – Zusätzliche Zones – Zusätzliche Shards – Zusätzliche Storage Nodes Storage Node 3 (Capacity = 3) Storage Node 2 (Capacity = 3) Storage Node 1 (Capacity = 3) M R R M R RR R M Shard 1 Shard 2 Shard 3 Erläuterungen : Shard ≡ Replication Group Primary Zone ≡ Primary Data Center M = Master R = Replikat Primary Zone Get(shardKey=4567) MD5Hash(4567) Application NoSQL DB Driver
  • 12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Deployment Optionen (I) Eigene Verantwortung für • Sizing • Hardware: Netzwerk, Compute Instanzen, Storage • Installation, Upgrade, Patches aller beteiligten Software Komponenten • Configuration, Deployment • Load Balancing 13 „Do-it-yourself“ NoSQL DB Cluster • Auf eigener Hardware • Auf Oracle Cloud Infrastructure (OCI) Ressourcen – mit Bare Metal Shapes tinyurl.com/nosqldbbaremetal – mit VM Shapes tinyurl.com/nosqldbvmshapes
  • 13. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • 3 Compute Instanzen mit je 3 Block Volumes attached verteilt auf die 3 Availability Domains in Frankfurt • Freigabe der Ports über Security Lists [nosql@kp-nosql-db-ad1-0 ~]$ ./pingkvstore.sh Pinging components of store kvstore based upon topology sequence #136 120 partitions and 3 storage nodes Time: 2019-03-11 10:40:56 UTC Version: 18.3.10 Shard Status: healthy:3 writable-degraded:0 read-only:0 offline:0 total:3 Admin Status: healthy Zone [name=Frankfurt id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false] RN Status: online:9 read-only:0 offline:0 maxDelayMillis:0 maxCatchupTimeSecs:0 Storage Node [sn1] on 10.0.0.4:5000 Zone: [name=Frankfurt id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false] Status: RUNNING Ver: 18.3.10 2019-01-10 02:48:19 UTC Build id: 2e51533ae0d0 Edition: Enterprise Admin [admin1] Status: RUNNING,MASTER Rep Node [rg1-rn1] Status: RUNNING,REPLICA sequenceNumber:498 haPort:5031 available storage size:94 GB delayMillis:0 catchupTimeSecs:0 Rep Node [rg2-rn1] Status: RUNNING,REPLICA sequenceNumber:514 haPort:5032 available storage size:94 GB delayMillis:0 catchupTimeSecs:0 Rep Node [rg3-rn1] Status: RUNNING,MASTER sequenceNumber:500 haPort:5033 available storage size:94 GB Storage Node [sn2] on 10.0.1.3:5000 Zone: [name=Frankfurt id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false] Status: RUNNING Ver: 18.3.10 2019-01-10 02:48:19 UTC Build id: 2e51533ae0d0 Edition: Enterprise Admin [admin2] Status: RUNNING,REPLICA Rep Node [rg1-rn2] Status: RUNNING,MASTER sequenceNumber:498 haPort:5031 available storage size:94 GB Rep Node [rg2-rn2] Status: RUNNING,REPLICA sequenceNumber:514 haPort:5032 available storage size:94 GB delayMillis:0 catchupTimeSecs:0 Rep Node [rg3-rn2] Status: RUNNING,REPLICA sequenceNumber:500 haPort:5033 available storage size:94 GB delayMillis:0 catchupTimeSecs:0 Storage Node [sn3] on 10.0.2.3:5000 Zone: [name=Frankfurt id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false] Status: RUNNING Ver: 18.3.10 2019-01-10 02:48:19 UTC Build id: 2e51533ae0d0 Edition: Enterprise Admin [admin3] Status: RUNNING,REPLICA Rep Node [rg1-rn3] Status: RUNNING,REPLICA sequenceNumber:498 haPort:5031 available storage size:94 GB delayMillis:0 catchupTimeSecs:0 Rep Node [rg2-rn3] Status: RUNNING,MASTER sequenceNumber:514 haPort:5032 available storage size:94 GB Rep Node [rg3-rn3] Status: RUNNING,REPLICA sequenceNumber:500 haPort:5033 available storage size:94 GB delayMillis:0 catchupTimeSecs:0 14 Beispiel: Deployment 3x3 Cluster auf OCI mit VM Shapes
  • 14. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Voraussetzungen – Java 8 oder höher • Installation – Download der Software • Empfehlung: Server & Examples – Nutzer „nosql“ anlegen – Auspacken der Software – Verzeichnisse einrichten – Umgebungsvariablen setzen • Deployment in 3 Schritten 1. makebootconfig 2. Starten der Storage Node Agents 3. Topologie deployen 15 Deployment: Ein paar Schritte zum NoSQL DB Cluster [nosql@kp-nosql-db-ad1-0 scripts]$ cat makebootconfig.sh #!/bin/bash # Login as user nosql # Use the makebootconfig utility to generate the configuration. We do this for each storage node # -root the KVROOT directory # -host node hostname or IP address # -port specifies the registry port used by the Storage Node Agent # -admin specifies the port used by Administration Service to listen for HTTP connections # -harange specifies the range port used by the replication nodes and Administration services # -capacity specifies number of a Replication Nodes supported by Storage Node # -num_cpus used when multiple Replication Nodes are configured on a Storage Node. If the value is 0, the system will attempt to query the Storage Node to determine the number of processors on the machine. # -memory_mb total memory available for the cache and heap sizes. If the value is 0, the store will attempt to determine the amount of memory on the machine, but that value is only available when the JVM used is the Oracle Hotspot JVM. # -store-security specifies if security will be used or not. In this example no security is used. ########### Bootstrap Storage Node 1 ########## java -Xmx64m -Xms64m -jar $KVHOME/lib/kvstore.jar makebootconfig -root $KVROOT -host 10.0.0.4 -port 5000 -admin-web-port 5010 -servicerange 5015,5025 -harange 5030,5050 -capacity 3 -admindir /disk1/ondb/admin -admindirsize 50_GB -store-security none -memory_mb 6000 -storagedir /disk1/ondb/data -storagedirsize 250_GB -storagedir /disk2/ondb/data -storagedirsize 250_GB -storagedir /disk3/ondb/data -storagedirsize 250_GB -rnlogdir /disk1/ondb/rnlog -rnlogdir /disk2/ondb/rnlog -rnlogdir /disk3/ondb/rnlog echo " Done bootstrapping storage-node 1" ################################################ [nosql@kp-nosql-db-ad1-0 scripts]$
  • 15. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Optionen – Admin CLI > java -jar $KVHOME/lib/kvstore.jar runadmin -port 5000 -host localhost -store kvstore – REST Interface • Setzt „admin-web-port“ in makebootconfig voraus • Wird automatisch gestartet • Doku https://docs.oracle.com/en/database/other -databases/nosql-database/19.1/rest- admin/index.html 16 Deployment prüfen [nosql@kp-nosql-db-ad1-0 scripts]$ curl -i -X POST "http://10.0.0.4:5010/V0/nosql/admin/topology" -d '{"command":"show"}' HTTP/1.1 200 OK access-control-allow-origin: * content-type: application/json content-length: 2972 X-content-type-options: nosniff content-disposition: attachment; filename=api.json Connection: keep-alive { "operation" : "show topology", "returnCode" : 5000, "description" : "Operation ends successfully", "returnValue" : { "storeName" : "kvstore", "numPartitions" : 120, "sequenceNumber" : 136, "zns" : [ { "resourceId" : "zn1", "name" : "Frankfurt", "repFactor" : 3, "type" : "PRIMARY", "allowArbiters" : false, "masterAffinity" : false } ], "sns" : [ { "resourceId" : "sn1", "hostname" : "10.0.0.4", "registryPort" : 5000, "zone" : { "resourceId" : "zn1", "name" : "Frankfurt", "repFactor" : 3, "type" : "PRIMARY", "allowArbiters" : false, "masterAffinity" : false }, "capacity" : "3", "rootDirPath" : "/home/nosql/kvroot", ...
  • 16. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Oracle Big Data Appliance www.oracle.com/de/engineered-systems/big-data-appliance/ – Schnelles Setup, skalierbar, kosteneffizient (TCO) – Vorintegrierte Full Rack Konfiguration • Oracle's Sun x86 Servers • InfiniBand und Ethernet Konnektivität – Vorinstallierte SW Komponenten • Cloudera Enterprise Technology Software inkl. Cloudera CDH, Cloudera Manager, Cloudera Impala, Apache Kafka, Apache Spark, ..., NoSQL DB CE, Oracle R, Big Data Spatial and Graph, Big Data SQL, Konnektoren – Perfekt ausbalanziert – Erweiterbar Deployment Optionen (II) 17 Engineered Systems mit NoSQL DB – Einfaches Testen auf vorgefertigter Big Data Lite VM (Zustimmung zu Oracle Big Data Lite License Agreement) tinyurl.com/oracle-bdl-vm-411 > java -jar $KVHOME/lib/kvstore.jar kvlite – Quickstart to KVLite docs.oracle.com/en/database/other- databases/nosql-database/19.1/kvlite/quick-start- kvlite.pdf
  • 17. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Oracle NoSQL DB Cloud Service • Zielgruppe: Anwendungsentwicklung • Verfügbar seit August 2018 – cloud.oracle.com/nosql – Provisioniert auch über RZ in Frankfurt • Fully-managed Cloud Service – Elastisch – Schnell, vorhersagbare Performanz – Flexible Datenmodelle – Minimale Administration (Nutzer und Berechtigungen) – Umfangreiche Sicherheitsfunktionen – Von On-Premises in die Cloud (und wenn gewollt auch wieder zurück) In wenigen Schritten nutzbar 1. Download Client Software und auspacken 2. Arbeitslast  Ressourcen bestimmen 3. Anwendung entwickeln und testen/simulieren 4. Cloud Service abonnieren und aktivieren 5. Nutzer/in anlegen und Zugriffsrechte vergeben 6. Credentials Datei anlegen 7. Anwendung anpassen, kompilieren und starten 18 Deployment Optionen (III)
  • 18. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Deployment Optionen (IV) • Paketieren, Deployen und Starten von Anwendungen im Container • Fokus auf Unterstützung der Anwendungsentwicklung • Oracle NoSQL DB CE – „kvlite“ Single node - Single shard Oracle NoSQL DB Store $ docker run -d --name=kvlite oracle/nosql • Überblick blogs.oracle.com/nosql/oracle-nosql-database-on-docker • Quickstart Running Oracle NoSQL DB in Docker hub.docker.com/r/oracle/nosql/ 19 Oracle NoSQL DB als Docker Container
  • 19. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Import/Export von JSON|BSON|MongoDB JSON > java -jar $KVHOME/lib/kvtool.jar import -external -store kvstore - helper-hosts kp-nosql-db-ad1- 0:5000,kp-nosql-db-ad2-0:5000,kp- nosql-db-ad3-0:5000 -config import_config -format MONGODB_JSON - status /home/nosql/checkpoint_dir - verbose • SQL Schnittstelle (nutzt Table API) > java -jar $KVHOME/lib/sql.jar - helper-hosts kp-nosql-db-ad1-0:5000 - store kvstore • Integration in SQL Developer • Integration in Oracle Enterprise Manager – Monitoring des KV Store und der Storage Nodes über Plug-In – Voraussetzung: JMX enabled plan change-parameters -service sn1 -wait - params mgmtClass=oracle.kv.impl.mgmt.jmx.JmxAgent – EM Agent Prozess benötigt Leserecht auf $KVROOT 20 Nützliche Werkzeuge
  • 20. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Offline • 3 Schritte 1. Stoppen aller Storage Nodes 2. Neue Software installieren (auspacken) und neues $KVHOME setzen 3. Starten aller Storage Nodes • KVStore temporär nicht erreichbar Online • Rolling upgrades • Setzt Replication Factor > 2 voraus • Script-Beispiel im examples/update Ordner – Upgrade auf einem der Admin Knoten – Überprüfen, ob Software Anforderungen erfüllt sind – Reihenfolge bestimmen für Upgrade der einzelnen Storage Nodes – Upgrade der Storage Nodes (nacheinander) 21 Upgrades
  • 21. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Die gleiche Datenbank on-premises und in der Cloud 22
  • 22. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Detaillierte Informationen in der Dokumentation 23 docs.oracle.com/en/database/other-databases/nosql-database
  • 23. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Merkmale der Oracle NoSQL DB – Kurze Einführung Die administrative Sicht Die Sicht der Anwendungsentwicklung Was wir heute nicht mehr besprechen (können) Ihre Fragen 1 2 3 4 5 24
  • 24. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Oracle NoSQL DB • Programmiersprachen – Java, JavaScript, Python, C, C# • Apache 2.0 Lizenz – Unterstützte NoSQL DB APIs: • Key-Value • Table • SQL • Codebeispiele – Examples Download • Graph Datastore & Analytics – Erfordert zusätzlich Big Data Spatial and Graph Oracle NoSQL DB Cloud Service • Programmiersprachen – Java – Python und JavaScript (in Vorbereitung) • Tools – Eclipse Plugin • Codebeispiele – Examples Verzeichnis im SDK • Geplant: – Migration von on-premises in die Cloud (Oracle NoSQL DB Cloud Service) 25 Verfügbare Treiber
  • 25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | $ tree -d examples examples ├── admin ├── coherence ├── externaltables │ └── table ├── hadoop │ ├── hive │ │ └── table │ └── table ├── hello ├── jmx ├── parallelscan ├── pubsub ├── security ├── seqnum ├── sql ├── table └── upgrade $ cat $KVHOME/examples/hello/HelloBigDataWorld.java ... /** * Performs example operations and closes the KVStore. */ void runExample() { final String keyString = "Hello"; final String valueString = "Big Data World!"; store.put(Key.createKey(keyString), Value.createValue(valueString.getBytes())); final ValueVersion valueVersion = store.get(Key.createKey(keyString)); System.out.println(keyString + " " + new String(valueVersion.getValue().getValue())); store.close(); } ... $ cd $KVHOME $ javac -cp lib/kvclient.jar:examples examples/hello/HelloBigDataWorld.java $ java -Xmx256m -Xms256m -cp lib/kvclient.jar:examples hello.HelloBigDataWorld -port 5000 -store kvstore -host localhost Hello Big Data World! 26 „Hello World“
  • 26. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | import oracle.kv.*; import java.security.SecureRandom; import java.math.BigInteger; public class InsertData { static KVStore store; public static void main(String[] args) { //connecting to the NoSQL Database KVStoreConfig config = new KVStoreConfig("kvstore", "localhost:5000"); store = KVStoreFactory.getStore(config); SecureRandom random = new SecureRandom(); for(int i=1;;i++) { String key = new BigInteger(130, random).toString(32); Key mykey = Key.createKey( key ); try{ store.put(mykey,Value.createValue("data".getBytes())); System.out.print("Transaction " + i + " succeeded.r"); Thread.sleep(1000); } catch(Exception e){ System.err.println("Transaction " + i + " failed."); } } } } 27 Einfaches Befüllen des KVStore (Insert Data) • Insert Prozess wird nicht unterbrochen bei – Änderungen an der Topologie des KVStore – Bei Ausfall eines Clusterknoten • Automatisches Rebalancing der Daten
  • 27. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Mehr Beispielcode • Github github.com/oracle/nosql-examples • Dokumentation docs.oracle.com/en/database/other-databases/nosql-database/19.1/develop.html 28
  • 28. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Detaillierte Informationen in der Dokumentation 29 docs.oracle.com/en/database/other-databases/nosql-database/19.1/develop.html
  • 29. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Die Oracle NoSQL DB als Graph-Datenbank 30 Graph aus Daten von Meetup.com Umgebung: Big Data Lite VM. Visualisierung mittels Cytoscape.
  • 30. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Beispiel für Nutzung Oracle NoSQL DB als Graph DB // Start Groovy Shell connecting to Oracle NoSQL DB cd /opt/oracle/oracle-spatial-graph/property_graph/dal/groovy ./gremlin-opg-nosql.sh server = new ArrayList(); server.add("bigdatalite.localdomain:5000"); // Create a graph config that contains the graph name "meetup" cfg = GraphConfigBuilder.forPropertyGraphNosql() .setName("meetup") .setStoreName("kvstore") .setHosts(server) .addVertexProperty("type", PropertyType.STRING, "NA") .addVertexProperty("city_name", PropertyType.STRING, "NA") .addVertexProperty("city_country", PropertyType.STRING, "NA") .addVertexProperty("city_member_count", PropertyType.INTEGER, 0) .addVertexProperty("group_country", PropertyType.STRING, "NA") .addVertexProperty("group_visibility", PropertyType.STRING, "NA") .addVertexProperty("group_members", PropertyType.INTEGER, 0) .addVertexProperty("group_name", PropertyType.STRING, "NA") .addVertexProperty("member_name", PropertyType.STRING, "NA") .addVertexProperty("topic_name", PropertyType.STRING, "NA") .addVertexProperty("topic_urlkey", PropertyType.STRING, "NA") .addVertexProperty("event_yes_rsvp_count", PropertyType.INTEGER, 0) .addVertexProperty("event_rating_count", PropertyType.INTEGER, 0) .addVertexProperty("event_rating_average", PropertyType.INTEGER, 0) .hasEdgeLabel(true) .setLoadEdgeLabel(true) .setMaxNumConnections(2).build(); Importieren eines Graphen (Knoten und Kanten) über Groovy Shell // Create an instance of the graph opg = OraclePropertyGraph.getInstance(cfg); opg.setClearTableDOP(2); opg.clearRepository(); opg.getKVStoreConfig(); // Create an instance for the graph loader opgdl=OraclePropertyGraphDataLoader.getInstance(); vfile="/home/oracle/Documents/Meetup/data/meetup.opv efile="/home/oracle/Documents/Meetup/data/meetup.ope // Load data into the graph opgdl.loadData(opg, vfile, efile, 2); // Do some checks // Count vertices and edges opg.countVertices(); opg.countEdges(); // Get vertices and edges opg.getVertices(); opg.getEdges(); ...
  • 31. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Beispiel für Nutzung Oracle NoSQL DB als Graph DB Notebook für Graph-Analyse mittels vorimplementierter Algorithmen www.oracle.com/technetwork/oracle-labs/parallel-graph-analytix/overview
  • 32. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Oracle NoSQL Database Cloud Service 34
  • 33. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Oracle NoSQL Database Cloud Service im Überblick • Oracle NoSQL DB als Service • Oracle NoSQL Cloud Treiber – APIs für Anwendungsentwicklung • Oracle NoSQL Cloud SDK(s) – Entwicklungsumgebung – Cloud Simulator zum Testen einer Anwendung (Simuliert lokal den NoSQL DB Cloud Service) – Eclipse Plugin für Entwicklung – Beispiel-Code und Dokumentation 35 Zielgruppe: Anwendungsentwicklung cloud.oracle.com/nosql + +
  • 34. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 36 Schritt 1: Download Client Software und Auspacken • cloud.oracle.com/nosql/download • Oracle NoSQL Cloud Treiber – Aktuell: Java • Oracle NoSQL Cloud SDK
  • 35. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 37 Schritt 2: Arbeitslast  Ressourcen bestimmen (Sizing) • Web-Formular zum Berechnen der benötigten Kapazitäten – tinyurl.com/nosqldbcapacityestimator – Eingabewerte • Durchschnittliche Satzgröße (Key plus Value) • (Erwarteter) Schreibdurchsatz • (Erwarteter) Lesedurchsatz • Auswahl Absolute | Eventual Consistency • Anzahl der erwarteten Datensätze – Ausgabewerte • Schreibeinheiten • Leseeinheiten • Voraussichtlich benötigter Speicher (GB)
  • 36. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 38 Preiskalkulation für Beispiel aus Schritt 2
  • 37. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Anwendungsbeispiel: – BasicTableExample.java • Legt Tabelle USERS an • Fügt Datensätze ein (PUT) • Lesen von Datensätzen (GET) • Löschen eines Datensatzes • Cloud Simulator starten • Anwendung kompilieren • Anwendung ausführen 39 Schritt 3: Anwendung entwickeln und testen / simulieren
  • 38. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Kurzer Schwenk: Eclipse Plug-in • Unterstützung für Anwendungsentwicklung mit Java 40
  • 39. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 41 Schritt 4: Cloud Service abonnieren und aktivieren
  • 40. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 42 Schritt 5: Nutzer*in anlegen und Zugriffsrechte setzen  
  • 41. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Unterordner .andc anlegen im USER Ordner • Datei credentials erzeugen und Infos eintragen zu: – Benutzername, Passwort, Client ID, Client Secret • Entitlement ID notieren – Identity Cloud Service > ANDC > Configuration > Resources 43 Schritt 6: Credentials Datei erzeugen
  • 42. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 44 Schritt 6: Zusätzliche benötigte Infos • Entitlement ID • URL vom Identity Cloud Service https://idcs-xxx.identity.oraclecloud.com
  • 43. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 45 Schritt 7: Anwendung anpassen, kompilieren und starten
  • 44. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Mehr Informationen 46
  • 45. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Merkmale der Oracle NoSQL DB – Kurze Einführung Die administrative Sicht Die Sicht der Anwendungsentwicklung Was wir heute nicht mehr besprechen (können) Ihre Fragen 1 2 3 4 5 47
  • 46. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Secure Store • Mandantenfähigkeit • Oracle NoSQL DB als Document Store • Volltextindexierung und -suche mit ElasticSearch • Deployment Automation – Shell-Skripte – Terraform (Infrastructure-as-Code) • Automatisierung von Admin Operationen über REST API • Integration mit Oracle Datenbank – Big Data SQL über External Tables – Predicate Pushdown • Verarbeitung von Streaming Daten • ... 48 Heute nicht mehr im Fokus: Themen für Vertiefungen
  • 47. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Merkmale der Oracle NoSQL DB – Kurze Einführung Die administrative Sicht Die Sicht der Anwendungsentwicklung Was wir heute nicht mehr besprechen (können) Ihre Fragen 1 2 3 4 5 50
  • 48. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 51 @OracleNoSQL @kpatenge @OracleBUDB [email protected] https://www.linkedin.com/groups/4147754/ Ausgabe 06/2018 (Dezember) Keine Angst vor Key-Value-Stores: Einblicke in die Oracle NoSQL DB Vielen Dank für Ihre Teilnahme ! Mehr DWH / Big Data Community Workshops & Seminare über: www.oracle.com/de/database/data-warehouse/community.html