Quantcast
Channel: Simple State Machine
Viewing all articles
Browse latest Browse all 20

New Post: This just works for me

$
0
0

Yes, it is rather easy to convert a SimpleStateMachine to Graphviz's DOT langauge. The result usually looks good enough. I use SVG output and then convert it to PNG with ImageMagick. Unfortunately the conversion takes awfull long, aprox. one second. This is a problem, because the state transitions are displayed as they occur on the fly and 1 sec latency is noticable. Does anyone know a fast .NET SVG to png rendering engine? For graphviz, instead of runing it as a new process, I'd recommend to load the neccessary functions with PInvoke to speed things up... ...you get the SVG output damn fast....

By the way, there was a question earlier regarding to "Parallel Proccess".

"Instead you may want to have a single state, AwaitingDocumentResults, and this state can either host an inner state machine for each document, or can handle waiting for the responses in application logic. In the end, I think the state machine library should probably be given the ability to manage multiple child states automatically, but it will take care not to drift into re-creating WF and building a sequential workflow library into the state machine library, where it doesn't belong. "

 I don't quite understand how this would work in practice. To get around the very same issue, I use a custom task to transfer events from one state machine to an other. Typically the state machines run in separate processes and .NET remoting takes care of passing the events. The issue is, that defining how the 'independent' state machines interract eachother gets a bit complicated in the .boo file.


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>