I need to implement an STM, before I launch in and write my own wondering 
if anyone knows of something I can start with or reuse?  

What I want to do is represent an STM as an object graph of states and 
transitions, where each state encapsulates a (possibly asynchronous) action 
that is executed when that state becomes active.  I plan to implement such 
that each such action returns a promise/future, so that any promisified 
function can be marshalled into use as an action.  Once the action's 
promise is fulfilled then a list of conditions (js expressions) are 
evaluated to determine which transition to take to the next action.  

I'm looking for code that would allow me to define the object graph once 
and then execute it many times (rather than having to define the entire 
object graph each time I invoke that STM).  One STM can call another, by 
virtue of the fact that an entire STM itself returns a promise and 
therefore can be the action encapsulated in a state within an STM.  I'm 
looking for simple, concise code that will be easy for developers to 
understand.  Eventually, I want to build a graphical front end code 
generator that will generate the code from a graphical representation of 
the object graph; for now, I just want the code to be relatively 
well-structured in a way that could lend itself to that.

I've started sketching out how I would do it, but thought it would be smart 
to pause and see if anything else is out there, for comparison / learnings 
if nothing else.

Thanks!


-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to