All Projects → wepay → Waltz

wepay / Waltz

Licence: apache-2.0
Waltz is a quorum-based distributed write-ahead log for replicating transactions

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Waltz

Gnes
GNES is Generic Neural Elastic Search, a cloud-native semantic search system based on deep neural network.
Stars: ✭ 1,178 (+259.15%)
Mutual labels:  database, distributed-systems
Etcd Cloud Operator
Deploying and managing production-grade etcd clusters on cloud providers: failure recovery, disaster recovery, backups and resizing.
Stars: ✭ 149 (-54.57%)
Mutual labels:  database, distributed-systems
Laravel Log To Db
Custom Laravel and Lumen 5.6+ Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel/Monolog native logging functionality.
Stars: ✭ 76 (-76.83%)
Mutual labels:  database, log
Ddia
《Designing Data-Intensive Application》DDIA中文翻译
Stars: ✭ 10,458 (+3088.41%)
Mutual labels:  database, distributed-systems
Materialize
Materialize lets you ask questions of your live data, which it answers and then maintains for you as your data continue to change. The moment you need a refreshed answer, you can get it in milliseconds. Materialize is designed to help you interactively explore your streaming data, perform data warehousing analytics against live relational data, or just increase the freshness and reduce the load of your dashboard and monitoring tasks.
Stars: ✭ 3,341 (+918.6%)
Mutual labels:  database, distributed-systems
Rqlite
The lightweight, distributed relational database built on SQLite
Stars: ✭ 9,147 (+2688.72%)
Mutual labels:  database, distributed-systems
Etcd
Distributed reliable key-value store for the most critical data of a distributed system
Stars: ✭ 38,238 (+11557.93%)
Mutual labels:  database, distributed-systems
Log Sys
A distributed log system which is based on spring cloud & docker
Stars: ✭ 161 (-50.91%)
Mutual labels:  log, distributed-systems
Dbtester
Distributed database benchmark tester
Stars: ✭ 214 (-34.76%)
Mutual labels:  database, distributed-systems
Scalardb
Universal transaction manager
Stars: ✭ 178 (-45.73%)
Mutual labels:  database, distributed-systems
Memento
Simple + Powerful interface to the Mnesia Distributed Database 💾
Stars: ✭ 597 (+82.01%)
Mutual labels:  database, distributed-systems
Trino
Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
Stars: ✭ 4,581 (+1296.65%)
Mutual labels:  database, distributed-systems
Copycat
A novel implementation of the Raft consensus algorithm
Stars: ✭ 551 (+67.99%)
Mutual labels:  database, distributed-systems
Assassin
Assassin is a decentralized database that uses background threads to kill slow JavaScript.
Stars: ✭ 57 (-82.62%)
Mutual labels:  database, distributed-systems
Corfudb
A cluster consistency platform
Stars: ✭ 539 (+64.33%)
Mutual labels:  database, distributed-systems
Zookeeper
Apache ZooKeeper
Stars: ✭ 10,061 (+2967.38%)
Mutual labels:  database, distributed-systems
Ctlstore
Control Data Store
Stars: ✭ 171 (-47.87%)
Mutual labels:  database, distributed-systems
Platon Go
Golang implementation of the PlatON protocol
Stars: ✭ 331 (+0.91%)
Mutual labels:  distributed-ledger, distributed-systems
Oklog
A distributed and coördination-free log management system
Stars: ✭ 2,937 (+795.43%)
Mutual labels:  log, distributed-systems
Go Advanced
A small Vietnamese Go book compiled by ZaloPay teams.
Stars: ✭ 321 (-2.13%)
Mutual labels:  distributed-systems

Waltz

Waltz is a distributed/replicated write ahead log for transactions.

Documentation

We have the documention here.

Building

To build Waltz:

./gradlew clean build

Testing

To run a single test class:

./gradlew clean :waltz-storage:test -Dtest.single=StorageClientTest

To run a single test method:

./gradlew clean :waltz-storage:test --tests com.wepay.waltz.storage.client.StorageClientTest.testBasicReadWrite

Smoke test

Waltz also comes with a smoke test that starts:

  • 1 ZooKeeper server
  • 2 Waltz clients
  • 3 Waltz servers
  • 3 Waltz storage nodes

It then sends 1 million transactions while turning the servers on and off at random. Afterwards, it validates that all transactions were received, and that the checksums of the data are identical. It also logs throughput and latency.

To run smoke tests:

bin/smoketest.sh

The smoke test output looks like:

0001[... .*. *]
0002[... .** *]
0003[... *** *]
0004[..* *** *]
0005[*.* *** *]
0006[*** *** *] --..-..-..-..-+..-..-+..-..-..-..-+..-..-..-..-..-..-+..+
0007[.** *** *] +++-..-..-..-
0008[*** *** *] +..-..-
0009[*** .** *]
0010[*.* .** *] +++..-..-..-..-..-..+-
0011[*.* *** *] ..
0012[*** *** *] +-..-..-..-+..-+..-..-..-..+-..-

Each state change results in a new line. The first four digits indicate the number of server/storage start/stops that have been triggered so far. The [... ... .] portion indicates the state of the server nodes, storage nodes and the zookeeper server, where * means that the process is up, and . means that it's down. Lastly, the trailing part of the line indicates 1000 writes (-), 1000 reads (.), and retries (+).

A log file (smoketest.log) can be found in your home directory.

Demo app

Waltz comes with a demo app that shows an example account balance database built on top of Waltz.

Start a test Waltz cluster in docker environment.

bin/test-cluster.sh start

Start a MySQL instance in docker environment.

bin/demo-bank-db.sh start

Run demo application with simple self-explanatory commands.

bin/demo-bank-app.sh

Run Waltz in Docker

We implemented shell scripts to run a Waltz cluster in local Docker containers for testing purpose.

Creating the Docker images

./gradlew distDocker

This builds the Docker images.

Starting the test cluster

bin/test-cluster.sh start

This creates a user defined docker network waltz-network and starts three container, a zookeeper server, a waltz storage node, and a waltz server node in waltz-network.

Zookeeper port is 2181 inside waltz-network and exposed to the host machine at 42181. So, if you want to run a Waltz application outside of waltz-network, use yourHostName:42181 for zookeeper.connectString. The cluster's root ZNode is /waltz_cluster. So specify this as cluster.root.

If the Docker images are not built yet, this script builds them. However, it doesn't automatically build a new images even when the source code is modified. You must rebuild images using distDocker gradle task.

Stopping the test cluster

bin/test-cluster.sh stop

This stops all three containers. You can resume the cluster using start command. All data in zookeeper and storages are preserved.

Destroying the test cluster

bin/test-cluster.sh clean

This will remove all three containers, thus removes all data.

Setting up the test cluster with multiple partitions.

The test cluster is set up with a single partition by default. If you want to create the test cluster with multiple partitions, the environment variable WALTZ_TEST_CLUSTER_NUM_PARTITIONS to the desired number of partitions before creating the test cluster. For example, to create the test cluster with five partitions, do the following.

export WALTZ_TEST_CLUSTER_NUM_PARTITIONS=5
bin/test-cluster.sh start

Running DemoBankApp

First create a database. The following command will create a mysql container and the database.

bin/demo-bank-db.sh start

Then, start the demo application:

bin/demo-bank-app.sh

To stop the MySQL instance:

bin/demo-bank-db.sh stop

To remove the database:

bin/demo-bank-app.sh clean

Publishing Waltz Docs

Go through website/README.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].