Object-Oriented Implementation of Reconciliations
M.Sc. Research Thesis
of Constantine Shapiro
under the supervision of Assoc. Prof. Shmuel Katz
Abstract
Reconciled fields provide a new concept of class data members
that have properties of both class and instance variables.
Each class instance has its own incarnations of such fields, but for
each reconciled field declared in the class, a class-wide
reconciliation of the corresponding instance variables can
occasionally be performed.
Reconciliation here is an as-if-atomic operation on a set of
variables that calculates their combined «agreed» value and assigns
it back to the variables.
This approach captures the scenario of a global shared data entity,
which has local private versions (for optimization or convenience
purposes) that are occasionally brought to a consistent state.
A reconciled field can only be of a reconcilable type, which
has a reconciliation method defined for it.
These types are classes having a property of reconcilability
that implies exposing a specific interface.
Such a class can produce a combined state when provided a collection
of the class instances.
While «reconcilability» is a useful term by itself and can be used
in other contexts, in this work it is connected to reconciled fields
only.
The reconciliation-based software engineering technique presented here
is particularly suitable for the design of concurrent and distributed
systems.
Namely, independent agents use their working copies locally and some
global mechanism interrupts their work to create a temporary
«master» value as a combination of local values, which is then
distributed back to the agents.
This way, from an agent's point of view, there are sporadic atomic
update operations on its working copy, which, however, always take the
local value into account.
A sample application would be a distributed algorithm that works
towards producing the «best» result: while the collaborating
processes make local «improvements», the reconciliation mechanism
periodically combines their results and updates the processes with a
«better» value.
This and some other design patterns are presented.
This work not only adapts the reconciliation concept to the
object-oriented paradigm, but also proposes an appropriate extension
to a concrete programming language.
The notion of the reconciled fields and the type reconcilability
(implemented with the syntax and class library changes) makes a
natural and useful addition to the Java programming language that has
already got rich native concurrency support.
This work also includes design and implementation of a prototype
processing module for the extended reconciliation-enabled Java
(«JARVA») source code.
The module is a special preprocessor that produces standard Java code
to be compiled and executed by standard tools in the extended
environment.
Example programs written in the JARVA language are also provided.
Documentation
All of the above plus samples and demo projects (zip, 415KB)
JARVA Installation
- Executables and libraries (zip, 160KB)
Contents of bin and lib directories
- Currently, only Win/DOS platform is supported (JDK environment must be set up in advance)
- JARVA_INSTALL environment variable must be set to JARVA installation path
(the directory that the files are unpacked to) in order to compile JARVA files with JARVAC
- <JARVA_INSTALL>/bin must be added to PATH
and <JARVA_INSTALL>/lib/jarva.jar must be added to ClassPath
- Source files (zip, 70KB)
Contains source files of the javax.jarva package (standard Java files) and of the JARVA preprocessor (two JavaCC projects)
- Documentation incl. samples and demo projects (zip, 415KB)
Currently the same archive as in Documentation
Links