Keywords: getstart

Next: 5 Simple Example Up: Getting Started with HAFTA Previous: 3 Overlord
Subsections

- 4.1 Basic Client Program Structure
- 4.2 Sequences Overview
- 4.3 Checkpoints Overview

# 4 Checkpoint Library

## 4.1 Basic Client Program Structure

The checkpoint library allows you to design and develop your application with the concept of sequenced operations, checkpoints and rollbacks built in. Because this is something that has to be designed in from the initial design, it is best applied when the initial low level design is conceived.

A program written with the checkpoint library is structured into two levels, the sequence level, and the checkpoint level.

## 4.2 Sequences Overview

A sequence consists of an associative array style data structure containing a list of functions that the sequence will call. Each set of functions in the list, known as a node, contains a normal function, a roll-back function, and a policy function.

A sequence is invoked similarily to the way one might invoke a single function, except that it is done through the API of the client library.

## 4.3 Checkpoints Overview

Checkpoints are a facility for allowing the rollback of a partially completed function. Checkpoints are a strictly linear enumeration of the resources allocated by the programmer's code.

The value of the last checkpoint set by a particular normal or rollback function is stored, then presented to the rollback function so that the programmer's rollback code can know what resources it needs to free and/or deconfigure.

Next: 5 Simple Example Up: Getting Started with HAFTA Previous: 3 Overlord