ashwin153 / caustic

Reinventing database transactions.

Website Github

Caustic

Build Status Maven Central

Databases are either easy to use or easy to scale. For example, relational databases were popularized in large part because of the programmability of SQL. However, this programmability comes at an incredible expense. Relational databases are notoriously difficult to support at scale, and so developers have increasingly turned toward more specialized NoSQL systems that scale well be shedding functionality.

Developers are not only forced to choose between productivity and performance, but also stark differences between query languages makes their choice of database effectively permanent. Even databases that claim to support the same SQL standard only implement incompatible subsets of its functionality. The lack of a truly uniform interface tightly couples databases and the procedures that are executed against it.

Caustic is a language for expressing and executing transactions on arbitrary key-value stores that is both straightforward to use and simple to integrate. In this article, we’ll discuss the implementation and implications of the transaction runtime and syntax. As a motivating example, consider the following distributed counter implementation in MySQL and Caustic.

Requirements

  • Java 1.8
  • MySQL 5.0
  • PostgreSQL 9.5
  • Python 2.7
  • Scala 2.12
  • ZooKeeper 3.4.10

Build

Artifacts are published to the Sonatype OSS Repository Hosting Service and synced to Maven Central. Snapshots of the master branch are built using Travis CI.

Pants

jar_library(name='caustic', jars=[
    jar(org='com.madavan', name='caustic-runtime_2.12', rev='1.0.0'),
    jar(org='com.madavan', name='caustic-postgres_2.12', rev='1.0.0'),
    jar(org='com.madavan', name='caustic-mysql_2.12', rev='1.0.0'),
])

SBT

scalaVersion := "2.12.1"

resolvers ++= Seq(
  Resolver.sonatypeRepo("releases"),
  Resolver.sonatypeRepo("snapshots")
)

libraryDependencies ++= Seq(
  "com.madavan" %% "caustic-runtime" % "1.0.0",
  "com.madavan" %% "caustic-mysql" % "1.0.0",
  "com.madavan" %% "caustic-postgres" % "1.0.0"
)

Maven

<dependency>
  <groupId>com.madavan</groupId>
  <artifactId>caustic-runtime_2.12</artifactId>
  <version>1.0.0</version>
</dependency>

<dependency>
  <groupId>com.madavan</groupId>
  <artifactId>caustic-mysql_2.12</artifactId>
  <version>1.0.0</version>
</dependency>

<dependency>
  <groupId>com.madavan</groupId>
  <artifactId>caustic-postgres_2.12</artifactId>
  <version>1.0.0</version>
</dependency>

Documentation

Refer to the User Guide to learn about how to use the system, and the Wiki for more information.