Description
Spring Session provides a session management infrastructure and takes care of many features such as session expiration or serialization (including implementations for Redis and Hazelcast).
Leveraging Spring Session helpers and configuration would benefit the project reducing the low-level code to maintain and backend implementations, but it doesn't work out-of-the-box.
Flow creates its own VaadinSession
during servlet initialization, while Spring uses a filter to replace the current HttpSession
with its own specialized implementation. This two different approaches generate a conflict that triggers an infinite loop of UIDL requests.
Newer versions of Spring Session can be configured to store the sessions only when an attribute is set and to do this asynchronously, features that would both fit our use case, so it may be worth to investigate more thoroughly on the possibility to make Spring Session work with Vaadin.
This has been done in the past for older Vaadin versions: https://github.com/alejandro-du/vaadin-spring-session-redis so a similar approach might still be worth a try.