SlideShare a Scribd company logo
© 2022 Neo4j, Inc. All rights reserved.
© 2022 Neo4j, Inc. All rights reserved.
Fun with Fabric in 15
Eric Monk,
Principal Solutions Engineer
© 2022 Neo4j, Inc. All rights reserved.
2
What is Fabric?
© 2022 Neo4j, Inc. All rights reserved.
Fabric
• Enables distributing different
data across multiple Neo4j
DBMSs
• Enables searching data across
multiple Neo4j DBMSs in one
Cypher query
• Cluster = same data + replicated
• Fabric = different data + not
replicated
3
Fabric DB
DB1
DB2
© 2022 Neo4j, Inc. All rights reserved.
Fabric
• DB1 and DB2 are sometimes
referred to as shards
• They are normal Neo4j DBMSs
◦ Can be clusters
• Fabric DB knows about the
shards
4
Fabric DB
DB1
DB2
© 2022 Neo4j, Inc. All rights reserved.
Fabric - Why?
• Ability to scale massively for
reading and writing
• Demo from Nodes 2021
◦ 1000+ shards
◦ 900 million relationships per shard
◦ 182 millions nodes per shard
◦ Total relationships = 1 trillion
◦ Total data size = 280 TB
◦ Constant read performance
(<100ms) as scaled 2 orders of
magnitude
5
Fabric DB
DB1
DB2
Read more: https://neo4j.com/developer-
blog/behind-the-scenes-worlds-biggest-graph-
database/
© 2022 Neo4j, Inc. All rights reserved.
Remote
Local
Fabric - Today we will keep it small
• Local Fabric DB
• Local Neo4j DB (Shard1)
• Remote AuraDB (Shard2)
6
Fabric DB
LocalDB
AuraDB
• Architecture Icon
used in upcoming
slides
• Affected area will
be colored
© 2022 Neo4j, Inc. All rights reserved.
7
AuraDB Setup
© 2022 Neo4j, Inc. All rights reserved.
Create AuraDB free instance
• Goto
https://console.neo4j.io/
• Sign-up or sign-in
• Click New Instance
8
© 2022 Neo4j, Inc. All rights reserved.
Create AuraDB free instance
9
Pick this one
© 2022 Neo4j, Inc. All rights reserved.
Create AuraDB free instance
10
Pick this one
© 2022 Neo4j, Inc. All rights reserved.
Create AuraDB free instance
11
Save
password
somewhere
safe
Click continue
© 2022 Neo4j, Inc. All rights reserved.
Create AuraDB free instance
12
It will take a
few minutes
to setup
Click Query
when status
goes to
Running
© 2022 Neo4j, Inc. All rights reserved.
Connect to Aura Free Instance
13
Enter
password and
click Connect
Successful
connection
shows URL -
we'll need
that later
© 2022 Neo4j, Inc. All rights reserved.
14
Local DB Setup
© 2022 Neo4j, Inc. All rights reserved.
Setup Local (non-Fabric) DB
• Prerequisite
◦ Neo4j Desktop installed
◦ Local Neo4j DBMS installed with neo4j default database
• Open Neo4j Browser and connect to default database
◦ http://localhost:7474
• Run commands
◦ CREATE OR REPLACE DATABASE stackoverflow
◦ :use stackoverflow
15
© 2022 Neo4j, Inc. All rights reserved.
16
Import Stack Overflow Data
© 2022 Neo4j, Inc. All rights reserved.
Import Stack Overflow Data
• Launch free Neo4j Sandbox
• https://sandbox.neo4j.com/
• Select Stack Overflow
• Click Open - Goto Step 3 in
guide
(:play
https://guides.neo4j.com/sandbox/stackoverflow/index.htm
l)
17
© 2022 Neo4j, Inc. All rights reserved.
Import Stack Overflow Data
• In Local DB
◦ Run this statement
◦ Modify tags
◦ Run once with 'neo4j' and
once with 'cypher'
• In AuraDB
◦ Run this statement
◦ Hardcode page to 20
◦ Run once with 'graphql' and
once with 'fabric'
18
Hardcode to
20 for Aura
Run 1 tag at
a time
© 2022 Neo4j, Inc. All rights reserved.
19
Local Fabric DB Setup
© 2022 Neo4j, Inc. All rights reserved.
Setup Fabric DB
fabric.database.name=localfabric
fabric.graph.0.uri=neo4j+s://8e4573c2.databases.neo4j.io:7687
fabric.graph.0.database=neo4j
fabric.graph.0.name=auraso
fabric.graph.1.uri=bolt://localhost:7687
fabric.graph.1.database=stackoverflow
fabric.graph.1.name=localso
fabric.graph.1.driver.ssl_enabled=false
dbms.ssl.policy.fabric.enabled=true
dbms.ssl.policy.fabric.base_directory=certificates
dbms.ssl.policy.fabric.trust_all=true
20
Modify neo4j.conf and restart
Name of fabric db
AuraDB settings
Local DB Settings -
disable SSL for local
DB
Need SSL enabled for
AuraDB
© 2022 Neo4j, Inc. All rights reserved.
Setup Fabric DB
21
Fabric DB
© 2022 Neo4j, Inc. All rights reserved.
22
Fabric Users Setup
© 2022 Neo4j, Inc. All rights reserved.
Create Fabric User in AuraDB
• While in a non-system database
◦ :param password => 'graphconnect2022'
• Switch to system database
◦ CREATE USER gc_fabric SET PASSWORD $password CHANGE NOT
REQUIRED
• Not required in Aura free, may need to do this in Aura Professional or
Enterprise
◦ GRANT ROLE reader TO gc_fabric
23
© 2022 Neo4j, Inc. All rights reserved.
Test User is Created
• In Neo4j Browser run
◦ :server disconnect
• Enter username
◦ gc_fabric
• Enter password
◦ graphconnect2022
• Switch back to neo4j
database
24
© 2022 Neo4j, Inc. All rights reserved.
Create User in local db
• While in a non-system database
◦ :param password => 'graphconnect2022'
• Switch to system database
◦ CREATE USER gc_fabric SET PASSWORD $password CHANGE NOT
REQUIRED
• Grant reader role to gc_fabric
◦ GRANT ROLE reader TO gc_fabric
• User valid for both local db stackoverflow and localfabric
25
© 2022 Neo4j, Inc. All rights reserved.
26
Fabric Query
© 2022 Neo4j, Inc. All rights reserved.
Login into Local Stackoverflow DB
• In Neo4j Browser connect @
http://localhost:7474
◦ :server disconnect
• Login with gc_fabric /
graphconnect2022
• Once logged in switch to
stackoverflow db
27
© 2022 Neo4j, Inc. All rights reserved.
Query local stackoverflow db
MATCH (q:Question)-[:TAGGED]->(t:Tag)
RETURN t.name as tag, count(q) as numQuestions
ORDER BY numQuestions DESC
28
© 2022 Neo4j, Inc. All rights reserved.
Switch to Local Fabric DB
• Enter :use localfabric
-or-
• Click localfabric from the
dropdown
29
© 2022 Neo4j, Inc. All rights reserved.
Query Local DB through Fabric
CALL {
USE localfabric.localso
MATCH (q:Question)-[:TAGGED]->(t:Tag)
RETURN t.name as tag, count(q) as numQuestions
}
RETURN tag, numQuestions
ORDER BY numQuestions DESC
30
Same Results
© 2022 Neo4j, Inc. All rights reserved.
Query AuraDB through Fabric
CALL {
USE localfabric.auraso
MATCH (q:Question)-[:TAGGED]->(t:Tag)
RETURN t.name as tag, count(q) as numQuestions
}
RETURN tag, numQuestions
ORDER BY numQuestions DESC
31
Remote Results
© 2022 Neo4j, Inc. All rights reserved.
Query both DBs with UNION ALL
CALL {
USE localfabric.localso
MATCH (q:Question)-[:TAGGED]->(t:Tag)
RETURN t.name as tag, count(q) as numQuestions
}
RETURN tag, numQuestions
ORDER BY numQuestions DESC
UNION ALL
CALL {
USE localfabric.auraso
MATCH (q:Question)-[:TAGGED]->(t:Tag)
RETURN t.name as tag, count(q) as numQuestions
}
RETURN tag, numQuestions
ORDER BY numQuestions DESC
32
Duplicate Results!
Not what we want
© 2022 Neo4j, Inc. All rights reserved.
Collect and Merge to combine results
CALL {
USE localfabric.localso
MATCH (q:Question)-[:TAGGED]->(t:Tag)
RETURN t.name as tag, count(q) as numQuestions
}
WITH collect([tag, numQuestions]) as localResults
WITH apoc.map.fromPairs(localResults) as
localResultsMap
...
33
Collect up results so
we can combine them
with other results
© 2022 Neo4j, Inc. All rights reserved.
Collect and Merge to combine results
...
CALL {
USE localfabric.auraso
MATCH (q:Question)-[:TAGGED]->(t:Tag)
RETURN t.name as tag, count(q) as numQuestions
}
WITH localResultsMap, apoc.map.fromPairs(
collect([
tag,
numQuestions +
coalesce(localResultsMap[tag], 0)
])
) as auraCombinedWithMatchingLocalMap
...
34
Call aura
Look for matches in
localResultsMap and
add counts
© 2022 Neo4j, Inc. All rights reserved.
Collect and Merge to combine results
...
WITH apoc.map.merge(
localResultsMap,
auraCombinedWithMatchingLocalMap
) as combinedMap
UNWIND keys(combinedMap) as tag
RETURN tag, combinedMap[tag] as numQuestions
ORDER BY numQuestions DESC
35
Combine local map with
merged map.
Merged map entries
override matched local
entries.
© 2022 Neo4j, Inc. All rights reserved.
Results are intelligently combined
36
Results are combined
intelligently
© 2022 Neo4j, Inc. All rights reserved.
37
Summary
© 2022 Neo4j, Inc. All rights reserved.
Summary
38
• Use Fabric to massively scale
• Fabric DB knows about other Neo4j DBMSs via neo4j.conf
• Need same username/password across all DBMSs
• Use CALL { USE dbname … } to access databases
• You can combine results from many databases in a single call
• How you model and shard will determine the best way to query
© 2022 Neo4j, Inc. All rights reserved.
© 2022 Neo4j, Inc. All rights reserved.
39
Thank you!
Contact us at
sales@neo4j.com

