The goal of this exercise is to build a system that works like an IoT platform โ in this case, a personal weight
tracker. This system is responsible for,
-
Consuming data sent from different sensors (emulators)
-
Storing the received data in MongoDB
-
Running the data through different rules to make basic predictions
Dependencies : [Java 7] (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html "JDK 7") | [Maven] (https://maven.apache.org/download.cgi "Maven Build") | [Mongo DB] (https://docs.mongodb.com/ "Mongo DB") | [Morphia Api] (http://mongodb.github.io/morphia/ "Morphia Api") | [Easy Rules] (http://www.easyrules.org/ "Easy Rules") | [Sensor-Emulator] (https://github.com/egen/sensor-emulator "Sensor-Emulator")
- Compile Project and generate jar
mvn clean package
- Run Project
java -jar -Dbase.value=<base_weight> target/egen-be-challenge-0.0.1-SNAPSHOT.jar
Enter value for base_weight. [Example- -Dbase.value=150]
- Test Project
mvn test
- Shell Script to compile and run the project [for unix based platform] -
./run-all.sh <base_weight>
Enter value for base_weight.
- Stores the data that comes from sensor
- Create
POST Request => http://localhost:8080/metrics/create/
- Read
GET Request => http://localhost:8080/metrics/read/
- Read by Range
GET Request => http://localhost:8080/metrics/readRange/{startTime}/{endTime}
- Stores the alerts that were created by the rules
- Read
GET Request => http://localhost:8080/alerts/read/
- Read by Range
GET Request => http://localhost:8080/alerts/readRange/{startTime}/{endTime}
VP