SlideShare a Scribd company logo
1 of 35
Download to read offline
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Eclipse JNoSQL
One API to Many NoSQL Databases
Otávio SantanaLeonardo LimaJonathan Vila Lopez
Hillmer Chona Patricia Uribe
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Hillmer Chona
Medellin JUG Leader
Catholic University Luis Amigó - Colombia
Oracle Groundbreaker ambassador
About the Speakers
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Jonathan Vila Lopez
Software developer for the last 25 years in different languages
Works for RedHat
Leader of Barcelona Java Users Group and JBCNConf
Very passionate about Java
Interested in particular on OSGi, Kubernetes, VR
About the Speakers
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
About the Speakers
Leonardo Lima
Computer engineer, server & embedded sw developer
CTO at V2COM
Spec Lead – JSR363 – Units of Measurement
V2COM’s Representative at JCP Executive Committee
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Otávio Santana
Software engineer, Tomitribe
Java Champion, SouJava JUG Leader
Apache, Eclipse and OpenJDK Committer
Expert Group member in many JSRs
Representative at JCP EC for SouJava
About the Speakers
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Patricia Uribe
Medellin JUG Leader
Catholic University Luis Amigó - Colombia
About the Speakers
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
NoSQL
(Not Only SQL)
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
What defines NoSQL databases?
● No fixed data structure
● Not an ACID, but a BASE
● Five different types
◦ Key/Value
◦ Column Family
◦ Document
◦ Graph
◦ Multi-Model
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Key/Value
● AmazonDynamo
● AmazonS3
● Redis
● Scalaris
● Voldemort
● Couchbase
● Hazelcast
Apollo Sun
Aphrodite Love
Ares War
Light Music
Beauty
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Row key
Column Family
● Hbase
● Cassandra
● Scylla
● Clouddata
● SimpleDb
● DynamoDB
Apollo
Ares
Kratos
Duty
{”Sun”, “Light”,
”Music”}
Duty
“War”
SlainGods
13
Weapon
“Sword”
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Document
● AmazonSimpleD
● Apache CouchDB
● Couchbase
● MongoDB
● Riak
{
”name”:”Diana”,
”father”:”Jupiter”,
”mother”:”Latona”,
”siblings”:{
”name”: ”Apollo”
},
”godOf”: {”Hunt”}
}
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Graph
● Neo4J
● InfoGrid
● Sones
● HyperGraphDB
Apollo
Ares
Kratos
sibling
slew
slew
slain
by
slain
by
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Multi-model
● OrientDB
◦ graph, document
● Couchbase
◦ key-value, document
● Elasticsearch
◦ document, graph
● ArangoDB
◦ column family, graph, key-value
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
SQL -> NoSQL
SQL Key-Value Column
Family
Document Graph
Table Bucket Column
Family
Collection
Row Key/Value
pair
Column Document Vertex
Column Key/Value
Pair
Key/Value
Pair
Vertex/Edge
properties
Relationship Link Edge
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Scalability x Complexity
Scalability
Complexity
Key/Value
Document
Column
Family
Graph
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
JNoSQL
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
What is JNoSQL?
● Mapping API - Artemis
● Communication API - Diana
● No lock-in
● Divide and conquer
DAO
Communication
Mapping
JNoSQL
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Eclipse JNoSQL
● Eclipse Foundation
● Apache v2 + EPL 1.0
● API to each NoSQL type
● Configurable
● Extensible Communication
Mapping
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
For example: for a Document DB…
BaseDocument baseDocument = new BaseDocument();
baseDocument.addAttribute(name, value);
JsonObject jsonObject = JsonObject.create();
jsonObject.put(name, value);
Document document = new Document();
document.append(name, value);
ODocument document = new ODocument(“collection”);
document.field(name, value);
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
… now with JNoSQL
DocumentEntity entity = DocumentEntity.of("documentCollection");
Document document = Document.of(name, value);
entity.add(document);
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Names & Definitions
● Configuration
● Factory
● Manager
● Entity
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Names & Definitions
ColumnConfiguration<?> condition = new DriverConfiguration();
try(ColumnFamilyManagerFactory managerFactory = condition.get()) {
ColumnFamilyManager entityManager = managerFactory.get(KEY_SPACE);
entityManager.insert(entity);
ColumnQuery select = select().from(COLUMN_FAMILY).where(eq(id)).build();
ColumnDeleteQuery delete = delete().from(COLUMN_FAMILY)
.where(eq(id)).build();
Optional<ColumnEntity> result = entityManager.singleResult(query);
entityManager.delete(delete);
}
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Eclipse JNoSQL - Artemis
● Based on CDI and Diana
● Heavy use of Annotations
● Events on Create, Update, Delete
● Bean Validation Support
● Configurable and Extensible
● “Query by Methods”
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Names & Definitions
● Annotated Entities
● Template
● Repository
● Configuration
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Annotaded Entities
● MappedSuperclass
● Entity
● Column
@Entity(”god")
public class God {
@Column
private String name;
@Column
private Set<God> siblings;
…
}
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Templates
import static DocumentQuery.select;
@Inject DocumentTemplate template;
God diana = God.builder().withName(“Diana”);
template.insert(diana);
template.update(diana);
DocumentQuery query =
select().from(“god”).where(“name”).equals(“Diana”).build();
List<God> gods = template.select(query);
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Repository
@Inject
@Database(DatabaseType.COLUMN)
private GodRepository godRepository;
@Inject
@Database(DatabaseType.KEY_VALUE)
private GodRepository godRepository;
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Configuration
[ {
"description": "The couchbase document configuration",
"name": "document",
"provider":
"org.jnosql.diana.couchbase.document.CouchbaseDocumentConfiguration",
"settings": {
"couchbase-host-1": "localhost",
"couchbase-user": "root",
"couchbase-password": "123456"
}
} ]
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Configuration
@Inject
@ConfigurationUnit
private DocumentCollectionManagerFactory<?> entityManager;
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Hands-On!
https://github.com/JNOSQL/oc1-hands-on-2018
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Data model for the use cases
JUG
• Name
• City
• Programming Languages
• Country
JUGs and JUG Members!
JUG Member
• Name
• City
• Programming Languages
(name and skill level)
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Use case #1 - Key/Value
Create a database to handle JUG information using Redis
• Create, Retrieve and Update JUG information
• Model once and reuse the model with different database
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Use case #2 - Document
Implement some searches against a MongoDB
• Search JUG members in a given city
• Search JUG members of legal drinking age
• Search JUGs in a region
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Use case #3 - Graph
Implement recommendation searches against Neo4J
• Find Beginner Java Users that know Advanced Java User(s).
• Find Java Users in a given City
• Recommend Advanced Java Users in the same City as a given
User.
JNoSQL
#CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona
Thanks!
https://www.tomitribe.com/codeone/hol5998/

More Related Content

What's hot

NHibernate (The ORM For .NET Platform)
NHibernate (The ORM For .NET Platform)NHibernate (The ORM For .NET Platform)
NHibernate (The ORM For .NET Platform)
Samnang Chhun
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for Java
Aleksander Pohl
 

What's hot (20)

Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev ConGaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
 
Open Source SQL - beyond parsers: ZetaSQL and Apache Calcite
Open Source SQL - beyond parsers: ZetaSQL and Apache CalciteOpen Source SQL - beyond parsers: ZetaSQL and Apache Calcite
Open Source SQL - beyond parsers: ZetaSQL and Apache Calcite
 
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
 
Fast federated SQL with Apache Calcite
Fast federated SQL with Apache CalciteFast federated SQL with Apache Calcite
Fast federated SQL with Apache Calcite
 
How Graph Databases efficiently store, manage and query connected data at s...
How Graph Databases efficiently  store, manage and query  connected data at s...How Graph Databases efficiently  store, manage and query  connected data at s...
How Graph Databases efficiently store, manage and query connected data at s...
 
JSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge GraphsJSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge Graphs
 
OData Services
OData ServicesOData Services
OData Services
 
NHibernate (The ORM For .NET Platform)
NHibernate (The ORM For .NET Platform)NHibernate (The ORM For .NET Platform)
NHibernate (The ORM For .NET Platform)
 
Rochester on Rails: Introduction to Rails
Rochester on Rails: Introduction to RailsRochester on Rails: Introduction to Rails
Rochester on Rails: Introduction to Rails
 
Talavant Data Lake Analytics
Talavant Data Lake Analytics Talavant Data Lake Analytics
Talavant Data Lake Analytics
 
Database basics for new-ish developers -- All Things Open October 18th 2021
Database basics for new-ish developers  -- All Things Open October 18th 2021Database basics for new-ish developers  -- All Things Open October 18th 2021
Database basics for new-ish developers -- All Things Open October 18th 2021
 
An Introduction to Spring Data
An Introduction to Spring DataAn Introduction to Spring Data
An Introduction to Spring Data
 
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
 
A smarter Pig: Building a SQL interface to Apache Pig using Apache Calcite
A smarter Pig: Building a SQL interface to Apache Pig using Apache CalciteA smarter Pig: Building a SQL interface to Apache Pig using Apache Calcite
A smarter Pig: Building a SQL interface to Apache Pig using Apache Calcite
 
Vital.AI Creating Intelligent Apps
Vital.AI Creating Intelligent AppsVital.AI Creating Intelligent Apps
Vital.AI Creating Intelligent Apps
 
Smarter Together - Bringing Relational Algebra, Powered by Apache Calcite, in...
Smarter Together - Bringing Relational Algebra, Powered by Apache Calcite, in...Smarter Together - Bringing Relational Algebra, Powered by Apache Calcite, in...
Smarter Together - Bringing Relational Algebra, Powered by Apache Calcite, in...
 
Entity Framework
Entity FrameworkEntity Framework
Entity Framework
 
Jena
JenaJena
Jena
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for Java
 
Using Neo4j from Java
Using Neo4j from JavaUsing Neo4j from Java
Using Neo4j from Java
 

Similar to Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]

