Re: [AM] modelling the state of a service

"Scott E. Preece" <[email protected]> Mon, 16 Feb 2004 09:21:02 -0600 (CST)
Newsgroups gmane.comp.programming.modeling.agile
Message-ID <[email protected]>
Depending on what kind of analysis you want to do on the model, you
can choose to model multiple sub-systems in various ways.

The "pure state machine" approach is to combine the multiple state
machines into one - the "whole system" state machine has nodes that
represent a state tuple containing one state from each of the
constituent machines).  That is, you might have states with names like
"MachineA_Ready_and_MachineB_Ready").  This leads to state explosion and
also doesn't work if the number of machines in the cluster isn't fixed
(your model embeds the number of machines).

Another approach is to include conditionals on your state transitions,
so that you might have a transition labeled "Event X<at least one other
machine still Ready>".  This allows you deal with an arbitrary number of
machines (the model doesn't explicitly embed the number of machines)
On the other hand, while it does explicitly point out where you have to
be able to determine the whole-system state, it doesn't give you any
particular guidance as to where to implement it.

Or you could go lightweight and model the common case in a state machine
and sequence diagram, with comments in the diagrams indicating where
such conditionals would need to be checked.  

Or, you could make a "system manager" an explicit component that the
individual machines send messages to and make it responsible for
tracking the whole configuration. The downside to this is that it
implies an architecture.

Of course, a lot depends on what you want the model for.  If you're
looking at availability requirements, you might really want a
queuing-theoretical (mathematical) model instead of a behavioral model.

scott

| From: Scott Ambler<[email protected]>
| Date: Mon, 16 Feb 2004 07:58:15 -0500
| 
| At 12:05 PM 2/16/2004 +0000, you wrote:
| >Hi All,
| >
| >How about a real world modelling question for a change?
| 
| That would be too radical.  ;-)
| 
| 
| 
| >I'm trying to come up with a nice simple way to represent the current 
| >state of a service, where the service consists of a number of processes 
| >spread over several nodes.
| >
| >For example the web server part of a web service might consist of two 
| >clustered nodes running a web server listening to requests on port 80 and 
| >passing the request to another node cluster to do the actual processing. 
| >For the web server part of the service to be available at least one node 
| >has to be available, running the web server process, listening on port 80 
| >and able to connect to the next tier. Other tiers would have similar 
| >combinations of processes so in order to say the web service is actually 
| >available a path through all the tiers must be traceable.
| >
| >Depending on different combinations of states across the tiers you might 
| >want to trigger alerts to notify the state of the service to operators.
| >
| >Any suggestions that don't involve multiple levels of composite states 
| >gratefully received.
| 
| How about a UML state machine diagram 
| (http://www.agilemodeling.com/artifacts/stateMachineDiagram.htm) to model 
| the states and a UML deployment diagram 
| (http://www.agilemodeling.com/artifacts/deploymentDiagram.htm) to model the 
| various nodes?  Or perhaps just one of the two diagrams if it proves 
| sufficient on its own?
| 
| 
| 
| >Regards
| >
| >Ian Chamberlain
| 
| - Scott
| 

-- 
scott preece
motorola urbana design center (il67), 1800 s. oak st., champaign, il  61820  
e-mail:	[email protected]	fax:	217-384-8550
phone:	217-384-8589	cell: 217-433-6114	pager: [email protected]

For more information about AM, visit the Agile Modeling Home Page at www.agilemodeling.com
--^----------------------------------------------------------------
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrKDA.bWnbtk.Z2NtYS1h
Or send an email to: [email protected]

TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
--^----------------------------------------------------------------