in reply to Re^8: a State machine with Roles - possible? (class or instance)
in thread a State machine with Roles - possible?
Yes, a real common example is, on an event-based application, an object that has to do two (or more) things at the same time. For instance accessing a network service while tracking and external process or accessing a database.
You may be able to delegate most of the work needed to perform the subtasks to other objects (which would be unidimensional state machines). But there would be a point where you have to handle the interaction between them using a multidimensional state machine.
In any case, note that a multidimensional state machine can be converted into a unidimensional one if you flatten the state matrix using the cartesian product, or in practice, if you are able to organize the states in a tree (usually not all the multidimensional states may happen).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^10: a State machine with Roles - possible? (class or instance)
by LanX (Saint) on Jun 01, 2013 at 12:02 UTC |
In Section
Seekers of Perl Wisdom