1) Yes, you CAN use this design although it is typically not necessary. You can easily create different disconnected sub-graphs within the same Neo database. You could use a Label naming convention to differentiate the subgraphs. For example, you might prefix all of your Node Labels with the service name. This would ensure that the index space was separated and that the graphs remained separate. You would gain the benefit of being able to administratively query across all of the graphs to easily get information about the overall state / usage of your service.
The downsides to having multiple databases are the same as with any other database. You have to manage and deal with the overhead of maintaining, backing up, etc multiple instances. I would recommend storing everything in one database. 2) No, there is no directly supported way to create a new instance via REST. If you are running in embedded mode then you can certainly use the Java APIs to create, start, stop or delete new instances. Clark Richey [email protected] > On Jan 13, 2016, at 3:32 PM, Vikas S <[email protected]> wrote: > > I understand similar question has been asked before, however I still want to > get expert opinion about my situation. > > We are creating a graph service/library (lets call this Topology library) > which different services will use to store graphs and apply some graph > algorithms on those graphs. This library will internally use one the neo4j > client library (e.g. py2neo) to talk to neo4j server over REST. Each of the > services using Topology library will store its own graph through this library > will perform search and update in sub sequent calls on their corresponding > graph. > > As neo4j does not support storing multiple graph in single instance, I am > thinking of creating a new instance of neo4j whenever a service calls > Topology library to create a new graph. Topology service in turn will create > a new instance of neo4j in this case and create that graph on that instance. > That service will provide the name of that graph and topology library will > use that name as reference for sub sequent search/update calls on that graph. > Initially each of these graph can be created in single machine but in the > long run we can explore using Containers on top of Kubernetes to ensure that > different neo4j instance containers are created on the machines which have > enough resources. > > My questions are - > 1. Is it a good and valid design? I have not used neo4j before, what issues > this design can have? > 2. If yes, does neo4j provide an API/REST interface to create/start/top/kill > a new instance? > > Thanks in advance ! > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
