On Tue, Apr 14, 2009 at 02:05:10PM +0200, Dietmar Maurer wrote: > So CPG provide a framework to implement distributed finite state > machines (DFSM). But there is no standard way to get the initial state > of the DFSM. Almost all applications need to get the initial state, so I > wonder if it would make sense to provide a service which solves that > problem (at least as a example). > > My current solution is: > > I introduce a CPG mode, which is either: > > DFSM_MODE_SYNC ... CPG is syncing state. only state synchronization > messages allowed. Other messages are > delayed/queued. > > DFSM_MODE_WORK ... STATE is synced accross all members - normal > operation. Queued > messages are delivered when we reach this state. > > When a new node joins, CPG immediately change mode to > DFSM_MODE_SYNC. Then all members send their state. > > When a node received the states of all members, it computes the new > state by merging all received states (dfsm_state_merge_fn), and > finally switches mode to DFSM_MODE_WORK. > > Does that make sense?
Yes. I'm not sure if a generic service for this would be used much or not... maybe. Dave _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
