SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Building a recommendation
engine with TinkerPop
Otávio Santana
@otaviojava
osantana@tomitribe.com
otaviojava@apache.org
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 Document Column Graph
Table Bucket Collection Column
Family
Vertex and
Edge
Row Key/value
pair
Document Column Vertex
Column Key/value
pair
Key/value
pair
Vertex and
Edge property
Relationship Link Edge
Scalability vs Complexity
S
c
a
l
a
b
i
l
i
t
y
Complexity
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
Radioactive
label Person
id marie_curie
name Marie Curie
occupation scientist
Marie Curie
label nature
id radioactive
name Radioactive
discovers
when 1867
where Europe
Graph Database
TinkerPop
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
● Man
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));
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT name 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))
.values("name");
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT count(*) 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))
.count();
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25))
.groupCount()
.by(“city”);
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();
g.V().repeat(out("eats"))
.times(3);
g.V().repeat(out("eats"))
.until(has("name", "grass"));
//path().by("name");
TinkerPop
Our database
is too slow and
not big enough!
We need
NoSql!
Thank You
Otávio Santana
@otaviojava
osantana@tomitribe.com
otaviojava@apache.org

Mais conteúdo relacionado

Mais de Otávio Santana

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 JavaOtávio Santana
 
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 endOtávio Santana
 
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 CloudOtávio Santana
 
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?Otávio Santana
 
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 AgeOtávio Santana
 
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.0Otávio Santana
 
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]Otávio Santana
 
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]Otávio Santana
 
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]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 graphThe new generation of data persistence with graph
The new generation of data persistence with graphOtávio Santana
 
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 11Otávio Santana
 
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 - GuatemalaOtávio Santana
 
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 - MexicoOtávio Santana
 
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 DatabaseOtávio Santana
 
Management 3.0 and open source
Management 3.0 and open sourceManagement 3.0 and open source
Management 3.0 and open sourceOtávio Santana
 
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 EEOtávio Santana
 
Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!Cassandra NoSQL, NoLimits!
Cassandra NoSQL, NoLimits!Otávio Santana
 
Disasters of the century NoSQL
Disasters of the century NoSQLDisasters of the century NoSQL
Disasters of the century NoSQLOtávio Santana
 
NoSQL, no Limits, lots of Fun!
NoSQL, no Limits, lots of Fun!NoSQL, no Limits, lots of Fun!
NoSQL, no Limits, lots of Fun!Otávio Santana
 

Mais de Otávio Santana (20)

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
 
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
 
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]
 
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
 
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
 
NoSQL, no Limits, lots of Fun!
NoSQL, no Limits, lots of Fun!NoSQL, no Limits, lots of Fun!
NoSQL, no Limits, lots of Fun!
 

Último

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Último (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

Building recommendation engine graph database TinkerPop