Announcement Announcement Module
No announcement yet.
Central Server Pushes State on Browser with SWF? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Central Server Pushes State on Browser with SWF?

    I was planning a roll-my-own state-progression engine, but I am hoping that SWF might already be usefull. My requirements are a bit different:

    A central process manages state for 20-30 web-based terminals by reciving input from the users at the terminals as well as recieving input from supervisors (who can cancel, pause, and change settings of the web-based terminals). The state flow is absolutely fixed and there is no "free browsing". We push pages to browsers with AJAX. Previous versions of this system had a conversation like this:

    Browser to Terminal Dispatcher: POST "button 2 hit in state A"
    Dispatcher to Central: Hi, I am terminal 9, user was in state A and just hit button 2
    Central to Dispatcher: Good. Tell Browser it is in state B and show it template "instructions" with (template data)
    Dispatcher to Browser: Here is content from template 'instructions' filled in with (template data). You are in State B. These are your valid operations...

    ... waiting for user action ...

    Supervisor to Central: Cancel terminal 9's process
    Central to Dispatcher 9: Set the browser in state 'cancel' by showing 'cancel' template
    Dispatcher 9 to Browser: Push (cancel template)
    Browser to Dispatcher: Terminal 9 (cancel template timeout event)
    Dispatcher to Central: State 'cancel' on 9 has just issued command 'timeout'
    Central to Dispatcher: Tell browser it is in state 'start' with template 'start'
    Dispatcher to Browser: ...

    Right now, the state transitions are ad-hoc. Each state defines the next state in line. To follow the state-transition logic, one must examine the code. I would like this to be more explicit, as well as be able to define properties like "can cancel" or "can hook subflow here" for each property. I would also like to chain generic steps for related processes together so, for example, user registration for one process can use the same components but a different flow for a related process. The trick is that these flows are implimented in the middle layer and pushed to the clients to allow a supervisor control over them.

    Can this be done with SWF?


  • #2
    Have you ever found out if the timeout part can be done with SWF?