Similar to Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998] (20)

JavaOne 2017 - JNoSQL: The Definitive Solution for Java and NoSQL Database [C...
JavaOne 2017 - JNoSQL: The Definitive Solution for Java and NoSQL Database [C...JavaOne 2017 - JNoSQL: The Definitive Solution for Java and NoSQL Database [C...
JavaOne 2017 - JNoSQL: The Definitive Solution for Java and NoSQL Database [C...
 
JavaOne 2017 - Choosing a NoSQL API and Database to Avoid Tombstones and Drag...
JavaOne 2017 - Choosing a NoSQL API and Database to Avoid Tombstones and Drag...JavaOne 2017 - Choosing a NoSQL API and Database to Avoid Tombstones and Drag...
JavaOne 2017 - Choosing a NoSQL API and Database to Avoid Tombstones and Drag...
 
NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021
 
SQL vs NoSQL
SQL vs NoSQLSQL vs NoSQL
SQL vs NoSQL
 
Data Persistence in Android with Room Library
Data Persistence in Android with Room LibraryData Persistence in Android with Room Library
Data Persistence in Android with Room Library
 
NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
Learning to run
Learning to runLearning to run
Learning to run
 
Eclipse JNoSQL Good Practices at OXM
Eclipse JNoSQL Good Practices at OXMEclipse JNoSQL Good Practices at OXM
Eclipse JNoSQL Good Practices at OXM
 
NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020
 
Devoxx PL 2017 - Cracking the Code to Secure Software
Devoxx PL 2017 - Cracking the Code to Secure SoftwareDevoxx PL 2017 - Cracking the Code to Secure Software
Devoxx PL 2017 - Cracking the Code to Secure Software
 
EclipseCon 2021 NoSQL Endgame
EclipseCon 2021 NoSQL EndgameEclipseCon 2021 NoSQL Endgame
EclipseCon 2021 NoSQL Endgame
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client Developers
 
NoSQL Endgame - Java2Days 2020 Virtual
NoSQL Endgame - Java2Days 2020 VirtualNoSQL Endgame - Java2Days 2020 Virtual
NoSQL Endgame - Java2Days 2020 Virtual
 
NoSQL, no Limits, lots of Fun!
NoSQL, no Limits, lots of Fun!NoSQL, no Limits, lots of Fun!
NoSQL, no Limits, lots of Fun!
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
 
What’s new in JSR 367 Java API for JSON Binding
What’s new in JSR 367 Java API for JSON BindingWhat’s new in JSR 367 Java API for JSON Binding
What’s new in JSR 367 Java API for JSON Binding
 
Polyglot Persistence with MongoDB and Neo4j
Polyglot Persistence with MongoDB and Neo4jPolyglot Persistence with MongoDB and Neo4j
Polyglot Persistence with MongoDB and Neo4j
 
Combine Spring Data Neo4j and Spring Boot to quickl
Combine Spring Data Neo4j and Spring Boot to quicklCombine Spring Data Neo4j and Spring Boot to quickl
Combine Spring Data Neo4j and Spring Boot to quickl
 

More from Otávio Santana

More from Otávio Santana (20)

NoSQL design pitfalls with Java
NoSQL design pitfalls with JavaNoSQL design pitfalls with Java
NoSQL design pitfalls with Java
 
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
 
Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]
 
Arquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com JavaArquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com Java
 
Build, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to endBuild, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to end
 
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the CloudJakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
 
ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?
 
Jakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud AgeJakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud Age
 
Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0
 
Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]
 
The new generation of data persistence with graph
The new generation of data persistence with graphThe new generation of data persistence with graph
The new generation of data persistence with graph
 
Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaStateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - Guatemala
 
Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoStateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - Mexico
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL DatabaseEclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
 
Polyglot persistence
Polyglot persistencePolyglot persistence
Polyglot persistence
 
Management 3.0 and open source
Management 3.0 and open sourceManagement 3.0 and open source
Management 3.0 and open source
 
Building a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EEBuilding a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EE
 
Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!
 
Disasters of the century NoSQL
Disasters of the century NoSQLDisasters of the century NoSQL
Disasters of the century NoSQL
 

Recently uploaded

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]

  • 1. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Eclipse JNoSQL One API to Many NoSQL Databases Otávio SantanaLeonardo LimaJonathan Vila Lopez Hillmer Chona Patricia Uribe
  • 2. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Hillmer Chona Medellin JUG Leader Catholic University Luis Amigó - Colombia Oracle Groundbreaker ambassador About the Speakers
  • 3. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Jonathan Vila Lopez Software developer for the last 25 years in different languages Works for RedHat Leader of Barcelona Java Users Group and JBCNConf Very passionate about Java Interested in particular on OSGi, Kubernetes, VR About the Speakers
  • 4. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona About the Speakers Leonardo Lima Computer engineer, server & embedded sw developer CTO at V2COM Spec Lead – JSR363 – Units of Measurement V2COM’s Representative at JCP Executive Committee
  • 5. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Otávio Santana Software engineer, Tomitribe Java Champion, SouJava JUG Leader Apache, Eclipse and OpenJDK Committer Expert Group member in many JSRs Representative at JCP EC for SouJava About the Speakers
  • 6. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Patricia Uribe Medellin JUG Leader Catholic University Luis Amigó - Colombia About the Speakers
  • 7. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona NoSQL (Not Only SQL)
  • 8. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona What defines NoSQL databases? ● No fixed data structure ● Not an ACID, but a BASE ● Five different types ◦ Key/Value ◦ Column Family ◦ Document ◦ Graph ◦ Multi-Model
  • 9. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Key/Value ● AmazonDynamo ● AmazonS3 ● Redis ● Scalaris ● Voldemort ● Couchbase ● Hazelcast Apollo Sun Aphrodite Love Ares War Light Music Beauty
  • 10. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Row key Column Family ● Hbase ● Cassandra ● Scylla ● Clouddata ● SimpleDb ● DynamoDB Apollo Ares Kratos Duty {”Sun”, “Light”, ”Music”} Duty “War” SlainGods 13 Weapon “Sword”
  • 11. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Document ● AmazonSimpleD ● Apache CouchDB ● Couchbase ● MongoDB ● Riak { ”name”:”Diana”, ”father”:”Jupiter”, ”mother”:”Latona”, ”siblings”:{ ”name”: ”Apollo” }, ”godOf”: {”Hunt”} }
  • 12. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Graph ● Neo4J ● InfoGrid ● Sones ● HyperGraphDB Apollo Ares Kratos sibling slew slew slain by slain by
  • 13. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Multi-model ● OrientDB ◦ graph, document ● Couchbase ◦ key-value, document ● Elasticsearch ◦ document, graph ● ArangoDB ◦ column family, graph, key-value
  • 14. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona SQL -> NoSQL SQL Key-Value Column Family Document Graph Table Bucket Column Family Collection Row Key/Value pair Column Document Vertex Column Key/Value Pair Key/Value Pair Vertex/Edge properties Relationship Link Edge
  • 15. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Scalability x Complexity Scalability Complexity Key/Value Document Column Family Graph
  • 16. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona JNoSQL
  • 17. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona What is JNoSQL? ● Mapping API - Artemis ● Communication API - Diana ● No lock-in ● Divide and conquer DAO Communication Mapping JNoSQL
  • 18. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Eclipse JNoSQL ● Eclipse Foundation ● Apache v2 + EPL 1.0 ● API to each NoSQL type ● Configurable ● Extensible Communication Mapping
  • 19. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona For example: for a Document DB… BaseDocument baseDocument = new BaseDocument(); baseDocument.addAttribute(name, value); JsonObject jsonObject = JsonObject.create(); jsonObject.put(name, value); Document document = new Document(); document.append(name, value); ODocument document = new ODocument(“collection”); document.field(name, value);
  • 20. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona … now with JNoSQL DocumentEntity entity = DocumentEntity.of("documentCollection"); Document document = Document.of(name, value); entity.add(document);
  • 21. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Names & Definitions ● Configuration ● Factory ● Manager ● Entity
  • 22. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Names & Definitions ColumnConfiguration<?> condition = new DriverConfiguration(); try(ColumnFamilyManagerFactory managerFactory = condition.get()) { ColumnFamilyManager entityManager = managerFactory.get(KEY_SPACE); entityManager.insert(entity); ColumnQuery select = select().from(COLUMN_FAMILY).where(eq(id)).build(); ColumnDeleteQuery delete = delete().from(COLUMN_FAMILY) .where(eq(id)).build(); Optional<ColumnEntity> result = entityManager.singleResult(query); entityManager.delete(delete); }
  • 23. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Eclipse JNoSQL - Artemis ● Based on CDI and Diana ● Heavy use of Annotations ● Events on Create, Update, Delete ● Bean Validation Support ● Configurable and Extensible ● “Query by Methods”
  • 24. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Names & Definitions ● Annotated Entities ● Template ● Repository ● Configuration
  • 25. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Annotaded Entities ● MappedSuperclass ● Entity ● Column @Entity(”god") public class God { @Column private String name; @Column private Set<God> siblings; … }
  • 26. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Templates import static DocumentQuery.select; @Inject DocumentTemplate template; God diana = God.builder().withName(“Diana”); template.insert(diana); template.update(diana); DocumentQuery query = select().from(“god”).where(“name”).equals(“Diana”).build(); List<God> gods = template.select(query);
  • 27. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Repository @Inject @Database(DatabaseType.COLUMN) private GodRepository godRepository; @Inject @Database(DatabaseType.KEY_VALUE) private GodRepository godRepository;
  • 28. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Configuration [ { "description": "The couchbase document configuration", "name": "document", "provider": "org.jnosql.diana.couchbase.document.CouchbaseDocumentConfiguration", "settings": { "couchbase-host-1": "localhost", "couchbase-user": "root", "couchbase-password": "123456" } } ]
  • 29. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Configuration @Inject @ConfigurationUnit private DocumentCollectionManagerFactory<?> entityManager;
  • 30. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Hands-On! https://github.com/JNOSQL/oc1-hands-on-2018
  • 31. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Data model for the use cases JUG • Name • City • Programming Languages • Country JUGs and JUG Members! JUG Member • Name • City • Programming Languages (name and skill level)
  • 32. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Use case #1 - Key/Value Create a database to handle JUG information using Redis • Create, Retrieve and Update JUG information • Model once and reuse the model with different database
  • 33. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Use case #2 - Document Implement some searches against a MongoDB • Search JUG members in a given city • Search JUG members of legal drinking age • Search JUGs in a region
  • 34. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Use case #3 - Graph Implement recommendation searches against Neo4J • Find Beginner Java Users that know Advanced Java User(s). • Find Java Users in a given City • Recommend Advanced Java Users in the same City as a given User.
  • 35. JNoSQL #CodeOne #JNoSQL @JNoSQL @HillmerCh@leomrlima @otaviojava @patricia_uz @vilojona Thanks! https://www.tomitribe.com/codeone/hol5998/