This case study addresses the development of a simple framework that enables
the automatic recovery of an application after a crash and the undo
operations of relevant state transitions.
The framework is an example of a service framework that sits between the
generic software application and the file system where application state and
state changes are recorded in log files.
The peculiarity of this case study is that the framework and the appli-
cations using it are designed independently and not influenced by each
Focus: development of service components with domain-independent
OO techniques: reflection.
Java features: static methods, file I
Background: basic OO design principles.
Software applications may be very complex, encompassing a number of state
changes, which may finally lead to a completion state. Tracking all state
changes produced by an arbitrarily complex software application during its
execution may be useful for several purposes. For instance, consider the fol-
A failure occurs during the application execution. In this case, a record of
all state transitions would allow restarting the computation from a stable
state and recovering some of the completed steps, without having to redo
parts of the work already completed.
Part of the transition sequence has to be undone, e.g. because some
external condition has changed (the user revises some input data). In this
context, a record of all relevant state transitions would allow undoing or
redoing specific parts of the execution.
The first scenario outlines a classical application of recovery after a failure,
while the second scenario identifies the requirement of reconstructing parts
of a task.