More Related Content

Similar to Fun with Fabric in 15

6212883126866262792 performance testing_cloud
6212883126866262792 performance testing_cloud6212883126866262792 performance testing_cloud
6212883126866262792 performance testing_cloud
Locuto Riorama
 
apache-spark-programming-with-databricks.pdf
apache-spark-programming-with-databricks.pdfapache-spark-programming-with-databricks.pdf
apache-spark-programming-with-databricks.pdf
Alfredo Lorie
 
Intermediate Cypher.pdf
Intermediate Cypher.pdfIntermediate Cypher.pdf
Intermediate Cypher.pdf
Neo4j
 
Taming Large Databases
Taming Large DatabasesTaming Large Databases
Taming Large Databases
Neo4j
 
Ultime Novità di Prodotto Neo4j
Ultime Novità di Prodotto Neo4j Ultime Novità di Prodotto Neo4j
Ultime Novità di Prodotto Neo4j
Neo4j
 
The True Cost of NoSQL DBaaS Options
The True Cost of NoSQL DBaaS OptionsThe True Cost of NoSQL DBaaS Options
The True Cost of NoSQL DBaaS Options
ScyllaDB
 
Road to NODES - Blazing Fast Ingest with Apache Arrow
Road to NODES - Blazing Fast Ingest with Apache ArrowRoad to NODES - Blazing Fast Ingest with Apache Arrow
Road to NODES - Blazing Fast Ingest with Apache Arrow
Neo4j
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
Frederic Descamps
 
