See Also
OMTT
AspectOPTIMA

See Also

  1. OMTT

  2. AspectOPTIMA


OPTIMA (OPen Transaction Integration for Multithreaded Applications) is the name of an object-oriented framework, which provides the necessary run-time support for open multithreaded transactions. Since applications from many different domains can benefit from using transactions, it is important to allow an application programmer to customize the framework. This flexibility is achieved with the help of design patterns. Class hierarchies with classes implementing standard transactional behavior are provided, but a programmer is free to extend the hierarchies to tailor the framework to the application-specific needs. The framework supports among others optimistic and pessimistic concurrency control, different recovery strategies (i.e. Undo/Redo, NoUndo/Redo, Undo/NoRedo), different caching techniques, different update strategies, different logging techniques (i.e. physical logging and logical logging), and different storage devices. Among pessimistic concurrency control, the framework provides built-in support for lock-based concurrency control, with strict read / write or commutativity-based locking.


The support for open multithreaded transactions within a programming language is provided without modifying the language itself, which avoids having to modify the compiler. Different interfaces for an application programmer are possible. A procedural, an object-based, an object-oriented, and an aspect-oriented interface have been developed. The feasibility and the elegance of the interfaces depend on the available features of the programming language.


A prototype of the OPTIMA framework has been implemented for the concurrent object-oriented programming language Ada 95. It has been realized in form of a library based on standard Ada only. This makes the approach useful for all settings and platforms which have standard Ada compilers. Based on the features offered by Ada 95, a procedural, an object-based and an object-oriented interfaces for the transaction framework have been implemented.

declare
  T : Transaction;
begin
  -- perform work on behalf
  -- of the transaction
  Commit_Transaction (T);
exception
  when ... =>
    -- handle internal exception
    Commit_Transaction (T);
  when ... =>
    -- raise an external exception
end;

declare

  T : Transaction;

begin

  -- perform work on behalf

  -- of the transaction

  Commit_Transaction (T);

exception

  when ... =>

    -- handle internal exception

    Commit_Transaction (T);

  when ... =>

    -- raise an external exception

end;

The object-based interface associates the lifetime of a transaction with the lifetime of an object or a group of objects.

In Ada this is achieved by means of a controlled type Transaction. It allows any Ada block to be executed inside a transaction (see code on the left).

The transaction begins when the object declaration is elaborated, and ends once the object goes out of scope, i.e. at the end of the block containing the object declaration.

In order to commit the transaction, the programmer must call the Commit_Transaction procedure of the Transaction type. There is no need for an Abort_Transaction procedure. Voting abort is simply done by raising an external exception (the destructor of the Transaction object takes care of aborting the transaction). Complete examples of the interfaces can be found in these papers.

The implementation of the framework has been used in a realistic case study, an online auction system.

We also developed a purely aspect-oriented implementation of the framework called AspectOPTIMA.


Click here to download the prototype implementation of the OPTIMA framework for Ada 95. It has been developed and tested under Solaris 6, GNAT 3.13p, but should work with all standard Ada compilers and platforms, since it is based on standard Ada only.

You might also want to download the auction system implementation.

Publications on Optima

  1. Jörg Kienzle: “Open Multithreaded Transactions - A Transaction Model for Concurrent Object-Oriented Programming”, Kluwer Academic Publishers, ISBN: 1402017278, 2003.

  2. Jörg Kienzle, Jiménez-Peris, Alexander Romanovsky, Martina Patiño-Martinez: “Transaction Support for Ada”, in Proceedings of Reliable Software Technologies - Ada-Europe’2001, Lecture Notes in Computer Science 2043, Springer Verlag, p. 290 - 304, 2001.




Last modified: November 23, 2015, Jörg Kienzle