Coder Social home page Coder Social logo

ezreal1997 / hybrid-blockchain-database-systems Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nusdbsystem/hybrid-blockchain-database-systems

0.0 0.0 0.0 26.46 MB

License: MIT License

Shell 35.23% Go 47.56% Dockerfile 2.16% Python 14.61% Makefile 0.36% Solidity 0.08%

hybrid-blockchain-database-systems's Introduction

Hybrid Blockchain Database Systems

This repository contains the code and instructions to reproduce the experiments presented in the paper "Hybrid Blockchain Database Systems: Design and Performance".

Reproduce

Pre-requisites

  • Install dependecies
  • Download and prepare YCSB data
  • Build binaries
  • Build docker images
$ cd scripts
$ ./install_dependencies.sh
$ ./gen_ycsb_data.sh 
$ ./build_binaries.sh
$ cd ../docker/veritas
$ ./build_docker.sh
$ cd ../bigchaindb
$ ./build_docker.sh
$ cd ../blockchaindb
$ ./build_docker.sh

For each system, we run the following set of experiments:

  • Effect of number of clients
  • Effect of number of nodes (peers)
  • Effect of key access distribution (uniform, latest, zipfian)
  • Effect of different YCSB workloads (WorkloadA, WorkloadB, WorkloadC)
  • Effect of block size
  • Effect of transaction size (record size)
  • Effect of transaction processing time
  • Effect of Networking

Veritas + Kafka

Run the following scripts to reproduce the above-mentioned experiments:

./run_benchmark_veritas_kafka_clients.sh
./run_benchmark_veritas_kafka_nodes.sh
./run_benchmark_veritas_kafka_distribution.sh
./run_benchmark_veritas_kafka_workload.sh
./run_benchmark_veritas_kafka_blocksize.sh
./run_benchmark_veritas_kafka_recordsize.sh
./run_benchmark_veritas_kafka_proctime.sh
./run_benchmark_veritas_kafka_networking.sh

Each script will generate a folder of the form logs-...-<timestamp>. Check the results recorded in the files of these folders.

In addition, we run the following experiments for Veritas + Kafka:

  • Effect of Veritas Peer Count on Kafka Operations (Figure 8)
  • Effect of the Underlying Database (Figure 11)
  • Effect of Zookeeper TSO (not included in the paper)
./run_benchmark_veritas_kafka_database.sh
./run_benchmark_veritas_kafka_clients_tso_zk.sh

Effect of Veritas Peer Count on Kafka Operations

This reuses the logs from running ./run_benchmark_veritas_kafka_nodes.sh, which are in the form logs-nodes-veritas-<timestamp>. In particular, we are interested in the following Kafka counters:

  • CURRENT-OFFSET - the current position of a consumer. There are N consumers in total, so we need the sum of these counters to get the number of read operations.
  • LOG-END-OFFSET - the offset of the last message written to the topic. This represents the number of write operations.

Please run ./get_kafka_ops.sh logs-nodes-veritas-... to get the read and write operations for a given log folder. Note that Figure 8 represents the average of 3 such logs (runs).

Veritas + Tendermint

We use the same veritas docker images. Then, we run the following scripts:

./run_benchmark_veritas_tendermint_clients.sh
./run_benchmark_veritas_tendermint_nodes.sh
./run_benchmark_veritas_tendermint_distribution.sh
./run_benchmark_veritas_tendermint_workload.sh
./run_benchmark_veritas_tendermint_recordsize.sh
./run_benchmark_veritas_tendermint_proctime.sh
./run_benchmark_veritas_tendermint_networking.sh

BlockchainDB

We use blockchaindb docker images. Then, we run the following scripts:

./run_benchmark_blockchaindb_clients.sh
./run_benchmark_blockchaindb_nodes.sh
./run_benchmark_blockchaindb_distribution.sh
./run_benchmark_blockchaindb_workload.sh
./run_benchmark_blockchaindb_blocksize.sh
./run_benchmark_blockchaindb_recordsize.sh
./run_benchmark_blockchaindb_proctime.sh
./run_benchmark_blockchaindb_networking.sh
./run_benchmark_blockchaindb_sharding.sh

BigchainDB

We use bigchaindb docker images. Then, we run the following scripts:

./run_benchmark_bigchaindb_clients.sh
./run_benchmark_bigchaindb_nodes.sh
./run_benchmark_bigchaindb_distribution.sh
./run_benchmark_bigchaindb_workload.sh
./run_benchmark_bigchaindb_recordsize.sh
./run_benchmark_bigchaindb_proctime.sh
./run_benchmark_bigchaindb_networking.sh

BigchainDB Parallel Validation

To run BigchainDB with Parallel Validation (PV), modify lines 16 and 17 of BigchainDB/scripts/start-all.sh, such as:

# bigchaindb start > /dev/null 2>&1 &
bigchaindb start --experimental-parallel-validation > /dev/null 2>&1 &

Next, re-build the Docker image:

cd docker/bigchaindb
rm -r bigchaindb-2.2.2/scripts
./build_docker.sh

Then repeat all the steps of BigchainDB:

./run_benchmark_bigchaindb_clients.sh
./run_benchmark_bigchaindb_nodes.sh
./run_benchmark_bigchaindb_distribution.sh
./run_benchmark_bigchaindb_workload.sh
./run_benchmark_bigchaindb_recordsize.sh
./run_benchmark_bigchaindb_proctime.sh
./run_benchmark_bigchaindb_networking.sh

Aborted Transaction

The number of aborted transactions is reported by Veritas (Kafka) in its server log, such as:

2021/11/13 13:57:20 Abort transaction 1

By counting the number of such messages, one can get the total number of aborted transactions:

cat logs-distribution-veritas-kafka-.../veritas-latest-logs/veritas-* | grep Abort | wc -l

There are no aborted transactions in Veritas (TM) and BlockchainDB.

License

MIT License

Authors

Zerui Ge, Dumitrel Loghin, Tianwen Wang, Pingcheng Ruan, Beng Chin Ooi

hybrid-blockchain-database-systems's People

Contributors

dloghin avatar wtwinlab avatar gezr1997 avatar ruan0007 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.