Skip to content

Commit 4b4574d

Browse files
Rewrite fabric docs to composite database docs
1 parent 5158683 commit 4b4574d

File tree

3 files changed

+54
-35
lines changed

3 files changed

+54
-35
lines changed

doc/modules/ROOT/content-nav.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
** xref:end-to-end-examples/fastrp-knn-example.adoc[]
147147
* xref:production-deployment/index.adoc[]
148148
** xref:production-deployment/transaction-handling.adoc[]
149-
** xref:production-deployment/fabric.adoc[]
149+
** xref:production-deployment/composite.adoc[]
150150
** xref:production-deployment/neo4j-cluster.adoc[]
151151
** xref:production-deployment/feature-toggles.adoc[]
152152
* xref:python-client/index.adoc[]

doc/modules/ROOT/pages/production-deployment/fabric.adoc renamed to doc/modules/ROOT/pages/production-deployment/composite.adoc

Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,60 @@
1-
[[fabric]]
2-
= Using GDS and Fabric
3-
:description: This section describes how the Neo4j Graph Data Science library can be used in a Neo4j Fabric deployment.
1+
[[composite]]
2+
// Putting "Fabric" in the header might help with searching for the
3+
// case that users are not familiar with composite databases yet
4+
= Using GDS and composite databases (formerly known as Fabric)
5+
:description: This section describes how the Neo4j Graph Data Science library can be used in a Neo4j composite database deployment.
46

57

68
include::partial$/common-usage/not-on-aurads-note.adoc[]
79

8-
Neo4j Fabric is a way to store and retrieve data in multiple databases, whether they are on the same Neo4j DBMS or in multiple DBMSs, using a single Cypher query.
9-
For more information about Fabric itself, please visit the https://neo4j.com/docs/operations-manual/4.4/fabric/introduction/[Fabric documentation].
10+
Neo4j composite databases are a way to store and retrieve data in multiple databases, whether they are on the same Neo4j DBMS or in multiple DBMSs, using a single Cypher query.
11+
For more information about Composite databases/Fabric itself, please visit the
1012

11-
A typical Neo4j Fabric setup consists of two components: one or more shards that hold the data and one or more Fabric proxies that coordinate the distributed queries.
12-
There are two ways of running the Neo4j Graph Data Science library in a Fabric deployment, both of which are covered in this section:
13+
[.tabbed-example, caption = ]
14+
====
1315
14-
. Running GDS on a Fabric <<fabric-shard, _shard_>>
15-
. Running GDS on a Fabric <<fabric-proxy, _proxy_>>
16+
[.include-with-neo4j-4.x]
17+
=====
18+
https://neo4j.com/docs/operations-manual/4.4/fabric/introduction/[Fabric documentation].
19+
=====
1620
17-
[[fabric-shard]]
21+
[.include-with-neo4j-5.x]
22+
=====
23+
https://neo4j.com/docs/operations-manual/current/composite-databases/[Composite databases documentation].
24+
=====
25+
26+
====
27+
28+
NOTE: For simplicity this documentation page further only mentions composite databases which are available from Neo4j 5.0 on. As GDS supports 4.x and 5.x Neo4j versions this documentation can be also applied to Fabric setups using the exact same queries and examples as shown below.
29+
30+
A typical Neo4j composite setup consists of two components: one or more shards (constituents) that hold the data and one composite database that coordinates the distributed queries.
31+
There are two ways of running the Neo4j Graph Data Science library in a composite deployment, both of which are covered in this section:
32+
33+
. Running GDS on a Composite <<composite-shard, _shard_>>
34+
. Running GDS on a Composite <<composite-proxy, _database_>>
35+
36+
[[composite-shard]]
1837
== Running GDS on the Shards
1938

20-
In this mode of using GDS in a Fabric environment, the GDS operations are executed on the shards.
21-
The graph projections and algorithms are then executed on each shard individually, and the results can be combined via the Fabric proxy.
39+
In this mode of using GDS in a composite environment, the GDS operations are executed on the shards.
40+
The graph projections and algorithms are then executed on each shard individually, and the results can be combined via the composite database.
2241
This scenario is useful, if the graph is partitioned into disjoint subgraphs across shards, i.e. there is no logical relationship between nodes on different shards.
2342
Another use case is to replicate the graph's topology across multiple shards, where some shards act as operational and others as analytical databases.
2443

25-
[[fabric-shard-setup]]
44+
[[composite-shard-setup]]
2645
=== Setup
2746

2847
In this scenario we need to set up the shards to run the Neo4j Graph Data Science library.
2948

3049
Every shard that will run the Graph Data Science library should be configured just as a standalone GDS database would be, for more information see xref:installation/index.adoc[Installation].
3150

32-
The Fabric proxy nodes do not require any special configuration, i.e., the GDS library plugin does not need to be installed.
33-
However, the proxy nodes should be configured to handle the amount of data received from the shards.
51+
The composite database does not require any special configuration, i.e., the GDS library plugin does not need to be installed.
52+
However, the Composite database should be configured to handle the amount of data received from the shards.
3453

35-
[[fabric-shard-examples]]
54+
[[composite-shard-examples]]
3655
=== Examples
3756

38-
Let's assume we have a Fabric setup with two shards.
57+
Let's assume we have a composite setup with two shards.
3958
One shard functions as the operational database and holds a graph with the schema `(Person)-[KNOWS]->(Person)`.
4059
Every `Person` node also stores an identifying property `id` and the persons `name` and possibly other properties.
4160

