|laziness, impatience, and hubris|
Re: Design question: handling hundreds of state machines in a Web contextby BrowserUk (Pope)
|on Jan 02, 2013 at 19:21 UTC||Need Help??|
Our primary concerns are performance and accuracy.
The 'state' of any individual user is simply their ID, their current workflow ID, and the step they are currently on.
A workflow is its ID, and (making a few assumptions), a list of templates representing the appropriate form for each step.
Each of these can be stored in a table index by ID. When a user logs in, requesting two such small pieces of data directly by their promary index should be absolutely no problem for any RDBMS worthy of the name; even with 1000s of concurrent users. (Who will spend most of their logged on time staring at the screen or typing, the load on the DB will be minimal.) So performance should be no problem.
As for accuracy, once the user clicks submit on any given step, there are a few possibilities:
In essence, on the basis of your description, this sounds very similar -- in terms of data flows -- to any multi-step ordering/shopping basket/booking process already actioned on a million websites. Ie. nothing extraordinary.
Use reliable tools and don't get too complicated with either your client-side or server side processing.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.