State machine driven by messages

anthony_w awwold69 at hotmail.com
Tue Jul 13 10:38:27 EDT 2010


Hello Daniel,

I am currently building something very simular to what you are asking about. 
It's a java application that is a device simulator.  The device simulator is
the server and it's behavior is managed as a typical finite state machine
(states, events, transitions, actions).  A client sends a command (event)
and the device attempts to transition to a new state based on that event. 
Netty is just the transport so realistically, my state machine implemenation
is independent of any I/O and the two are logically separated.

I looked long and hard for a good implemenation of a finite state machine
(FSM) that would fit my needs.  I looked at things like Drools and JPBM but
they seemed to be much bigger frameworks that what I needed.  Eclipse has
some modeling tools for state machines that I thought looked promising (MDT,
UML2, GMF/EMF), however I was never able to do much with them.  I felt as
though it was not well documented on how to take a FSM concept all the way
to full code generation and actually make something usable or if certain
features where even fully implemented.

In the end "created" my own finite state machine based on this tutorial.  In
other words I used it as a foundation to build my own version of an FSM
implentation that worked exactly as I needed it to.

http://www.generation5.org/content/2003/FSM_Tutorial.asp


Another option would be to look at this eclipse plugin called Unimod.  I
think you could quickly design a FSM and have it generate code for you
though I have not actually used it.

http://unimod.sourceforge.net/intro.html


anthony
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/State-machine-driven-by-messages-tp5285744p5287740.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list