is a framework for distributed systems verification, with fault injection.
- Lua interpreter: LuaJIT or LuaJIT-based is recommended.
- luafun - Lua functional library, built-in into Tarantool.
- lua-cjson - Lua library for fast JSON encoding and decoding, built-in into Tarantool.
- (optional) Jepsen-compatible consistency checker. For example elle-cli, based on Jepsen, Elle and Knossos.
- Download and setup Lua interpreter, LuaJIT or LuaJIT-based is recommended (for example Tarantool).
- Install library using LuaRocks:
$ luarocks install --local molly
NOTE: Installation of modules luafun
and lua-cjson
is not required when
Tarantool is used, both modules are built-in there. Install them manually in
case of using LuaJIT:
$ make deps-runtime
See documentation in https://ligurio.github.io/molly/.
See also an examples in test/examples/ for SQLite database engine:
sqlite-rw-register.lua
contains a simple test that concurrently runsget
andset
operations on SQLite DBsqlite-list-append.lua
contains a simple test that concurrently runsread
andappend
operations on SQLite DB
For running examples you need installed an SQLite development package and LuaRocks.
$ sudo apt install -y sqlite3 libsqlite3-dev
$ make deps
$ make test-example
Example produces two files with history: history.txt
and history.json
. With
elle-cli history can be checked
for consistency:
$ VER=0.1.4
$ 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 tests that uses Molly library in https://github.com/ligurio/molly-tests.
For developing molly
you need to install: either LuaJIT or LuaJIT-based
and LuaRocks.
$ make deps
$ export PATH=$PATH:$(luarocks path --lr-bin)
$ make check
$ make test
You are ready to make patches!
Copyright © 2021-2024 Sergey Bronnikov
Distributed under the ISC License.