A distributed storage with serializable distributed transaction supported.
It supports
- 2PC, 3PC, PAC, G-PAC, Easy Commit, and FlexiCommit atomic commit protocols.
- TPC-C and YCSB benchmark Test.
- Distributed read-write transactions.
- PostgresSQL, MongoDB, and self-implemented storage as the underlying storage.
Here are important directories and their purposes:
├─benchmark
├─configs
├─fc-server
├─bin
├─logs
├─network
│ ├─configs
│ ├─coordinator
│ ├─detector
│ │ └─learner
│ └─participant
├─scripts
├─storage
└─utils
benchmark
: This directory contains the YCSB (Yahoo! Cloud Serving Benchmark) and TPCC (Transaction Processing Performance Council) clients used for benchmarking.storage
: This directory contains the key-value store implementation with transaction support.network
: This directory represents the networking components of the project.network/coordinator
: This subdirectory contains the coordinator-side ACP (Atomic Commit Protocol) handler code.network/participant
: This subdirectory contains the participant-side ACP handler code.bin
: This directory is used to store the built executable binary files.configs
: This directory contains the configuration files used by the project.logs
: This directory is intended for storing debug logs generated by the project.
To build the storage
make build
To check if the installation succeeds.
make check
For the Local test, please set the LocalTest
in config\utils.go
to True, modify configs\local.json
and Makefile
according to your IP addresses and ports, and run:
make delay
This would add a 10ms delay to specific ports of localhost for the Local tests.
If you want to remove the Local port delay, run
make rm_delay
For the remote test, please update the links in ./configs/remote.json
and ./utils/utils.go
.
If you make changes to FC's code, please make sure to rebuild the program and rerun unit tests:
make build
make test
FC configurations can be updated in configs/glob_var.go
. Here we list several important ones.
TransactionLength: number of operations per transaction.
NumberOfShards: number of partitions for the whole database.
SelectedACP: the selected atomic commit protocol. Six algorithms are supported (FC, 2PC, 3PC, PAC, G-PAC, Easy Commit).
CrossShardTXNPercentage: the percentage of distributed transactions.
StorageType: the selected storage (BenchmarkStorage, MongoDB, or PostgresSQL).
ShardsPerTransaction: number of accessed participants per transaction.
ClientRoutineNumber: number of concurrent clients.
Distribution: the distribution of injected failures.
DelayStdDev: the standard deviation of network variances.
EnableReplication: whether to enable replications.
The experiments can be run with
make exp
count/cross
: The total number of transactions/distributed transactions.success/crossSuc
: The total number of committed transactions/distributed transactions.p99/P50/ave
: The P99/P50/average latency of all committed transactions.Level
: The average robustness Level (only for FC, 1 for failure-free, 2 for crash failure, 3 for network failure)s1/s2/s3
: the latency breakdown for the first/second/third phase of the commit Protocol.error
: The number of transactions that abort due to failures.