Tessera is a web-based sensor aggregation platform that features authentication and encryption on both remote sites and the cloud. All network traffic goes over an SSL pipeline. The receiving server (E.g. Amazon EC2) uses Node.js and Restify to process incoming data and stores the data into a MongoDB database. The sending server(s) will require a temporary database to queue outgoing data packets.
MongoDB Node.js -Restify.js -MongoDB.js -Mongoose.js -Checksum.js -Http-Proxy.js -log4js C++ Requirements -libcurl -g++ -C++11 -MongoDB C++ driver - Scons - Python -C++ Boost library -JsonCPP
The API is created with Restify as an interface to the MongoDB local to the API server. Using Mongoose and the JSON data passed through restify is parsed and accessed in the MongoDB. Validation uses a token system at the Sensor level, and uploading of data requires a SHA1 checksum which is varified by the API before inserting into the database.
For more in depth documentation of the API, see the readme within the api folder. For documentation on Testing the API, see the readme within the Tests folder, inside the api folder.
This instruction is
Run the following commands from the Install MongoDB MongoDB website: ```` sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list sudo apt-get update sudo apt-get install -y mongodb-org ```` NOTE: MongoDB is used both by the client-side and server-side as a way to store data. You will need to install MongoDB on the server-side and configure it for the API, and then for each client using the client software, install and configure MongoDB for it. Configuration for the MongoDB for the API can be found on the README within the api folder
The API requires Nodejs to run. On Ubuntu you can install through the apt-get package manager with the following commands. In order to install the API you will also need to install npm, Nodejs' package manager Install the API
sudo apt-get install nodejs sudo apt-get install npm
NOTE: If you would like to be able to run the test scripts for the API, you will need to download and install nodejs from the official Nodejs website. Npm will be included in that version. See the README within the Tests folder in the api folder for more information.
Next, download the repo and cd to the api folder from the console. Then run :
npm will automatcialy install all dependencies required to run the API
To be able to store data that the api recieves, you will need to also add the MINESENSE database to your MondoDB. From your console, enter the following commands
mongo use MINESENSE exit
To start the API, simply enter within the same folder
sudo nodejs main
OR if you are using a downloaded version from the Nodejs website you can call
The API listens to port 9002
Your done! For more configuration options and breakdown of the API, see the README within the api folder.
#Client The client was compiled and tested on Ubuntu 14.04. Therefore, the instructions below assumes that you are using Ubuntu.
##General Requirements Listed below are the dependencies that must be installed in order to run datafeeder and datapump properly. For instructions on compiling and running datafeeder and datapump, please refer to the readme in their individual folders.
###MongoDB See above for instructions
sudo apt-get install build-essential
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install scons
###C++ Boost Library
sudo apt-get install libboost-all-dev
###Mongo C++ Driver We are using the 26compat branch of the Mongo C++ drivers.
The drivers can be found at https://github.com/mongodb/mongo-cxx-driver/tree/26compat
Download the zip and manually extract it. Cloning the git link will give you the legacy branch.
In the Mongo C++ driver folder, issue the following command to build it and move to the files to /usr/local
sudo scons --prefix=/usr/local --full --use-system-boost install-mongoclient
###JsonCPP Original project location: https://github.com/open-source-parsers/jsoncpp
For ease of use, we have included the necessary headers and cpp files as part of this project.
Please copy the ext/json folder into /usr/include
cd ext sudo cp -R json /usr/include
###License This is a free software and distributed under the Apache License, Version 2.0
This is a BCIT student project for the 3rd term of Computer Systems Technology.
The team for this project consists of Alan Lai, Ben Soer, Matt Banman and Ryan Sadio.