Introduction to Neo4j AuraDB: Your Fastest Path to Graph
Introduction to Neo4j AuraDB: Your Fastest Path to GraphIntroduction to Neo4j AuraDB: Your Fastest Path to Graph
Introduction to Neo4j AuraDB: Your Fastest Path to Graph
Neo4j
 
Continuous Integration & Continuous Delivery
Continuous Integration & Continuous DeliveryContinuous Integration & Continuous Delivery
Continuous Integration & Continuous Delivery
Databricks
 
Apache Hadoop 3
Apache Hadoop 3Apache Hadoop 3
Apache Hadoop 3
Cloudera, Inc.
 
A Schema Migration Tool for the Neo4j Database(Pavel_Kutac).pptx
A Schema Migration Tool for the Neo4j Database(Pavel_Kutac).pptxA Schema Migration Tool for the Neo4j Database(Pavel_Kutac).pptx
A Schema Migration Tool for the Neo4j Database(Pavel_Kutac).pptx
Neo4j
 
MySQL 5.7: Core Server Changes
MySQL 5.7: Core Server ChangesMySQL 5.7: Core Server Changes
MySQL 5.7: Core Server ChangesMorgan Tocker
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
Severalnines
 
Road to NODES - Handling Neo4j Data with Apache Hop
Road to NODES - Handling Neo4j Data with Apache HopRoad to NODES - Handling Neo4j Data with Apache Hop
Road to NODES - Handling Neo4j Data with Apache Hop
Neo4j
 
