The Internet of Things Data as a Service Module Broker (IoTDSM-B) is a project developed in the Laboratory of Distributed Systems and Concurrent Programming (LaSDPC) of the University of São Paulo (USP). This tool aims to simplify the acquisition and communication of sensor data in the Internet of Things (IoT). For this, this tool supports different communication strategies, such as HTTP, MQTT and CoAP.
To install IoTDSM-B, compile the project with the command:
#Compile the project with all dependencies disregarding the execution of tests
~$ gradle build shadowJar
This command will generate a jar file with all dependencies required to execute the project. The generated jar is located in the directory path:
#File: iotdsm-broker-all-1.0.0.jar and iotdsm-broker-1.0.0.jar
~$ build/libs
If you only need to download the dependencies, execute the command:
~$ gradle build --refresh-dependencies
To execute the IoTDSM-B, just run the command:
#Executes IoTDSM-B
~$ java -jar iotdsm-broker-all-1.0.0.jar <args>
To run the unit tests just run the command:
#Perform Unit Tests
~$ gradle test
The IoTDSM-B provides an input interface for different configuration parameters. These parameters are passed through system-defined flags. To view the available parameters, execute the command:
#Shows the options parameters available
~$ java -jar iotdsm-broker-all-1.0.0.jar -help
The available parameters are as follows:
-c,--configuration <arg> Path to configuration file [config.properties].
-h,--help Show help [true, false].
-l,--log <arg> Enable or disable log [true, false].
-lf,--logfile <arg> Log4J Configuration File [log4j.properties].
-v,--log-level <arg> Changes the log level [OFF, TRACE, DEBUG, WARN, ERROR, FATAL, ALL].
In addition, other settings can be defined by means of a configuration file. This file specifies the IoTDSM-B configuration enviroment. The Table 1, show the available arguments in the configuration file (config.properties).
Table 1: Web Server input variables.
Variable | Description |
---|---|
BROKER_PROTOCOL | Protocol Type (HTTP, MQTT or COAP) |
BROKER_HOST | Broker Host Address |
BROKER_PORT | Broker Port Address |
These variables are passed through a configuration file (config.properties) through the command -c= ${config_file}.
~$ java -jar iotdsm-broker-all-1.0.0.jar -c=${config_file}
This project provides docker images for use in production. The following is the official docker file available. To compile the images in Docker from IoTDSM just run the command:
#To Compile Image (IoTDSM-B)
~$ docker build -f iotdsm-b.dockerfile -t iotdsm-b .
- Gradle - Dependency Manager.
The IoTDSM-B provides a wiki about this project, visit the WIKI page.
Please read the CONTRIBUTING.md file for more details on how to contribute to this project.
- Vinicius Aires Barros - Initial Project Initializer - @v4ires
- Sérgio Baptista - Collaborator - @Pinobex
This project is licensed under the MIT license - see the LICENSE file for more details.
- University of São Paulo (USP)
- Institute of Mathematical and Computer Sciences (ICMC)
- Laboratory of Distributed Systems and Concurrent Programming (LaSDPC)