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
|
|
|
|
|
|
|
|
|
|
|
|
|
## 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:
|
|
|
|
|
```groovy
|
|
|
|
|
bindings {
|
|
|
|
|
module (DBTModule) { config ->
|
|
|
|
|
config.ledger.remoteUrl = 'http://localhost:5050/ledger'
|
|
|
|
|
config.executor.remoteUrl = 'http://localhost:5050/executor'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## DBT Demo
|
|
|
|
|
|
|
|
|
|
Demo application for testing the transactions.
|
|
|
|
|
|
|
|
|
|
The demo application has a database with one table LOGS which you can use to insert and select data from.
|
|
|
|
|
|
|
|
|
|
The demo can be run by running ``./gradlew :dbt-demo:run`` after which the demo is running on http://localhost:5050
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## DBT Test
|
|
|
|
|
|
|
|
|
|
The test module contains all the integration tests for the module.
|