0

Spring documentation says that Spring Session can transparently leverage Redis to back a web application’s HttpSession when using REST endpoints.

Does anyone know if Spring supports GemFire in this place instead of Redis to back a web application's HttpSession ?

Ref: http://docs.spring.io/spring-session/docs/current/reference/html5/guides/rest.html

yathirigan
  • 5,619
  • 22
  • 66
  • 104

2 Answers2

1

Not yet, ;).

However, I did spend a little time researching the effort involved to implement a GemFire adapter for Spring Session to back (store/replicate) an HttpSession. I still need to dig a little deeper and I will be tracking this effort in JIRA here (SGF-373).

Also know that GemFire already has support for HTTP server session replication using GemFire's HTTP Session Management Module.

Will post back when I have more details.

John Blum
  • 7,381
  • 1
  • 20
  • 30
  • thank you.. yes, we also started looking at the GemFire session management module but, the only concern we had is, if that's tightly coupled with GemFire. Just in-case if we later want to migrate to Redis or any other platform, would we then have to redevelop the Session Management to a another compatible platform. Other than this, GemFire Session Management module seems to be fine at an initial look. – yathirigan Feb 19 '15 at 04:52
  • i've posted an answer based upon my research & understanding. would be great if you can share your opinion on that. – yathirigan Mar 16 '15 at 20:54
0

Will these 3 steps (at a high level) be sufficient to allow Spring Session to write to Gemfire repository instead of Redis ?

Step 1: Implement just a Configuration class which provide all functions as the annotation

  1. Allow spring to Load the configuration class
  2. Register Spring Session Filter in Container
  3. Establish Repo Connection Factory
  4. Repo connection configuration

we will continue to re-use the Spring Session’s springSessionRepositoryFilter

Step 2: Need to develop an equivalent GemfireOperationsSessionRepository implementing the interface SessionRepository

Step 3: SessionMessageListener.java 3.1. Need to decide a technique to identify and save delta changes in Session to underlying repository 3.2. Need to see how session expire notification from underlying repository can be captured to invoke SessionDestroyEvent and cleanup operations -

yathirigan
  • 5,619
  • 22
  • 66
  • 104
  • @yathirgan Sorry for the delayed response; I have been preempted by other things and will try to spend some cycles on this later today as well as followup to your 2 other posts. Looks like you are making forward progress though, yay! – John Blum Mar 18 '15 at 17:16