NDC Sydney - Analyzing StackExchange with Azure Data Lake
NDC Sydney - Analyzing StackExchange with Azure Data LakeNDC Sydney - Analyzing StackExchange with Azure Data Lake
NDC Sydney - Analyzing StackExchange with Azure Data Lake
Tom Kerkhove
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
Online Upgrade Using Logical Replication
 Online Upgrade Using Logical Replication Online Upgrade Using Logical Replication
Online Upgrade Using Logical Replication
EDB
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 

Similar to Fun with Fabric in 15 (20)

6212883126866262792 performance testing_cloud
6212883126866262792 performance testing_cloud6212883126866262792 performance testing_cloud
6212883126866262792 performance testing_cloud
 
apache-spark-programming-with-databricks.pdf
apache-spark-programming-with-databricks.pdfapache-spark-programming-with-databricks.pdf
apache-spark-programming-with-databricks.pdf
 
Intermediate Cypher.pdf
Intermediate Cypher.pdfIntermediate Cypher.pdf
Intermediate Cypher.pdf
 
Taming Large Databases
Taming Large DatabasesTaming Large Databases
Taming Large Databases
 
Ultime Novità di Prodotto Neo4j
Ultime Novità di Prodotto Neo4j Ultime Novità di Prodotto Neo4j
Ultime Novità di Prodotto Neo4j
 
The True Cost of NoSQL DBaaS Options
The True Cost of NoSQL DBaaS OptionsThe True Cost of NoSQL DBaaS Options
The True Cost of NoSQL DBaaS Options
 
Road to NODES - Blazing Fast Ingest with Apache Arrow
Road to NODES - Blazing Fast Ingest with Apache ArrowRoad to NODES - Blazing Fast Ingest with Apache Arrow
Road to NODES - Blazing Fast Ingest with Apache Arrow
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
Introduction to Neo4j AuraDB: Your Fastest Path to Graph
Introduction to Neo4j AuraDB: Your Fastest Path to GraphIntroduction to Neo4j AuraDB: Your Fastest Path to Graph
Introduction to Neo4j AuraDB: Your Fastest Path to Graph
 
Continuous Integration & Continuous Delivery
Continuous Integration & Continuous DeliveryContinuous Integration & Continuous Delivery
Continuous Integration & Continuous Delivery
 
Apache Hadoop 3
Apache Hadoop 3Apache Hadoop 3
Apache Hadoop 3
 
A Schema Migration Tool for the Neo4j Database(Pavel_Kutac).pptx
A Schema Migration Tool for the Neo4j Database(Pavel_Kutac).pptxA Schema Migration Tool for the Neo4j Database(Pavel_Kutac).pptx
A Schema Migration Tool for the Neo4j Database(Pavel_Kutac).pptx
 
MySQL 5.7: Core Server Changes
MySQL 5.7: Core Server ChangesMySQL 5.7: Core Server Changes
MySQL 5.7: Core Server Changes
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
Road to NODES - Handling Neo4j Data with Apache Hop
Road to NODES - Handling Neo4j Data with Apache HopRoad to NODES - Handling Neo4j Data with Apache Hop
Road to NODES - Handling Neo4j Data with Apache Hop
 
NDC Sydney - Analyzing StackExchange with Azure Data Lake
NDC Sydney - Analyzing StackExchange with Azure Data LakeNDC Sydney - Analyzing StackExchange with Azure Data Lake
NDC Sydney - Analyzing StackExchange with Azure Data Lake
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
 
