WatCA is a tool for analyzing consistency in distributed storage systems and in concurrent data structures. The current version supports key-value storage systems (e.g., Cassandra, Riak) that provide read and write (i.e., get and put) operations and detects violations of Herlihy and Wing's linearizability property. The input to the tool is a log file that records the invocation and response of every operation applied to the storage system, whose format is described below.
The log file must contain one invocation or response event per line. Each line has the following general format:
timestamp <tab> [INV|RES] <tab> client_ID <tab> [R|W] <tab> key <tab> value
The timestamp identifies each event uniquely. The log file must be sorted in ascending order by timestamp. INV|RES denotes the event type (invocation vs. response). The client_ID corresponds to a process ID in Herlihy and Wing's model, and should be distinct for each client process and thread. You can construct it by concatenating the client's IP, process ID, and thread ID. R|W denotes the operation type (read/get vs. write/put). The key and value denote the key-value pair, and must not contain any tabs. (If in doubt, encode the values using base64 or hash them.) The value is only included in the invocation event of a write and the response event of a read.
Sample log files are provided in the samplelogs subdirectory. One file is a positive example, meaning that it satisfies linearizability. The other file is a negative example, meaning that it violates linearizability. WatCA will identify one or more linearizability violations in the negative example, and for each violation it will identify a key and a pair of values responsible for it.
To create your own log, you must instrument your client code by capturing the invocation and response of each storage operation. The utility class ExecutionLogger.java can be used for this purpose but only in the special case when all the client threads are in the same Java process, as otherwise timestamps obtained using System.nanoTime() are incomparable.
Note: If a get operation fails to find a value for a given key, the corresponding log record should record a blank value.
Instructions for Linux (tested on Ubuntu 14.04):
- git clone https://github.com/wgolab/WatCA.git
- cd WatCA; mvn install
- cp samplelogs/execution.log.negative execution.log
- ./lintest.sh
- cat scores.txt
WatCA can be attached directly to a live NoSQL storage system for real-time consistency analysis. The real-time analyzer provides a graphical interface using an embedded web server. For details please navigate to the realtime subdirectory.
Note: The real-time tool uses an older log format in which the invocation and response events for an operation are represented using a single log record. As a result, the real-time tool cannot deal correctly with operations that are interrupted by failures. Support for the new log format is coming soon.
- Hua Fan - PhD candidate
- Shankha Chatterjee - MASc candidate
- Wojciech Golab - Assistant Professor (https://ece.uwaterloo.ca/~wgolab/)
System | Paper | Authors | Description |
---|---|---|---|
Knossos | Kyle Kingsbury | a linearizability analyzer based on model checking techniques | |
ConsAD | SIGMOD 2012 | Zellag and Kemme | a real-time consistency anomalies detector |
Conver | PaPoC 2016 | Viotti, Meiklejohn and Vukolic | a system for consistency checking |
link | FORTE 2015 | Horn and Kroening | linearizability checker |
link | Concurrency and Computation: Practice and Experience, 2016 | Lowe | linearizability checker |
Graduate students involved in this project were supported in part by the Natural Sciences and Engineering Council of Canada (NSERC) and the Google Faculty Research Awards Program. Development of WatCA has been supported since 2016 by Amazon's AWS Cloud Credits for Research program.