Contenu connexe Similaire à Introdução ao Oracle NoSQL (20) Plus de Bruno Borges (20) Introdução ao Oracle NoSQL1. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle NoSQL
O que o Oracle NoSQL tem para oferecer?
Bruno Borges
Principal Product Manager
Oracle Latin America
Agosto, 2014
Oracle Confidential – Internal/Restricted/Highly Restricted 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
•Bruno Borges
–Principal Product Manager, Java Evangelist
–Oracle Latin America
–@brunoborges
–bruno.borges@oracle.com
Speaker 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Embedded
+Light weight
Web Scale-out & Real-time events
+Schema-less
+Relaxed consistency
+Built-in availability
Web & Departmental
+SQL and NoSQL
+Basic security
Mission Critical OLTP and Data Warehousing
+SQL, Transactions
+High Availability and Security
+Multitenant architecture
Oracle Enterprise Manager
Oracle Enterprise Manager
Providing the right database technology for the job
Oracle Databases 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle NoSQL Database
•Key Features
–Flexible Key-Value Data Model
–ACID transactions
–Horizontally Scalable
–Highly Available
–Elastic Configuration
–Simple administration
–Intelligent Driver
–Commercial grade software and support
Scalable, Highly Available, Key-Value Database
Application
Storage Nodes Datacenter B
Storage Nodes Datacenter A
Application
NoSQL DB Driver
Application
NoSQL DB Driver
Application 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Key-Value Database, Escalável, Distribuido
Oracle NoSQL Database
•Topologia Inteligente
–Reliability process placement
–Integrated load balancing
–Data center awareness
–Multi-master, wide partitioning
•Elastic Expansion
–Auto rebalance & compaction
•Base and ACID
–Rollback on failures
Application
Smart Topology Driver 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle NoSQL Database by the Numbers
•Predictable performance over time
–No planned outages required
•Smart resource management
–Scale JUST when needed
•Upgrade releases with no outage
Performance, Scale and Manageability Testing 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Performance Previsível
•Qual a importância?
–360 clientes utilizados
–Geração de dados contínua
–Cluster expandido em 50%
–Baixa latência
–Alto throughput
–Sistema sempre online
–Pronto para mais clientes
Expansão de Cluster Online
0
1
2
3
4
5
6
7
8
0
10.000
20.000
30.000
40.000
50.000
60.000
70.000
144 (48x3)
20%
40%
60%
80%
216 (72x3)
Average Latency (ms)
Throughput (ops/sec)
95/5 Read/Update Throughput
Throughput (ops/sec)
Read Latency (ms)
Update Latency (ms) 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Gestão Inteligente de Recursos
•Qual a importância?
–Prepare-se para o Natal
•Aumento em número de clientes para 540
•Escala linear de throughput
•Latência permanece a mesma: 6ms
•Sistema sempre online
Oracle Confidential – Internal/Restricted/Highly Restricted
9
Escale somente quando necessário
0
10.000
20.000
30.000
40.000
50.000
60.000
70.000
80.000
90.000
144 (48x3)
216* (72x3)
Throughput (ops/sec)
12->18 Machines, 144->216 Nodes
95/5 Read/Update Throughput 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Exemplos e Demos
Oracle Confidential – Internal/Restricted/Highly Restricted
10 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Conecanto ao Oracle NoSQL
String storeName = "kvstore";
String hostName = "localhost:5000";
KVStoreConfig kvConfig = new KVStoreConfig(storeName, hostName);
try (KVStore store = KVStoreFactory.getStore(kvConfig)) {
// ... Manipula a store
}
Oracle Confidential – Internal/Restricted/Highly Restricted
11 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Exemplo de CRUD
// Coloca nova chave/valor se ainda não existe
Key key = Key.createKey("Katana");
String valString = "sword";
store.putIfAbsent(key, Value.createValue(valString.getBytes()));
// Deleta esta chave (e valor) do banco de dados
store.delete(key);
Oracle Confidential – Internal/Restricted/Highly Restricted
12 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Exemplo de CRUD
// Leitura de dados do banco
ValueVersion retValue = store.get(key);
// Atualiza este item somente se a versão for a mesma que a lida
String newvalString = "Really nice sword";
Value newval = Value.createValue(newvalString.getBytes());
store.putIfVersion(key, newval, retValue.getVersion());
Oracle Confidential – Internal/Restricted/Highly Restricted
13 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Apache Avron – Definição de Schemas
•Framework para serialização de dados
•Features
–Estruturas de dados ricas
–Compacta, rápida, formato de dados binário
–Container file para persistir dados
–Suporte a RPC
–Integrado ao Oracle NoSQL
Oracle Confidential – Internal/Restricted/Highly Restricted
14
JSON format 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Schema Definition em JSON
{
"type": "record",
"namespace": "schema.namespace",
"name": "schema.name",
"fields": [
{ "name": "field1", "type": "string" },
{ "name": "field2", "type": "int" }
]
}
Oracle Confidential – Internal/Restricted/Highly Restricted
15
Com Apache Avron
$> java -jar lib/kvstore.jar runadmin -host localhost -port 5000
kv-> ddl add-schema -file sample-schema.avsc 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Incluindo JSON dentro do Oracle NoSQL
ObjectNode name = JsonNodeFactory.instance.objectNode(); name.put("first", "Percival"); name.put("last", "Lowell"); JsonRecord record = new JsonRecord(member, memberInfoSchema); store.put(key, binding.toValue(record));
Oracle Confidential – Internal/Restricted/Highly Restricted
16 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Bonus: Acesso via REST
•fka Oracle APEX Listener
•Futura versão 3.0 do Oracle REST Data Services – Roadmap
–Oracle NoSQL
–Oracle Database
–JSON format
–Automatic linkage master-detail
–PL/SQL API to generate REST services
–Test environment on Oracle SQL Developer
Oracle Confidential – Internal/Restricted/Highly Restricted
17 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle NoSQL Database
Fully integrated for the Enterprise
Real Time Access
External Tables
MapReduce, OLH, ODC, ODI
NoSQL DB Driver
Application
GRAPH 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
oracle.com/goto/nosql
Para saber mais, visite o site. 19. Copyright © 2014, 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.
Oracle Confidential – Internal/Restricted/Highly Restricted
20 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Confidential – Internal/Restricted/Highly Restricted
21