Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) 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:

  1. The transmission gets lost in transit.

    Assuming you aren't using too much client side trickery, the browser will time out and the user should be able to click the back button and attempt to re-submit.

    The user expectations of reliability should not be high if they fail to sucessfully submit as the intervening internet is not your responsibility.

  2. The submit completes, but your webserver crashes before the state is saved.

    Use a good webserver and test your cgis thoroughly.

  3. The webserver extracts the formdata and issues the DB update, but the DB server crashes.

    Use a reliable DB server.

  4. The update happens but is subsequently lost due DB server crash or disk failure.

    This is bread and butter DB stuff. Use a reliable RDBMS.

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.

In reply to Re: Design question: handling hundreds of state machines in a Web context by BrowserUk
in thread Design question: handling hundreds of state machines in a Web context by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (8)
    As of 2014-07-26 13:26 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (177 votes), past polls