neo4j/neo4j — pull request #1908 by jakewins (2014-02-05 00:11:46+00:00)
Title: Multi hosting

As per a discussion between me and @akolleger at Ängavallen, this commit contains the (yet-to-be-plugged-in) services for multi-hosting in the Neo4j server.

Specifically, it introduces an (again, not yet enabled in the "live" code base) meta-data database, a small Neo4j database that the server can use to store arbitrary metadata. Using that, it stores information about hosted neo4j databases. That configuration is then used by a DatabaseHosting service to create live databases in the DatabaseRegistry, which manages running databases.

New requests access their desired database through the registry. The DatabaseHosting service allows runtime creation, dropping and reconfiguration of databases while the server keeps serving requests to other databases.

Take note that this is an initial implementation, with the intent for this feature to primarily be used for developer instances and not production. Each database still retains it's own buffer pool et cetera, meaning it requires more skilled configuration to make multiple databases use available resources efficiently.

One final consideration on the debate between server hosting multiple kernels vs. kernel hosting multiple graphs: This does not preclude the latter (which we have termed "multi tenancy"), which should perhaps be our ultimate goal. Rather, this is an intermediate feature to cover an important user need for the next 2-3 years, until we have time to build multi tenancy with cross-database query capability and resource pooling.