How to split a single Neo4j database?

Is it possible to split the Neo4j database so that there are several starting points in one database, so that you can isolate all the queries, and not have multiple databases?

I thought about this, and I think it can work to a certain extent, but when things like shortcuts are used, the idea will not work, since the tag request will always span the entire database.

In any case, I would like to know if they did it successfully and how they did it.

+4
source share
1 answer

What you describe sounds like a mess. Neo4j 2.0.1 at this time does not support the multi-user function. There are various methods and strategies for implementing tiered architecture in your Neo4j database instance.

You can break sets of your property graph by label. Because nodes can have multiple labels, you can tag a single section with a unique identification tag for that section.

Please refer to the label documentation here: http://docs.neo4j.org/chunked/milestone/graphdb-neo4j-labels.html

In this strategy, it should be noted that all of your Cypher calls contain a section identifier for the label to ensure that these two sections are isolated from each other inside the graph. It is important to ensure that relations in one section are not included in another section.

, 1 Partition1. , Partition1:

MERGE (user:User:Partition1 { name: 'Peter' })
RETURN user

, Partition2:

MERGE (user:User:Partition2 { name: 'Peter' })
RETURN user

Peters Partition1 Partition2.

, , , . , .

+5

Source: https://habr.com/ru/post/1530805/


All Articles