@@ -46,26 +65,26 @@ First we need to project a named graph on the analytical database shard.
4665
[source, cypher, role=noplay]
4766
----
4867
CALL {
49-
USE FABRIC_DB_NAME.ANALYTICS_DB
68+
USE COMPOSITE_DB_NAME.ANALYTICS_DB
5069
CALL gds.graph.project('graph', 'Person', 'KNOWS')
5170
YIELD graphName
5271
RETURN graphName
5372
}
5473
RETURN graphName
5574
----
5675

57-
Using Fabric, we can now calculate the PageRank score for each Person and join the results with the name of that Person.
76+
Using the composite database, we can now calculate the PageRank score for each Person and join the results with the name of that Person.
5877

5978
[source, cypher, role=noplay]
6079
----
6180
CALL {
62-
USE FABRIC_DB_NAME.ANALYTICS_DB
81+
USE COMPOSITE_DB_NAME.ANALYTICS_DB
6382
CALL gds.pagerank.stream('graph', {})
6483
YIELD nodeId, score AS pageRank
6584
RETURN gds.util.asNode(nodeId).id AS personId, pageRank
6685
}
6786
CALL {
68-
USE FABRIC_DB_NAME.OPERATIONAL_DB
87+
USE COMPOSITE_DB_NAME.OPERATIONAL_DB
6988
WITH personId
7089
MATCH (p {id: personId})
7190
RETURN p.name AS name
@@ -78,44 +97,44 @@ The algorithm results are streamed to the proxy, together with the unique node i
7897
For every row returned by the first subquery, the operational database is then queried for the persons name, again using the unique node id to identify the `Person` node across the shards.
7998

8099

81-
[[fabric-proxy]]
82-
== Running GDS on the Fabric Proxy
100+
[[composite-proxy]]
101+
== Running GDS on the Composite database
83102

84-
In this mode of using GDS in a Fabric environment, the GDS operations are executed on the Fabric proxy server.
103+
In this mode of using GDS in a composite environment, the GDS operations are executed on the Fabric proxy server.
85104
The graph projections are then using the data stored on the shards to construct the in-memory graph.
86105

87-
NOTE: Currently only xref:management-ops/projections/graph-project-cypher-aggregation.adoc[Cypher Aggregation] is supported for projecting in-memory graphs on a Fabric proxy.
106+
NOTE: Currently only xref:management-ops/projections/graph-project-cypher-aggregation.adoc[Cypher Aggregation] is supported for projecting in-memory graphs on a Composite database.
88107

89-
Graph algorithms can then be executed on the Fabric proxy, similar to a single machine setup.
90-
This scenario is useful, if a graph, that logically represents a single graph, is distributed to different Fabric shards.
108+
Graph algorithms can then be executed on the composite database, similar to a single machine setup.
109+
This scenario is useful, if a graph that logically represents a single graph is distributed to different Composite shards.
91110

92-
[[fabric-proxy-setup]]
111+
[[composite-proxy-setup]]
93112
=== Setup
94113

95114
In this scenario we need to set up the proxy to run the Neo4j Graph Data Science library.
96115

97-
The dbms that manages the Fabric proxy database needs to have the GDS plugin installed and configured.
116+
The dbms that manages the composite database needs to have the GDS plugin installed and configured.
98117
For more information see xref:installation/index.adoc[Installation].
99118
The proxy node should also be configured to handle the amount of data received from the shards as well as executing graph projections and algorithms.
100119

101120
Fabric shards do not need any special configuration, i.e., the GDS library plugin does not need to be installed.
102121

103-
[[fabric-proxy-examples]]
122+
[[composite-proxy-examples]]
104123
=== Examples
105124

106-
Let's assume we have a Fabric setup with two shards.
125+
Let's assume we have a composite setup with two shards.
107126
Both shards function as the operational databases and hold graphs with the schema `(Person)-[KNOWS]->(Person)`.
108127

109128
We now need to query the shards in order to drive the import process on the proxy node.
110129

111130
[source, cypher, role=noplay]
112131
----
113132
CALL {
114-
USE FABRIC_DB_NAME.FABRIC_SHARD_0_NAME
133+
USE COMPOSITE_DB_NAME.COMPOSITE_SHARD_0_NAME
115134
MATCH (p:Person) OPTIONAL MATCH (p)-[:KNOWS]->(n:Person)
116135
RETURN p, n
117136
UNION
118-
USE FABRIC_DB_NAME.FABRIC_SHARD_1_NAME
137+
USE COMPOSITE_DB_NAME.COMPOSITE_SHARD_1_NAME
119138
MATCH (p:Person) OPTIONAL MATCH (p)-[:KNOWS]->(n:Person)
120139
RETURN p, n
121140
}

doc/modules/ROOT/pages/production-deployment/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
This chapter is divided into the following sections:
77

88
* xref:production-deployment/transaction-handling.adoc[Transaction Handling]
9-
* xref:production-deployment/fabric.adoc[Using GDS and Fabric]
9+
* xref:production-deployment/composite.adoc[Using GDS and Composite databases]
1010
* xref:production-deployment/neo4j-cluster.adoc[GDS with Neo4j cluster]
1111
* xref:production-deployment/feature-toggles.adoc[GDS Feature Toggles]

0 commit comments

Comments
 (0)