Skip to content

Improve support for Hazelcast client-server topology #1101

Closed
@vpavic

Description

@vpavic

Spring Session's Hazelcast support relies presence of it's classes in Hazelcast cluster. This isn't a problem with embedded Hazelcast servers, which is the topology most people presumably use, however in more traditional client-server topology this requirement isn't quite user friendly and complicates the maintenance of Hazelcast cluster.

There are two use cases which are responsible for the requirement of Spring Session classes being present in classpath of Hazelcast server:

  • HazelcastSessionRepository.SessionUpdateEntryProcessor, which is used for updating existing sessions
  • PrincipalNameExtractor, which is used for retrieving sessions by principal index (i.e. username)

We should improve these use cases to remove the mentioned classpath requirements. Hazelcast offers many serialization related mechanisms, like DataSerializable which could be leveraged to address this.

A nice side-effect of this improvement should also be improved performance, since standard Java serialization isn't the best option there.

As a part of this effort, we should ensure that our integration tests for Hazelcast client-server use case use realistic client-server topology, which isn't the case at present since we start the Hazelcast server that we connect to in the same JVM. This branch contains improved client-server integration tests which use Testcontainers for running Hazelcast server, and also adds a few failing tests that demonstrate the use cases we need to support.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions