Static analysis Testing Coverage Status Luarocks

Molly

is a framework for distributed systems verification, with fault injection.

Prerequisites

  • Lua interpreter: LuaJIT or a LuaJIT-based runtime is recommended (for example, Tarantool).
  • luafun - Lua functional library, built-in into Tarantool.
  • lua-cjson - Lua library for fast JSON encoding and decoding, built-in into Tarantool.
  • (optional) a Jepsen-compatible consistency checker. For example, elle-cli, based on Jepsen, Elle and Knossos.

Installation

  • Download and set up a Lua interpreter. LuaJIT or a LuaJIT-based runtime is recommended (for example, Tarantool).
  • Install the library using LuaRocks:
$ luarocks install --local molly

NOTE: Installing the luafun and lua-cjson modules is not required when Tarantool is used because both are built in. Install them manually when using LuaJIT:

$ make deps-runtime

Documentation

See the documentation at https://ligurio.github.io/molly/.

Examples

See also SQLite examples in test/examples/: - sqlite-rw-register.lua contains a simple test that concurrently runs get and set operations on a SQLite database - sqlite-list-append.lua contains a simple test that concurrently runs read and append operations on a SQLite database

For running examples you need installed an SQLite development package and LuaRocks.

$ sudo apt install -y sqlite3 libsqlite3-dev
$ make deps
$ make test-example

The example produces two history files: history.txt and history.json. The history can be checked for consistency with elle-cli:

$ VER=0.1.8
$ curl -O -L https://github.com/ligurio/elle-cli/releases/download/${VER}/elle-cli-bin-${VER}.zip
$ unzip elle-cli-bin-${VER}.zip
$ java -jar ./target/elle-cli-${VER}-standalone.jar -m elle-rw-register history.json
history.json        true

See the tests that use the Molly library in https://github.com/ligurio/molly-tests.

Hacking

To develop molly, install either LuaJIT or a LuaJIT-based runtime, and LuaRocks.

$ make deps
$ export PATH=$PATH:$(luarocks path --lr-bin)
$ make check
$ make test

You are ready to make patches!

License

Copyright © 2021-2026 Sergey Bronnikov

Distributed under the ISC License.

generated by LDoc 1.5.0 Last updated 2026-10-22 11:22:25