Skip to content

Distributed sessions#2

Open
dota-devy wants to merge 5 commits intomainfrom
distributed-sessions
Open

Distributed sessions#2
dota-devy wants to merge 5 commits intomainfrom
distributed-sessions

Conversation

@dota-devy
Copy link
Owner

No description provided.

dota-devy and others added 5 commits January 11, 2026 22:22
  - Add SessionMetadata class for serializable session data
  - Create ISessionStore interface for pluggable persistence
  - Implement session recreation from persistent store
  - Add EnableDistributedSessions configuration option
  - Update DI with WithSessionStore<T>() extension methods
  - Update package IDs to Surfshack.* namespace
      - Add InMemorySessionStore implementation for testing
      - Add SessionMetadataTests for basic metadata validation
      - Add InMemorySessionStoreTests covering CRUD, pruning, and thread safety
      - Add DistributedSessionTests for HTTP transport integration
Add heartbeat/ping mechanism to prevent SSE connection disconnects:
- Add KeepAliveInterval option to HttpServerTransportOptions
- Implement heartbeat loop in SseWriter that sends ping events
- Track last activity time to avoid unnecessary pings
- Add HeartbeatInterval property to StreamableHttpServerTransport
- Wire up keep-alive interval through SSE handler chain
- Add test to verify heartbeat messages are sent when idle

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant