Why doesn't neo4j support multiple graphs being run simultaneously?

I have a scenario like this:

  • I can have many projects. Let's say "Project A", "Project B", "Project C", etc.
  • Project A graph depends on Project B's Graph
  • Project C graph depends on Project B's Graph
  • Etc.

So, as discussed in multiple graph sessions, I think will not be a solution. Because when one graph is being run another will stop. Though the sessions run is very fast the Graph will be stopped for another project. So, I need to have all graphs running simultaneously but not by stopping other graphs.

So, I would like know if in near future, could we be able to run multiple graphs simultaneously?

Please note that I don't need to use multiple databases. It's because all projects depends on each other. So, all graphs to be inside the same database.

If the graphs are related to one another you can just keep them in the same DB, if they have overlapping namespaces, i.e. the same labels in both project A and B then prefix the labels. You can have completely disconnected graphs or connected graphs in the same DB.

What is your use case for wanting them in completely seperate DB's? You can have all graphs inside the same DB based on your graph model.

Yes, obviously. I don't want them in separate DB. I just want them in single DB with different Graphs. But neo4j doesn't allow us to run multiple Graphs simultaneously.

A single DB can have multiple graphs in it, you are unclear about your question. If you make a graph db, you can make nodes with project A and nodes for Project B and nodes for Project C such that they can interact with each other as requested in a single graph db. The fact that you don't want to shut them down because they need to interact means you should put them into a single graph db as stated.

Again what is your use-case for having them in "seperate graphs"? The definitions here are muddled, a graph db is a database which can contain multiple nodes and labels, when you say, you "don't want them in separate DB" what exactly do you mean, are you saying you don't want them on another machine? You can have multiple "graphs" - i.e. disconnected nodes and relationships in a single graph db such that they have depedencies on each other but represent Project A, B, C etc. as desired.

Not yet. Multigraph features are coming. You'll want to stay tuned for announcements regarding our 4.0 major release at the end of the year.

In the meantime, as Benjamin suggests, you'll want to use separate labels on your nodes to define and differentiate your "graphs", and add whatever filtering you need in your queries to ensure you're only working with the relevant graph nodes in a query.

1 Like

WOW, that's what I was expecting. Thanks.