-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
@snicoll and I have discussed the following idea:
At the moment, there's auto configuration for Spring Data Neo4j+Object Graph Mapping (In the following SDN+OGM). The auto configuration for SDN+OGM does several things
- It configures the "OGM Driver". The OGM Driver is an additional abstraction over several ways to address a Neo4j Instance. It can be HTTP, Embedded or the Java Driver.
- It configures the Spring Data part of SDN+OGM, that is enabling
Neo4jRepositories
and related infrastructure.
Spring Boot might contain two distinct aspects of configuring Neo4j and Spring Data Neo4j in the future:
- The Neo4j Java Driver (aka "Bolt driver") should be configured without going through Spring Data Neo4j, so that users can work with the plain driver object like they might do with a JDBC
DataSource
- The configuration would need new properties outside the
spring.data
namespace - The auto configuration for SDN+OGM would need to be improved to act according to this:
-- If there's aDriver
bean, than use that to configure the OGM part accordingly
-- If there's a none, check the old properties whether SDN+OGM can configured as before
This change would require efforts in the current OGM as well.
The benefits of such a change would be
- More choice for the users (direct Java Driver usage of our product or Spring Data abstraction)
- An migration path to upgrade to the new Neo4j driver (2.0/4.0, which will be not compatible with OGM).
We have written down about the current building blocks of an SDN+OGM application here.
Our goal is to move users to a server based solution (away from embedded) over the Bolt driver. Embedded is there to stay, but we rather see it as testing support only. That means, we might be touching @DataNeo4jTest
eventually as well. It could be improved to use Neo4j's dedicated test harness to create the embedded database in contrast as of today, where it uses OGM.
We started to detangle things by providing an interim starter for the new generation of the Java driver, Neo4jDriverProperties especially shows what we like to configure in the future.