Online Upgrade Using Logical Replication
 Online Upgrade Using Logical Replication Online Upgrade Using Logical Replication
Online Upgrade Using Logical Replication
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
 

More from Neo4j

Atelier - Architecture d’applications de Graphes - GraphSummit Paris
Atelier - Architecture d’applications de Graphes - GraphSummit ParisAtelier - Architecture d’applications de Graphes - GraphSummit Paris
Atelier - Architecture d’applications de Graphes - GraphSummit Paris
Neo4j
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
FLOA - Détection de Fraude - GraphSummit Paris
FLOA -  Détection de Fraude - GraphSummit ParisFLOA -  Détection de Fraude - GraphSummit Paris
FLOA - Détection de Fraude - GraphSummit Paris
Neo4j
 
SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...
SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...
SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...
Neo4j
 
ADEO - Knowledge Graph pour le e-commerce, entre challenges et opportunités ...
ADEO -  Knowledge Graph pour le e-commerce, entre challenges et opportunités ...ADEO -  Knowledge Graph pour le e-commerce, entre challenges et opportunités ...
ADEO - Knowledge Graph pour le e-commerce, entre challenges et opportunités ...
Neo4j
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
Neo4j
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
Neo4j
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
Neo4j
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
Neo4j
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Neo4j
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
Neo4j
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Neo4j
 

More from Neo4j (20)

Atelier - Architecture d’applications de Graphes - GraphSummit Paris
Atelier - Architecture d’applications de Graphes - GraphSummit ParisAtelier - Architecture d’applications de Graphes - GraphSummit Paris
Atelier - Architecture d’applications de Graphes - GraphSummit Paris
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
FLOA - Détection de Fraude - GraphSummit Paris
FLOA -  Détection de Fraude - GraphSummit ParisFLOA -  Détection de Fraude - GraphSummit Paris
FLOA - Détection de Fraude - GraphSummit Paris
 
SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...
SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...
SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...
 
ADEO - Knowledge Graph pour le e-commerce, entre challenges et opportunités ...
ADEO -  Knowledge Graph pour le e-commerce, entre challenges et opportunités ...ADEO -  Knowledge Graph pour le e-commerce, entre challenges et opportunités ...
ADEO - Knowledge Graph pour le e-commerce, entre challenges et opportunités ...
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 

Recently uploaded

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 

