Kiarahmani / MockDB

An in-memory mock database system to generate traces. A clone from https://github.com/microsoft/weak-isolation-mock-db

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weak Isolation Mock DB

An in-memory mock storage system for systematic testing of storage-backed applications under various isolation levels. WeakIsolationMockDB generates weaker behaviors - subject to the chosen isolation level, which occur rarely in real-world databases. It allows application developers to easily test their applications under various corner cases. WeakIsolationMockDB currently supports key-value interface with multiple isolation levels.

Dependencies

Cpprestsdk

https://github.com/microsoft/cpprestsdk

The core library doesn't require this dependency, however applications and HTTP-server modules require cpprestsdk.

How to install

With vcpkg on Windows

PS> vcpkg install cpprestsdk cpprestsdk:x64-windows

With apt-get on Debian/Ubuntu

$ sudo apt-get install libcpprest-dev

Build

From the root directory run the build script

On Linux

bash scripts/build.sh

Linux Note: cpprestdir default path set in CMakeLists.txt (http_server and applications), change if cpprestsdk is installed in a different directory.

On Windows (provide the path to vcpkg.cmake as argument)

scripts\build.bat \path\to\vcpkg\scripts\buildsystems\vcpkg.cmake

Running Applications

Set the current directory to the location of executables

On Linux

cd build-files/applications/

On Windows

cd build-files\applications\Debug\

Now the applications can be run using the following syntax:

./app_name $num_iterations $consistency_level $debug

consistency_level = causal or linear

debug parameter is optional

Example commands:

./stack_app 1000 causal
./courseware_app 100000 linear
./twitter_app 100 causal debug

Each application run will output the number of times it found violations in the given number of iterations.

Refer to applications/readme for description of all application and their violations.

Team

This work came out of joint research done by teams at Microsoft Research, India and IRIF, France. The team members include (in alphabetical order):

  • Ranadeep Biswas
  • Constantin Enea
  • Diptanshu Kakwani
  • Akash Lal
  • Jyothi Vedurada

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

About

An in-memory mock database system to generate traces. A clone from https://github.com/microsoft/weak-isolation-mock-db

License:Other


Languages

Language:C++ 95.6%Language:CMake 3.5%Language:Shell 0.5%Language:C 0.4%