Skip to content

Design Principles and Choices

hengxin(Hengfeng Wei) edited this page Jun 8, 2016 · 3 revisions

Data Model

We implement a column-oriented "table", inspired by Cassandra.

At the master site, we support MVCC (multi-version concurrency control) by using ConcurrentSkipListSet as the underlying data structure.

Each slave site only maintains the latest versions for each data items it has ever seen (propagated from the master site). This data version is accessed under the protection of a ReentrantReadWriteLock.

Clients buffer all updates of a transaction until it is about to commit.

Data Partitioning

Data is partitioned among multiple masters (and is then replicated among each master and its slaves).

[ ] TODO: We plan to support a variety of partitioning strategies.

Consistent Hashing

We use the consistent hashing mechanism implemented by google/guava.

RVSI Specification and Version Constraints

The abstract class AbstractRVSISpecification represents the RVSI specification which is a part of transaction semantics. AbstractRVSISpecification consists of three types: BVSpecification for backward view, FVSpecification for forward view, and SISpecification for snapshot view. They all share a common data structure which is a map of Set<CompoundKey> (variables of interest) to Integer (bound).

Communication

For blocking, synchronous remote call, we use Java RMI. For non-blocking, asynchronous message sending and receiving, we use ActiveMQ.

Java RMI

Java RMI is used for synchronous remote calls (e.g., begin, read, write, and end operations of transactions)

ActiveMQ

We use ActiveMQ (which is an implementation of JMS) for asynchronous messaging service (e.g., propagate and receive).

In our master-slave settings, the master is

Clone this wiki locally