Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j Multi-tenancy

What is the best way to achieve multi-tenancy in neo4j?

I have seen Tinkerpop and Spring Data.

I'm have multiple clients and I would like to store client info in its own database to ensure security.

I do not want to use labels or indexes to solve this problem.

like image 861
Kelly Watson Avatar asked Sep 19 '14 05:09

Kelly Watson


People also ask

Is Neo4j a multi model database?

Multi-Model: Neo4j is a single-model graph database. It does not support any other data models. If your application requires a document or key/value store, you would have to use a second database technology to support it.

What are the disadvantages of Neo4j?

Neo4j has some upper bound limit for the graph size and can support tens of billions of nodes, properties, and relationships in a single graph. No security is provided at the data level and there is no data encryption. Security auditing is not available in Neo4j.

Is Neo4j good for big data?

Graph databases like Neo4j are ideal for modeling complex relationships--and they move through big data at lightspeed.


2 Answers

You mention that you've "seen TinkerPop" but I couldn't tell if that meant you've seen it, considered it and dismissed it as a solution here, so apologies if that is the case and I'm not answering your question.

I've successfully used PartitionStrategy (formerly PartitionGraph) from TinkerPop to achieve multi-tenancy in Neo4j (and other graph databases).

You can read more about the approach here in this blog post on the subject.

like image 76
stephen mallette Avatar answered Oct 02 '22 15:10

stephen mallette


Neo4j does not support multi-tenant deployments at this time. You can run multiple instances on the same server, each one on a different port.

Alternatively, you can use a managed hosting service like GrapheneDB, which provides secure independent instances. Disclaimer: I work at GrapheneDB.

like image 42
albertoperdomo Avatar answered Oct 02 '22 15:10

albertoperdomo