spring-projects / spring-projects/spring-session

Community Extension: Neo4j

Open
#961 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

I’ve had a chance to continue implementing a Neo4j store for Spring Session, (shamelessly) modeled after the JBC implementation. Available from https://github.com/espiegelberg/spring-session-data-neo4j-ogm, this was initially submitted as https://github.com/spring-projects/spring-session/pull/813 but is now reworked as a community extension project.

With the goal of ultimately getting it accepted as an official community extension project and using the Spring Session 2.x codebase, development is far enough along that I’d like to get some feedback and begin to smooth out the rough edges. My project is undoubtedly not perfect but in asking for feedback early’ish rather than late’ish I’m be happy to iterate and make any adjustments as needed.

A few comments and questions:

  1. Please review my contribution; any and all feedback is appreciated.

  2. Looking at the MongoDB community extension project, the repo’s name is spring-session-data-mongodb and the project’s name is Spring Session MongoDB. I assume that means my contribution should be spring-session-data-neo4j-ogm (I’d like to add the ogm, as other Neo4j implementations could use something other than OGM) with a project name of Spring Session Neo4j Ogm. Please let me know if this should be changed.

  3. I have what I feel is a reasonable amount of test coverage, again (seamlessly) modeled after the JDBC implementation’s tests.

  4. My next step is to validate my contribution works in an actual application. For this, I’ve created a sample spring boot web app, available from https://github.com/espiegelberg/spring-session-data-sample-javaconfig-neo4j-ogm, to validate against. The project’s README.md includes quickstart instructions, allowing anyone (including those unfamiliar with Neo4j) to get the project up and running quickly.

  5. Using the above sample application, I’m experiencing an issue where each time the web application is hit a new session is created; resulting in a new node (ie: database record) being created in Neo4j. This is clearly incorrect, as the existing session should be found rather than a new one created. So I have some work left to do and am working to identify and resolve the issue. While I assume the issue lies within my code, the fact that Spring Session is at 2.0.0-SNAPSHOT (rather than 2.0.0.RELEASE) makes it plausible that the issue is within spring-session-core. So while I continue to investigate, in parallel I would appreciate a second set of eyes from the core Spring Session team, who undoubtedly know and understand the core project code better than I.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the external spring-session-data-neo4j-ogm repository and its README.md, then compare its tests with the JDBC implementation's tests. Validate it with the linked sample Spring Boot application and investigate why each request creates a new Neo4j session node instead of finding the existing session. Done means the extension has resolved that behavior and received the requested project feedback.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, neo4j, spring
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.