spring-projects / spring-projects/spring-session

Consider adding event publishing hooks in `JdbcOperationsSessionRepository`

Open
#590 4 comments 11 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

Due to limitations of the underlying data store, JdbcOperationsSessionRepository has no session event publishing capabilities. However, since many projects do include a publish-subscribe broker of some sort, it could make sense to add hooks that would make use of that broker to route events to all members of a cluster.

With this change, JdbcOperationsSessionRepository would create session events and then pass them to strategy of some sort, which would be implemented by users if they wish to enable event publishing. JdbcOperationsSessionRepository would also implement some sort of message listener contract which would be responsible for using ApplicationEventPublisher to publish events locally.

What are your thoughts on this @rwinch? If you're open to this idea I'd like to implement it in time for 1.3.

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 reading JdbcOperationsSessionRepository and the ApplicationEventPublisher contract mentioned in the issue. Investigate how session events are currently created and published locally, then define the strategy and listener boundaries. Done would mean a documented, agreed design for broker-backed event propagation across cluster members.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
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.