Fun with Fabric in 15

  • 1. © 2022 Neo4j, Inc. All rights reserved. © 2022 Neo4j, Inc. All rights reserved. Fun with Fabric in 15 Eric Monk, Principal Solutions Engineer
  • 2. © 2022 Neo4j, Inc. All rights reserved. 2 What is Fabric?
  • 3. © 2022 Neo4j, Inc. All rights reserved. Fabric • Enables distributing different data across multiple Neo4j DBMSs • Enables searching data across multiple Neo4j DBMSs in one Cypher query • Cluster = same data + replicated • Fabric = different data + not replicated 3 Fabric DB DB1 DB2
  • 4. © 2022 Neo4j, Inc. All rights reserved. Fabric • DB1 and DB2 are sometimes referred to as shards • They are normal Neo4j DBMSs ◦ Can be clusters • Fabric DB knows about the shards 4 Fabric DB DB1 DB2
  • 5. © 2022 Neo4j, Inc. All rights reserved. Fabric - Why? • Ability to scale massively for reading and writing • Demo from Nodes 2021 ◦ 1000+ shards ◦ 900 million relationships per shard ◦ 182 millions nodes per shard ◦ Total relationships = 1 trillion ◦ Total data size = 280 TB ◦ Constant read performance (<100ms) as scaled 2 orders of magnitude 5 Fabric DB DB1 DB2 Read more: https://neo4j.com/developer- blog/behind-the-scenes-worlds-biggest-graph- database/
  • 6. © 2022 Neo4j, Inc. All rights reserved. Remote Local Fabric - Today we will keep it small • Local Fabric DB • Local Neo4j DB (Shard1) • Remote AuraDB (Shard2) 6 Fabric DB LocalDB AuraDB • Architecture Icon used in upcoming slides • Affected area will be colored
  • 7. © 2022 Neo4j, Inc. All rights reserved. 7 AuraDB Setup
  • 8. © 2022 Neo4j, Inc. All rights reserved. Create AuraDB free instance • Goto https://console.neo4j.io/ • Sign-up or sign-in • Click New Instance 8
  • 9. © 2022 Neo4j, Inc. All rights reserved. Create AuraDB free instance 9 Pick this one
  • 10. © 2022 Neo4j, Inc. All rights reserved. Create AuraDB free instance 10 Pick this one
  • 11. © 2022 Neo4j, Inc. All rights reserved. Create AuraDB free instance 11 Save password somewhere safe Click continue
  • 12. © 2022 Neo4j, Inc. All rights reserved. Create AuraDB free instance 12 It will take a few minutes to setup Click Query when status goes to Running
  • 13. © 2022 Neo4j, Inc. All rights reserved. Connect to Aura Free Instance 13 Enter password and click Connect Successful connection shows URL - we'll need that later
  • 14. © 2022 Neo4j, Inc. All rights reserved. 14 Local DB Setup
  • 15. © 2022 Neo4j, Inc. All rights reserved. Setup Local (non-Fabric) DB • Prerequisite ◦ Neo4j Desktop installed ◦ Local Neo4j DBMS installed with neo4j default database • Open Neo4j Browser and connect to default database ◦ http://localhost:7474 • Run commands ◦ CREATE OR REPLACE DATABASE stackoverflow ◦ :use stackoverflow 15
  • 16. © 2022 Neo4j, Inc. All rights reserved. 16 Import Stack Overflow Data
  • 17. © 2022 Neo4j, Inc. All rights reserved. Import Stack Overflow Data • Launch free Neo4j Sandbox • https://sandbox.neo4j.com/ • Select Stack Overflow • Click Open - Goto Step 3 in guide (:play https://guides.neo4j.com/sandbox/stackoverflow/index.htm l) 17
  • 18. © 2022 Neo4j, Inc. All rights reserved. Import Stack Overflow Data • In Local DB ◦ Run this statement ◦ Modify tags ◦ Run once with 'neo4j' and once with 'cypher' • In AuraDB ◦ Run this statement ◦ Hardcode page to 20 ◦ Run once with 'graphql' and once with 'fabric' 18 Hardcode to 20 for Aura Run 1 tag at a time
  • 19. © 2022 Neo4j, Inc. All rights reserved. 19 Local Fabric DB Setup
  • 20. © 2022 Neo4j, Inc. All rights reserved. Setup Fabric DB fabric.database.name=localfabric fabric.graph.0.uri=neo4j+s://8e4573c2.databases.neo4j.io:7687 fabric.graph.0.database=neo4j fabric.graph.0.name=auraso fabric.graph.1.uri=bolt://localhost:7687 fabric.graph.1.database=stackoverflow fabric.graph.1.name=localso fabric.graph.1.driver.ssl_enabled=false dbms.ssl.policy.fabric.enabled=true dbms.ssl.policy.fabric.base_directory=certificates dbms.ssl.policy.fabric.trust_all=true 20 Modify neo4j.conf and restart Name of fabric db AuraDB settings Local DB Settings - disable SSL for local DB Need SSL enabled for AuraDB
  • 21. © 2022 Neo4j, Inc. All rights reserved. Setup Fabric DB 21 Fabric DB
  • 22. © 2022 Neo4j, Inc. All rights reserved. 22 Fabric Users Setup
  • 23. © 2022 Neo4j, Inc. All rights reserved. Create Fabric User in AuraDB • While in a non-system database ◦ :param password => 'graphconnect2022' • Switch to system database ◦ CREATE USER gc_fabric SET PASSWORD $password CHANGE NOT REQUIRED • Not required in Aura free, may need to do this in Aura Professional or Enterprise ◦ GRANT ROLE reader TO gc_fabric 23
  • 24. © 2022 Neo4j, Inc. All rights reserved. Test User is Created • In Neo4j Browser run ◦ :server disconnect • Enter username ◦ gc_fabric • Enter password ◦ graphconnect2022 • Switch back to neo4j database 24
  • 25. © 2022 Neo4j, Inc. All rights reserved. Create User in local db • While in a non-system database ◦ :param password => 'graphconnect2022' • Switch to system database ◦ CREATE USER gc_fabric SET PASSWORD $password CHANGE NOT REQUIRED • Grant reader role to gc_fabric ◦ GRANT ROLE reader TO gc_fabric • User valid for both local db stackoverflow and localfabric 25
  • 26. © 2022 Neo4j, Inc. All rights reserved. 26 Fabric Query
  • 27. © 2022 Neo4j, Inc. All rights reserved. Login into Local Stackoverflow DB • In Neo4j Browser connect @ http://localhost:7474 ◦ :server disconnect • Login with gc_fabric / graphconnect2022 • Once logged in switch to stackoverflow db 27
  • 28. © 2022 Neo4j, Inc. All rights reserved. Query local stackoverflow db MATCH (q:Question)-[:TAGGED]->(t:Tag) RETURN t.name as tag, count(q) as numQuestions ORDER BY numQuestions DESC 28
  • 29. © 2022 Neo4j, Inc. All rights reserved. Switch to Local Fabric DB • Enter :use localfabric -or- • Click localfabric from the dropdown 29
  • 30. © 2022 Neo4j, Inc. All rights reserved. Query Local DB through Fabric CALL { USE localfabric.localso MATCH (q:Question)-[:TAGGED]->(t:Tag) RETURN t.name as tag, count(q) as numQuestions } RETURN tag, numQuestions ORDER BY numQuestions DESC 30 Same Results
  • 31. © 2022 Neo4j, Inc. All rights reserved. Query AuraDB through Fabric CALL { USE localfabric.auraso MATCH (q:Question)-[:TAGGED]->(t:Tag) RETURN t.name as tag, count(q) as numQuestions } RETURN tag, numQuestions ORDER BY numQuestions DESC 31 Remote Results
  • 32. © 2022 Neo4j, Inc. All rights reserved. Query both DBs with UNION ALL CALL { USE localfabric.localso MATCH (q:Question)-[:TAGGED]->(t:Tag) RETURN t.name as tag, count(q) as numQuestions } RETURN tag, numQuestions ORDER BY numQuestions DESC UNION ALL CALL { USE localfabric.auraso MATCH (q:Question)-[:TAGGED]->(t:Tag) RETURN t.name as tag, count(q) as numQuestions } RETURN tag, numQuestions ORDER BY numQuestions DESC 32 Duplicate Results! Not what we want
  • 33. © 2022 Neo4j, Inc. All rights reserved. Collect and Merge to combine results CALL { USE localfabric.localso MATCH (q:Question)-[:TAGGED]->(t:Tag) RETURN t.name as tag, count(q) as numQuestions } WITH collect([tag, numQuestions]) as localResults WITH apoc.map.fromPairs(localResults) as localResultsMap ... 33 Collect up results so we can combine them with other results
  • 34. © 2022 Neo4j, Inc. All rights reserved. Collect and Merge to combine results ... CALL { USE localfabric.auraso MATCH (q:Question)-[:TAGGED]->(t:Tag) RETURN t.name as tag, count(q) as numQuestions } WITH localResultsMap, apoc.map.fromPairs( collect([ tag, numQuestions + coalesce(localResultsMap[tag], 0) ]) ) as auraCombinedWithMatchingLocalMap ... 34 Call aura Look for matches in localResultsMap and add counts
  • 35. © 2022 Neo4j, Inc. All rights reserved. Collect and Merge to combine results ... WITH apoc.map.merge( localResultsMap, auraCombinedWithMatchingLocalMap ) as combinedMap UNWIND keys(combinedMap) as tag RETURN tag, combinedMap[tag] as numQuestions ORDER BY numQuestions DESC 35 Combine local map with merged map. Merged map entries override matched local entries.
  • 36. © 2022 Neo4j, Inc. All rights reserved. Results are intelligently combined 36 Results are combined intelligently
  • 37. © 2022 Neo4j, Inc. All rights reserved. 37 Summary
  • 38. © 2022 Neo4j, Inc. All rights reserved. Summary 38 • Use Fabric to massively scale • Fabric DB knows about other Neo4j DBMSs via neo4j.conf • Need same username/password across all DBMSs • Use CALL { USE dbname … } to access databases • You can combine results from many databases in a single call • How you model and shard will determine the best way to query
  • 39. © 2022 Neo4j, Inc. All rights reserved. © 2022 Neo4j, Inc. All rights reserved. 39 Thank you! Contact us at sales@neo4j.com