2018-05-05 10:09:02 +03:00
|
|
|
# Distributed Blockchain Transactions (DBT)
|
2018-02-25 07:43:48 +02:00
|
|
|
|
2018-05-05 10:09:02 +03:00
|
|
|
This is a framework for working with SQL transactions in a distributed network. The framework allows you to compose SQL
|
|
|
|
|
transactions of multiple queries on different nodes and execute them later.
|
2018-02-25 07:43:48 +02:00
|
|
|
|
2018-05-05 19:41:54 +03:00
|
|
|
To ensure the reliability of the transactions a ledger using blockchain is used to keep track on ongoing transactions and
|
|
|
|
|
ensure queries within the transactions are consistent.
|
2018-05-05 19:40:42 +03:00
|
|
|
|
2018-05-05 19:55:00 +03:00
|
|
|
[](https://travis-ci.org/devsoap/dbt)
|
|
|
|
|
|
2018-05-05 19:40:42 +03:00
|
|
|
|
|
|
|
|
## DBT Core
|
2018-05-05 19:41:54 +03:00
|
|
|
|
2018-05-05 19:40:42 +03:00
|
|
|
The core library containing the DBTModule to include in your Ratpack application.
|
|
|
|
|
|
|
|
|
|
The DBT module can be added like so:
|
2018-06-05 19:28:28 +03:00
|
|
|
|
2018-05-05 19:40:42 +03:00
|
|
|
```groovy
|
|
|
|
|
bindings {
|
|
|
|
|
module (DBTModule) { config ->
|
2018-06-05 19:28:28 +03:00
|
|
|
config.ledger.remoteUrl = '<ledger host>:<ledger port>/ledger'
|
|
|
|
|
config.executor.remoteUrl = '<executor host>:<executor port>/executor'
|
2018-05-05 19:40:42 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2018-06-05 19:28:28 +03:00
|
|
|
## DBT Test
|
|
|
|
|
|
|
|
|
|
The test module contains all the integration tests for the module.
|
2018-05-05 19:40:42 +03:00
|
|
|
|
|
|
|
|
|
2018-06-05 19:28:28 +03:00
|
|
|
### Docker
|
2018-05-05 19:40:42 +03:00
|
|
|
|
2018-06-05 19:28:28 +03:00
|
|
|
There are two projects available for building the executor and the ledger as docker images.
|
2018-05-05 19:40:42 +03:00
|
|
|
|
2018-06-05 19:28:28 +03:00
|
|
|
* docker-ledger - Run the ledger as a docker image
|
|
|
|
|
* docker-executor - Run the executor as a docker image
|
2018-05-05 19:40:42 +03:00
|
|
|
|
2018-06-05 19:28:28 +03:00
|
|
|
For more information how to run and configure them see their corresponding READMEs.
|
2018-05-05 19:40:42 +03:00
|
|
|
|