SlideShare a Scribd company logo
Building a Recommendation
Engine with Java EE EE4J
Otávio Santana
@otaviojava
osantana@tomitribe.com
otaviojava@apache.org
Hilmer Chona
@hchona
hilac@msn.com
MedellinJUG.org
Evolution
Goods
● Land
● Gold
● Oil
● Information
Machines
The information is
not enough
Big Data
Web 3.0
Web Semantic
Next?
Recommendation
Building a Recommendation Engine with Java EE
JCP
Ajax
Search
Building a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EE
Collecting
Filtering
Stark
Rogers
Romanoff
Banners
Berlin
São Paulo
Moscow
San
Francisco
Medellin
Travel
Stark
Rogers
Romanoff
Banners
New York
São Paulo
Moscow
San
Francisco
Medellin
Travel
Business
Fun
Reasons why
travel
1. Fun
2. Conferences
3. Music
4. Geek Conf
5. Family
6. History
7. Language
8. Honeymoon
9. Work
10. Meetings
11. University
12. Shopping
13. Relax
More Information
name Tony Stark
nationality American
hero Iron man
power rich
when 2011
why Save the world
who flying
type Fun
name San Francisco
country USA
State California
Founded 1776
Travels
NoSQL
● Database
● Doesn't use structure
● Not Transaction
● BASE
● Types
Graph
● Neo4j
● InfoGrid
● Sones
● HyperGraphDB
Apollo Ares
Kratoswas killed by was killed by
Is brother
killed killed
SQL Key-value Column Document Graph
Table Bucket Column
Family
Collection
Row Key/value
pair
Column Document Vertex
Column Key/value
pair
Key/value pair Vertex and Edge
property
Relationship Link Edge
SQL vs NoSQL
Scalability vs Complexity
S
c
a
l
a
b
i
l
i
t
y
Complexity
key-value
Column
Document
Graph
Graph
Grace Hopper
label Person
id ada
name Ada Lovelace
occupation scientist
Ada Lovelace
label Person
id grace
name Grace Hopper
occupation scientist
Knows
Vertex Vertex
Edge
Graph Database
TinkerPop
http://tinkerpop.apache.org/
TinkerPop
Grace Hopper
label Person
id grace
name Grace Hopper
occupation scientist
Vertex
grace = graph.addVertex(
T.label, "person",
"id", "grace",
"name", "Grace Hopper",
"occupation", "scientist");
TinkerPop
Grace
Hopper
Ada
Lovelace
Knows
grace.addEdge("knows", ada);
Edges
Out ->
In <-
Both
Marketing
Campaign
● Engineer
● Salary 3000
● Age between 20 and 25 years
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT * FROM Person WHERE
occupation = "Engineer" AND
salary > 3000 and age BETWEEN 20
AND 25
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25));
Their Friends
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT * FROM Person WHERE
occupation = "Engineer" AND
salary > 3000 and age BETWEEN 20
AND 25//...joins
Id know
... ...
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25))
.out("knows");
Falling in love
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT * FROM Person WHERE
occupation = "Engineer" AND
salary > 3000 and age BETWEEN 20
AND 25//...joins
Id know
... ...
Id love
... ...
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25))
.outE("knows")
.has("feel", "love")
.bothV();
JNoSQL
● Mapping API
● Communication API
● No lock-in
● Divide and conquer
DAO
Mapping
Communication
Document
Key
Column
Graph
DIANA
ARTEMIS
JNoSQL
Data Tier
Artemis● CDI Based
● Diana Based
● Annotation Based
● Events to insert, delete, update
● Supports to Bean Validation
● Configurable and Extensible
● Query Method
Graph Database
Graph
Poliana
label Book
age 2007
name The Shack
The Shack
label Person
name Poliana
age 25
reads
where Brazil
Graph
Person poliana = graphTemplate.insert(Person.builder()
.withName("Poliana").withAge(25).build());
Book shack =
graphTemplate.insert(Book.builder().withAge(2007)
.withName("The Shack").build());
EdgeEntity<Person, Book> reads =
graphTemplate.edge(poliana, "reads", shack);
reads.add("where", "Brazil");
Marketing
Campaign
● Engineer
● Salary 3000
● Age between 20 and 25 years
Developers
List<Person> developers = graph.getTraversalVertex()
.has("salary", gte(3_000D))
.has("age", between(20, 25))
.has("occupation", "Developer")
.<Person>stream().collect(toList());
Their Friends
People who developer knows
List<Person> result = graph.getTraversalVertex()
.has("salary", gte(3_000D))
.has("age", between(20, 25))
.has("occupation", "Developer")
.out("knows")
Falling in love
People who developer loves
List<Person> love = graph.getTraversalVertex()
.has("salary", gte(3_000D))
.has("age", between(20, 25))
.has("occupation", "Developer")
.outE("knows")
.has("feel", "love")
.bothV()
.<Person>stream()
.distinct()
.collect(toList());
Book Recommendation
Software
Romance
NoSQL
Java
Micro Services
Effective Java
The Shack
Migrating to
Microservice
Databases
NoSQL
Distilled
Software Categories
List<String> result = graph.getTraversalVertex()
.hasLabel("Category")
.has("name", "Software")
.in("is")
.hasLabel("Category").<Category>stream()
.map(Category::getName)
.collect(toList());
Query Method
interface PersonRepository extends Repository<Person, Long> {
List<Person> findByAddress(String address);
Stream<Person> findByName(String name);
Stream<Person> findByNameAndKnowsOutV(String name);
Stream<Person> findByNameAndBothV(String name, String label);
Optional<Person> findByNickname(String nickname);
void deleteByNickName(String nickname);
}
Demo
JNoSQL
Configuration
CDI 2.0 with Java SE
Neo4J + Docker
Thank You
Otávio Santana
@otaviojava
osantana@tomitribe.com
otaviojava@apache.org
Hilmer Chona
@hchona
hilac@msn.com

