Skip to content

OpenChirp Software Stack

Khushboo Bhatia edited this page Mar 14, 2017 · 51 revisions

REST API

Tracking page for OpenChirp Software Stack development. The acronym CRUD is used in the following sections and it stands for Create, Read, Update, Delete.

Location

  • CRUD on location.
  • Get devices at a location
  • Get gateways at a location.
  • Check to not allow deletion of non-empty locations.
  • Validation in create/update request ( For example, creating a location with name "root" should not be allowed)

Device

  • CRUD on device.
  • Add/Update/Delete transducers to device.
  • Publish to a transducer.

Device Template

  • CRUD on device template.
  • Create a new device using a template.

Commands

  • CRUD on commands.
  • Execute a command.

Gateway

  • CRUD on gateway.
  • Get all devices linked to a gateway.

Service

  • CRUD on service.
  • Add a device to a service. ( This includes publishing to the service's topic so it is notified immediately).
  • Remove a device from a service.
  • Get all devices linked to a service. (The output of this call includes the service specific config.)

User

  • Create a user in database for every signup using a google account.
  • Save owner for each resource created.
  • API to get a user's devices, services, locations with a search by name option.
  • Save user's session info in Redis.

Timeseries Database

  • Service that stores transducer data to TSDB.
  • REST API for reading last value of any device-transducer.
  • REST API that returns time series data for visualization, dump csv.

Authentication

  • Google oauth2 integration for REST API
  • User/Password based auth for MQTT Broker.
  • REST API to do CRUD operations on mqtt user/password.

Access Control

  • Any user with google account has read access but nobody has write access unless they are granted GLOBAL_WRITE role by an admin.
  • Device Level access control.
  • REST API for users with ADMIN role to manage privileges for others.

MQTT Broker

  • Use RabbitMQ's MQTT plugin( Mosquitto is used currently) .

Database ( MongoDB)

  • Setup automatic backups
  • Restrict connection to localhost
  • DB health monitoring: Number of read/write requests, CPU usage, uptime etc.

Logging

  • Log all HTTP requests with userId and timestamp
  • Setup alerts for exceptions
  • Log file rotation and archiving

Visualization

IFTTT Framework

Clone this wiki locally