Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreAt the end of 2022, VMware announced the general availability of the Spring for VMware GemFire projects.
While these Spring based projects for VMware GemFire are open source and a succession to the Spring for Apache Geode projects, they are not a replacement. VMware GemFire forked from the Apache Geode project and is not open source.
It is not recommended to begin new projects using Spring for Apache Geode and rather transition to Spring for VMware GemFire, starting here. Alternatively, the Spring portfolio provides first-class integration with other comparable session caching providers. Also, see here.
Finally, keep in mind, Spring for Apache Geode projects are maintained until OSS and commercial support ends. Maintenance only includes CVE and critical fixes. No new features or enhancements will be made. Spring Session for Apache Geode support timelines can be viewed here.
Spring Session for Apache Geode (SSDG) provides an implementation of the core Spring Session framework using Apache Geode to manage a user’s Session information.
Session state is stored in Apache Geode by leveraging Spring Data for Apache Geode. By integrating with Apache Geode, you have the full power of this technology (Strong Consistency, Low Latency, High Availability, Resiliency, and so on) at your finger tips in your Spring Boot applications.
It is even possible to use SSDG when deploying and running your Spring Boot applications in Pivotal CloudFoundry, using Pivotal Cloud Cache, which is itself based on Apache Geode.
Spring Session for Apache Geode (SSDG) provides the following features:
HTTP and WebSocket Session state management using Apache Geode as the backend.
Clustered & Distributed Session Management - Improves on the availability and resilience of your system architecture.
Strong Consistency - Apache Geode implements strong consistency guarantees, much like a database.
Custom Expiration Policies - For example, support for fixed Session timeouts.
Custom Data Serialization - Enable the (HTTP) Session state to be serialized other than by Java Serialization so that application classes you put into the Session do not need to implement java.io.Serializable
.
Custom Change Detection - You can decide whether the Session is dirty or not and what gets sent (e.g. the delta) between your Spring Boot application and the Apache Geode cluster in a client/server topology.
Powerful Pub/Sub mechanics - Allows you to register interests or express interests in Session changes based using a query predicate to receive notifications of updates.
Spring Session for Apache Geode is part of a Maven BOM (Bill of Materials) used to coordinate versions between the core Spring Session projects and this Apache Geode extension. Each BOM release is called a release train and has a naming strategy, for example: Apple-SR9
, Bean-SR12
, Corn-SR6
, Dragonfruit-SR3
, 2020.0.7
, 2021.0.4
, 2021.1.1
, 2021.2.0-M1
, and 2022.0.0-M1
.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-bom</artifactId>
<version>2021.1.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Then, you can add the BOM as a dependency to your Spring Boot application Maven POM file:
<dependencies>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-geode</artifactId>
</dependency>
</dependencies>
Since Gradle has no first-class support for Maven BOMs, you may use Spring’s Dependency Management Plugin.
Apply the plugin from Gradle Plugin Portal (update the version if needed):
plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
}
Then use it to import the BOM:
dependencyManagement {
imports {
mavenBom 'org.springframework.session:spring-session-bom:2021.1.1'
}
}
Finally, add a dependency to the project without a version:
dependencies {
compile 'org.springframework.session:spring-session-data-geode'
}
Bootstrap your application with Spring Initializr.