The ACID Database Properties and OurayCM's Durable
Versions
Ouray Software SCM Articles Series: The ACID Database Properties
and OurayCM's Durable Versions
In this article we explain how OurayCM's Durable Versions are a
natural consequence of applying the ACID
database properties to SCM.
Review of ACID
The ACID properties are the core properties of a database that are
required for database reliability.
- Atomicity means that when a group of changes is committed
to the database, either all of them will be applied or none of them
will. SCM example: When you save the changes you made to a set of
files, either all of the changes are recorded or none of them
are.
- Consistency means that the database will always be in a
proper state relative to your application. SCM example: When you
submit your changes to a shared area, they are not mixed in with
someone else's changes (see below).
- Isolation means that different transactions will not
interfere with one another, particularly, they won't lead to an
inconsistent database state. SCM example: When you update your
workspace from a shared area, you don't get someone's
partially-submitted changes.
- Durability means that completed transactions will not be
lost due to a software fault or power outage - "complete" means that
the transaction actually made it to long-term storage (the disk). SCM
example: When your server goes down, you never lose the information
related to previously completed SCM operations.
How other SCM tools fail the ACID Test
There are various ways in which other version control tools fail to
comply with the ACID properties. Some common instances of failure:
- A tool that provides no support for any kind of database
transaction at all.
- A tool that allows arbitrary blending of files from different
users' workspaces (this is typical of file-locking tools). This
violates Consistency, because the standard of Consistency for software
projects is the full set of working files from a given workspace, not
single files from randomly selected workspaces.
- A tool that requires explicit tagging operations in order to form
a version. This violates Durability: the workspace state as it was a
few minutes ago is erased when the current workspace is saved.
Note that while ACID is important, it is not the only standard that an
SCM system should comply with. Our article 10
Qualities You Need in an SCM System discusses other important SCM
qualities.
ACID and OurayCM
The key idea behind OurayCM's Durable Versions is simple: Given
that you had saved the state of your workspace, you ought to be able
to get back to it - with no exceptions or special steps required on
your part. A violation of any of the above ACID properties means that
you will not be able to reliably perform this very basic recovery
operation.
To see how we have taken this basic idea and expanded it into a
powerful system, see The Basics of OurayCM.
If you have any feedback on this article, feel free to email the author.