Use Spring MVC for Stateless web application development
Asked Answered
L

0

2

I come from Play!framework. Very much like it's stateless architecture. Say the session concept is different from the class Java Servlet's HttpSession. Session in Play can store very limited string typed attributes, which is serialized to the browser. Any stateful object is stored either in cache (which can be easily distributed with memcached impl) or database directly. User app can get the stateful objects via a unique session id. This structure makes it very easy to implement a cluster of Play's application.

I am curious how to implement such a stateless application in Spring MVC framework. At the moment what I am thinking of is whenever an new request incoming generate a unique ID and put it into the cookie to mimic Play's stateless session. But looks a bit ugly. Any more idea?

Lava answered 6/12, 2013 at 20:45 Comment(1)
In case people are still interesting in this question. I've copied the Session concept from Play!framework into spring in the github.com/greenlaw110/spring-rythm project. And the architecture is used in a couple commercial projects for Macquarie group. Unfortunately there is no document and samples (github.com/greenlaw110/spring-rythm-samples) might be a bit outdatedLava

© 2022 - 2024 — McMap. All rights reserved.