Quickstart
This guide will walk you through the core features of AntidoteDB.
We will use Docker to run AntidoteDB nodes. Please refer to the complete installation guide below if you wish to build the nodes from source:
In this guide, you will accomplish the following steps:
Start two AntidoteDB nodes as single-node data centers and connect them together
Start and commit a transaction
Use the Bounded Counter data type
Requirements
Install the latest version of Docker (Docker Installation Guide)
Install the latest version of docker-compose
Create a cluster
If you prefer to skip the steps to build the cluster manually, there is a Docker Compose file available at: https://github.com/mweberUKL/antidote_dev/tree/master/docker_dcs.
Download the deployment setup for a 2 data center single shard setup (docker-compose file)
Run
docker-compose up
We now have an AntidoteDB setup with two DCs (i.e. data is replicated once).
Connecting to AntidoteDB
In two separate terminals, connect to the console of each node:
Alternatively, you can use docker-compose to connect
Interacting with AntidoteDB
Start a new transaction and increment the value of a bounded counter. By default, if the counter does not exist, one is created automatically.
The counter can be decremented in the replica where it was created:
And the value of the counter can be read on the other replica (use the other terminal):
But cannot be decremented:
At this point, the transaction aborts and the system will automatically fetch permissions from another replica. After the resources are transfered between nodes, it is possible to decrement the counter.
Last updated