More Related Content

Similar to Building a Recommendation Engine with Java EE (20)

Windy City DB - Recommendation Engine with Neo4j
Windy City DB - Recommendation Engine with Neo4j
Max De Marzi
 
Recommendations with Neo4j (FOSDEM 2015)
Recommendations with Neo4j (FOSDEM 2015)
Michal Bachman
 
Recommendations with Neo4j (FOSDEM 2015)
Recommendations with Neo4j (FOSDEM 2015)
GraphAware
 
Recommendations and Statistics with Graph Databases
Recommendations and Statistics with Graph Databases
Calin Constantinov
 
Neo4j
Neo4j
Von Stark
 
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
Calin Constantinov
 
Introduction to Graph Databases with Neo4J
Introduction to Graph Databases with Neo4J
Brant Boehmann
 
Designing real-time recommendations engine using graph databases.pptx
Designing real-time recommendations engine using graph databases.pptx
Gopi Krishna
 
Processing Large Graphs
Processing Large Graphs
Nishant Gandhi
 
NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020
Thodoris Bais
 
Neo4j 20 minutes introduction
Neo4j 20 minutes introduction
András Fehér
 
10. Graph Databases
10. Graph Databases
Fabio Fumarola
 
Introduction to Graph Databases wth neo4J
Introduction to Graph Databases wth neo4J
Brant Boehmann
 
Data Modeling with Neo4j
Data Modeling with Neo4j
Neo4j
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendations
proksik
 
Graph Databases
Graph Databases
Girish Khanzode
 
Neo4j
Neo4j
George Eleftheriadis
 
Graph database Use Cases
Graph database Use Cases
Max De Marzi
 
Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015
StampedeCon
 
Application Modeling with Graph Databases
Application Modeling with Graph Databases
Josh Adell
 
Windy City DB - Recommendation Engine with Neo4j
Windy City DB - Recommendation Engine with Neo4j
Max De Marzi
 
Recommendations with Neo4j (FOSDEM 2015)
Recommendations with Neo4j (FOSDEM 2015)
Michal Bachman
 
Recommendations with Neo4j (FOSDEM 2015)
Recommendations with Neo4j (FOSDEM 2015)
GraphAware
 
Recommendations and Statistics with Graph Databases
Recommendations and Statistics with Graph Databases
Calin Constantinov
 
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
Calin Constantinov
 
Introduction to Graph Databases with Neo4J
Introduction to Graph Databases with Neo4J
Brant Boehmann
 
Designing real-time recommendations engine using graph databases.pptx
Designing real-time recommendations engine using graph databases.pptx
Gopi Krishna
 
Processing Large Graphs
Processing Large Graphs
Nishant Gandhi
 
NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020
Thodoris Bais
 
Neo4j 20 minutes introduction
Neo4j 20 minutes introduction
András Fehér
 
Introduction to Graph Databases wth neo4J
Introduction to Graph Databases wth neo4J
Brant Boehmann
 
Data Modeling with Neo4j
Data Modeling with Neo4j
Neo4j
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendations
proksik
 
Graph database Use Cases
Graph database Use Cases
Max De Marzi
 
Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015
StampedeCon
 
Application Modeling with Graph Databases
Application Modeling with Graph Databases
Josh Adell
 

More from Otávio Santana (20)

NoSQL design pitfalls with Java
NoSQL design pitfalls with Java
Otávio Santana
 
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Otávio Santana
 
Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]
Otávio Santana
 
Arquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com Java
Otávio Santana
 
Build, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to end
Otávio Santana
 
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Otávio Santana
 
ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?
Otávio Santana
 
Jakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud Age
Otávio Santana
 
Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0
Otávio Santana
 
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Otávio Santana
 
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Otávio Santana
 
The new generation of data persistence with graph
The new generation of data persistence with graph
Otávio Santana
 
Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11
Otávio Santana
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Otávio Santana
 
Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - Mexico
Otávio Santana
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Otávio Santana
 
Polyglot persistence
Polyglot persistence
Otávio Santana
 
Management 3.0 and open source
Management 3.0 and open source
Otávio Santana
 
Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!
Otávio Santana
 
Disasters of the century NoSQL
Disasters of the century NoSQL
Otávio Santana
 
NoSQL design pitfalls with Java
NoSQL design pitfalls with Java
Otávio Santana
 
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Otávio Santana
 
Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]
Otávio Santana
 
Arquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com Java
Otávio Santana
 
Build, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to end
Otávio Santana
 
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Otávio Santana
 
ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?
Otávio Santana
 
Jakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud Age
Otávio Santana
 
Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0
Otávio Santana
 
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Otávio Santana
 
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Otávio Santana
 
The new generation of data persistence with graph
The new generation of data persistence with graph
Otávio Santana
 
Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11
Otávio Santana
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Otávio Santana
 
Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - Mexico
Otávio Santana
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Otávio Santana
 
Management 3.0 and open source
Management 3.0 and open source
Otávio Santana
 
Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!
Otávio Santana
 
Disasters of the century NoSQL
Disasters of the century NoSQL
Otávio Santana
 
Ad

Recently uploaded (20)

Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Ad

Building a Recommendation Engine with Java EE