Giter Site home page Giter Site logo

gitter-badger / openioe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scorelab/openioe

0.0 0.0 0.0 4.27 MB

Open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.

Shell 0.74% JavaScript 25.92% Java 35.60% HTML 18.01% CSS 17.87% Scala 1.88%

openioe's Introduction

OpenIoE

OpenIoE is an Open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything. It enables you to subscribe to data streams and get data from the sensors and store them. The application was generated using JHipster application generator.

Main features

  • A high-perfomance Java server side with Spring Boot
  • Message broker support with ActiveMQ Artemis
  • Multi Protocol support (MQTT, AMQP)
  • NoSQL data storage for sensor data (Cassandra)
  • Support for timeline series modelling
  • Publish-subscribe feature using MQTT

Docker

  • All the services required to run the platform can be easily started via bundled docker-compose.yml located in rest_api/src/main/docker
  • Browse to rest_api/src/main/docker and run docker-compose up -d
  • Open 127.0.0.1 in the web browser where you can configure a user account and create devices and sensors
  • To stop the platform, run docker-compose stop in the same folder as above
  • Logs can be observed via docker-compose logs [CONTAINER] (ex: ioe-app)

Installation

Usage

  • Make sure Cassandra server is up. You can start Cassandra with 'sudo service cassandra start' and stop it with 'sudo service cassandra stop'. Verify that Cassandra is running by invoking nodetool status from the command line.
  • The executable for running the artemis message broker is found in /message_broker/bin. Run ./artemis run in order to start the broker.
  • Spring Boot is run by 'gradlew' executable in /rest_api. Run sudo ./gradlew to start running the application.
  • Open 127.0.0.1 in the web browser where you can configure a user account and create devices, sensors, subscriptions and publications.

Publish - subscribe behavior

The sensor data can be published using rest end point and message broker with MQTT support. Both methods accept the payload as JSON. An example for publishing data with rest endpoint using curl command is

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer <access_token>' -d '{
  "data": "24",
  "description": "test",
  "sensorId": 1,
  "timestamp": "2017-03-19T09:47:44.526Z",
  "topic" : "gps"
}' 'http://127.0.0.1:8080/api/sensors/{id}'

The user can also publish data using MQTT protocol with MQTT client applications by sending the data of the following form to the topic 'gps'.

  "data": "24",
  "description": "test",
  "sensorId": 1,
  "timestamp": "2017-03-19T09:47:44.526Z"

The user can subscribe to topics defined for subscription entity using MQTT client applications by providing the topic name as gps. Whenever a new data is published, it will be stored in Cassandra and can be received by the user.

Storing data

Data can be stored via the REST endpoint and the message broker. Both methods accept the payload as JSON. An example is {"sensorId":1,"data":"24","description":"test","timestamp":"2016-07-30T21:29:34+02:00"}

Retreiving data

Using the REST end point data can be retreived. http://127.0.0.1:8080/api/sensors/1/data where 1 is the sensor id http://127.0.0.1:8080/api/sensors/1/data?dates=2016-07-30,2016-07-2 where multiple dates can be specified

  • The requests should pass the Authentication token

Future work

  • Need to implement authentication for Publish Subscribe

openioe's People

Contributors

agentmilindu avatar charithccmc avatar padamchopra avatar priyapappachan avatar tharidu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.