spring-projects / spring-projects/spring-session

Consider making FindByIndexNameSessionRepository a standalone interface

Open
#2,115 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

As discussed with @rwinch today, we could consider making FindByIndexNameSessionRepository a standalone interface. At present, it extends SessionRepository.

Some of the relevant points that we discussed:

  • users are encouraged to interact with sessions using their web framework's native session facilities (that is, Servlet's HttpSession of Spring WebFlux's WebSession) which means direct interaction with SessionRepository operations is not a common use case
  • OTOH FindByIndexNameSessionRepository operations are Spring Session's own thing
  • mixed usage of SessionRepository and FindByIndexNameSessionRepository isn't a common thing (Spring Boot's Actuator sessions endpoint is an outlier here) which means user impact from having latter not extend the former any more is expected to be insignificant
  • having FindByIndexNameSessionRepository as standalone allows users to implement their own indexing support without having to use a non-default SessionRepository implementation (for example, RedisSessionRepository vs RedisIndexedSessionRepository consideration)
  • this also somewhat impacts https://github.com/spring-projects/spring-boot/issues/10827

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 by reviewing the relationship between FindByIndexNameSessionRepository and SessionRepository described in the issue, including the RedisSessionRepository and RedisIndexedSessionRepository example. Check the linked Spring Boot issue for compatibility concerns; done requires an agreed standalone-interface design and an assessment of its user impact.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Refactor
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.