Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Using SSM in a web application (non-distributed) with multiple requests support #170
N00bie here. Apologies if my understanding is incorrect.
I am using SSM for a web application which performs something similar to the Persist recipe. However, since the StateMachine object is singular, I am confused as to how would multiple parallel requests work.
Can you please clarify?
For 1.0.x things are a bit limited because you'd need to control all that yourself(but yes you on a right track). For 1.1.x things around web and scopes are going to be much better implemented in terms of usability. New sample http://docs.spring.io/spring-statemachine/docs/1.1.0.M1/reference/htmlsingle/#statemachine-examples-eventservice was done exactly for this use case and we made a lot of enhancements for all this not to be so difficult from user perspective.
Essentially that sample will will persist(using redis) state machine per user and request and reuse pool of state machines to avoid expensive instantiation(thought instantiation per request is also possible). For 1.1.0.M2 we're doing further enhancements for scoping and especially