mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niklas Therning (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRMINA-160) Add support for defining higher level state machines on top of MINA
Date Thu, 08 Jun 2006 05:39:33 GMT
    [ http://issues.apache.org/jira/browse/DIRMINA-160?page=comments#action_12415279 ] 

Niklas Therning commented on DIRMINA-160:

BTW, I haven't looked much at blissed. It probably does exactly what I've been trying to do
here and a lot better! :)

I have looked at the State Machine Compiler, http://smc.sourceforge.net/, and used that as
inspiration. What I don't like about SMC is that it requires you to use a special language
to describe your FSM.

I've worked with the State pattern before but I think there are some arguments against using
* If you have N states in your design you end up with N classes. This quickly becomes hard
to maintain in my opinion. If using MethodTransition you are free to structure your code as
you'd like. You could have a single class which implements all logic in your FSM or you could
have one class per transition or anything in between.
* Transitions are expressed in the states' code. I'd rather have this decoupled from the code
which is executed when an event occurs.
* In the MINA case you would need to do cast all the time to convert the message in messageReceived
into the expected typeand you would have to handle case when an unexpected message is received.
With the MethodTransition you could have a special fallback handler method which handles all
unexpected commans very easily.

> Add support for defining higher level state machines on top of MINA
> -------------------------------------------------------------------
>          Key: DIRMINA-160
>          URL: http://issues.apache.org/jira/browse/DIRMINA-160
>      Project: Directory MINA
>         Type: New Feature

>     Reporter: Niklas Therning
>     Priority: Minor

> We'll have to provide some kind of FSM support. This should give users a set of best
practices for building complex protocols on top of MINA.
> Trustin had the suggestion that we could implement it very simply by implementing IoHandler
which demultiplexes events to an appropriate IoHandler implementation according to a certain
session attribute value.
> I guess we could provide some means for defining the states and transitions too.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message