DBS as Distributed Broadcast System.
pip3 install -r requirements.txt
Central used to help nodes found each other. When any common node start, it needs to register to central and retrieve others node's information from central node, therefore you need to start a central node first.
Use config template provided in repo and set IS_CENTRAL_NODE = True to start a central node.
python3 app.py
After central node started, then you can start common node.
Change CENTRAL_NODE_ADDRESS in config to central node's address and set IS_CENTRAL_NODE to False, then run:
python3 app.py
to start a common node.
Please using any auto recover mechanism to run node to ensure node can be recovered after it has been killed. After it restarted and sync with central node, it will automatically recover all data and start to work.
curl --location --request GET 'http://xxx.com/data/'
curl --location --request PUT 'http://xxx.com/data/'
--header 'Content-Type: application/json'
--data-raw '{ "id": "115", "raw": "test", "signature": "aaa" }'