ashwin153 / caustic

Reinventing database transactions.

Website Github


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.


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


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.


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'),


scalaVersion := "2.12.1"

resolvers ++= Seq(

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






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