Paper presented at IEEE 2021 IoT Vertical and Topical Summit for Tourism. https://ieeexplore.ieee.org/abstract/document/9604903
This is an early version of a demonstrator of BigchainDB based architecture, which is used as a permissioned blockchain.
The data entry is performed by connecting SurveyJS to the blockchain.
The data visualization is provided via web browser using Plotly library.
The plotted graphs are retrieved by querying MongoDB.
The graphic representation is provided through a Node.js application, which makes use of Express.js as a middleware web framework to allow the communication between web browser and database.
The following components are required:
- BigchainDB 2.2.1,
- MongoDB 3.4 or newer,
- Tendermint 0.31.5 ,
- Node.js.
This demonstrator has been developed using Ubuntu 18.04.
To install BigchainDB please follow the steps indicated in [1], avoiding the usage of NGINX.
These are the steps performed to install the version 2.2.1:
1.Installing pip for python3:
sudo apt install python3-pip
- use pip3 to install bigchaindb
sudo pip3 install bigchaindb==2.2.1
configure bigchaindb running:
bigchaindb configure
To check if the version in the repository is correct:
apt-cache policy mongodb
After verifying that is the correct one, to install it:
sudo apt install mongodb
To check if mongodb is running:
systemctl status mongodb
To install tendermint we also installed unzip.
sudo apt install unzip
then we used wget to download the tendermint zip file.
unzip tendermint_v0.31.5_linux_amd64.zip
mv the directory to /usr/local/bin
sudo mv tendermint /usr/local/bin
Initialize it with
tendermint init
To allow members to connect each other is fundamental to configure the file config.toml as explained in [1]
Monit is used to run and monitor tendermint and bigchaindb. It will restart them if they crashed.
sudo apt install monit
As explained here, you will be able to run the bigchaindb-monit-config script, which will be in your PATH. Running the script is required to build a configuration file for Monit:
bigchaindb-monit-config
To run monit:
monit -d 1
To complete the Survey we create our forms on SurveyJS.io, and we use the related SurveyID.
In data_entry/survey_and_transaction.js it is shown the surveyID value that identify our survey administered to Tourists.
The Javascript code shown here is called inside data_entry/index.html, and through that code the data are inserted in the blockchain in JSON format.
To visualize the data inserted in the blockchain, we used a node.js application installed on one of the nodes.
To install node.js:
sudo apt install npm
These packages are required by our application:
npm install [email protected]
npm install [email protected]
npm install [email protected]
npm install [email protected]
npm install express -–save
npm install jquery
This is the package.json file.
The code of our node.js application can be found here.
To interact with the node.js application there are 2 Javascripts files, calculate.js and myFunctions.js, that are loaded into an html page.
In the test directory there are files used during the experiments, and a description of the test carried on.
Here are some videos of the experiments:
5 nodes experiment:
9 nodes shells:
10 nodes experiment: