Thursday, January 29, 2009

Services Life Cycle - Production Point of View

A service life cycle may be expressed from various points of view. Here I am trying to explain life cycle of a service based upon its running conditions. I call this point of view as “Production point of view”. The other point of view could be based upon development life cycle which is more concerned with management aspects.

A service life cycle can be expressed in the state transition diagrams below. There are two separate transition paths:
– service itself
– request processing

• Service
– To be used, a service must be realized by a concrete provider agent.



A service may live in two states:


• UP — the provider agent is capable of accepting and processing requests (i.e. the service is available).
• DOWN — the provider agent is not capable of accepting any requests (i.e. the service is not available).

Naturally service will also transition between these two states. Transition states might be:

Birth: Start of current life  Service starts its current life in Up State
Death: End of current life  Service ends current life from Down State

• Activate — the service can become available which transitions it from Down to Up state.
• Suspend — the service can become unavailable which transitions it from Up to Down state.

Now let us elaborate details of each state

Sub States of Up State




• States
• Idle — the provider agent is not processing any requests currently.
• Busy— the provider agent is processing requests currently.

• Transitions
• Birth with Work: A service may start its life with work in hand and enters into BUSY sub-state of UP state
• Birth without Work: A service may start its life without work in hand and enters into IDLE sub-state of UP state
• Got Work: A service transitions from IDLE sub-state to BUSY sub-state of UP state.
• Work Finished: A service transitions from BUSY sub-state to IDLE sub-state of UP state.
• Retiring: A service leaves UP state (from BUSY or IDLE sub-state) and enters into DOWN state.

Sub States of Down State



• States
• Paused: The service is intentionally paused (e.g. for administrative purposes).
• Stopped: The service is intentionally stopped (e.g. for administrative purposes).
• Over whelmed: The provider agent has exhausted its resources and cannot accept any new requests.
• Crashed: The service is unavailable because of an internal malfunction of the provider agent (e.g. environmental problem).

• Transitions
• A service enters DOWN state in a PAUSED, STOPPED, CRASHED or OVER WHELMED sub-state.
• Stopping - A service may be stopped from any UP or DOWN sub-state except from CRASHED sub-state.
• Crashing: A service may be crashed from any UP or DOWN sub state except from STOPPED sub-state.
• Pausing: A service may be paused from any sub-state of UP state.
• Hanging: A service may be over whelmed from any sub-state of UP state.
• Activate: A service may enter into UP state from OVER WHELMED & PAUSED sub-state of DOWN state.
• Dying: A service may be dead from STOPPED and CRASHED sub-state of DOWN state.


Reference:

http://www.w3.org/TR/wslc/

2 comments:

  1. Nice article..

    Just one query over here.. While describing the transitions in the sub states of DOWN state, you have mentioned that "Hanging: A service may be over whelmed from any sub-state of UP state.
    "

    How can a service be overwhelmed if its in the Idle sub-state of the Up state??

    ReplyDelete
  2. Thanks.

    On the surface it seems that it is impossible that a service can transition from IDLE to HANGED but if one should remember that resource are shared across services.

    Tushar

    ReplyDelete