Difference between revisions of "WISE-PaaS/SRP Services"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
== Overview ==
+
== OVERVIEW ==
  
 
[[File:Wise-paas 2.0.png|RTENOTITLE]]
 
[[File:Wise-paas 2.0.png|RTENOTITLE]]
Line 35: Line 35:
 
PostgreSQL as default relation database and including Common/RMM /SCADA/IMM/etc. MongoDB/DoucmentDB for sensor information collect.
 
PostgreSQL as default relation database and including Common/RMM /SCADA/IMM/etc. MongoDB/DoucmentDB for sensor information collect.
  
== Common Database Scheme ==
+
== COMMON DATABASE SCHEME ==
  
 
=== Concept & Design Rules ===
 
=== Concept & Design Rules ===
Line 53: Line 53:
 
=== Common Database Table Details ===
 
=== Common Database Table Details ===
  
Table Account  
+
Table Account
  
 
[[File:Account tbl.png|RTENOTITLE]]
 
[[File:Account tbl.png|RTENOTITLE]]
Line 68: Line 68:
  
 
[[File:Device tbl.png|RTENOTITLE]]
 
[[File:Device tbl.png|RTENOTITLE]]
 +
 +
=== Non-Structure Data (MongoDB/DocumentDB) ===
 +
 +
*Default Collections
 +
<blockquote>
 +
*Event
 +
**WISE-PaaS platform event message
 +
**Format
 +
{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "product": "RMM", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "type": "DEVICE", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "subtype": "DEVICE_DISCONNECTED", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "severity": "ERROR", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "message": "DEVICE_DISCONNECTED", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "extMsg": &lt;JSONObject&gt;, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "device_id": 2, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "device_name": "AC09", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "account_id": 2, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "account_name": "admin", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "ts": ISODate('2016-11-29T05:13:46.759Z') }
 +
*Handler (Plugin)
 +
**Handler (Plugin) report data (source data)
 +
*Capability
 +
**Handler capability structure
 +
*Heartbeat
 +
**WISE-PaaS device’s keepalive mechanism, ensure device connection state.
 +
</blockquote>
 +
 +
 +
*Sensor Collections (Dynamic generate and transfer to key/value)
 +
<blockquote>
 +
*SUSIControl
 +
*HDDMonitor
 +
*Modbus
 +
*SenHub
 +
*IoTGW
 +
*…
 +
</blockquote>
 +
[[File:collect.png]]
 +
== API MANAGEMENT (RESTFUL APIS) ==
 +
 +
=== Common REST APIs ===
 +
 +
*Device APIs
 +
*Group APIs
 +
*Account APIs
 +
*Role APIs
 +
*Data Management APIs
 +
*NoSQL APIs
 +
 +
=== Custom REST API Categories ===
 +
 +
*RMM
 +
*IMM
 +
*SCADA
 +
*OTA
 +
 +
 +
 +
== DEVICE CONNECTIVITY ==
 +
 +
=== Message Topics ===
 +
 +
=== Handshake Sequence ===
 +
 +
=== Data Format ===
 +
 +
*Basic JSON Format
 +
*IPSO Format (Application Framework)
 +
 +
 +
 +
== DEVOPS MANAGEMENT ==
 +
 +
=== Continuous Integration & Continuous Delivery ===
 +
 +
=== Version Control ===
 +
 +
=== Build and Test ===
 +
 +
=== Release & Deploy ===
 +
 +
== CUSTOM SERVICE INTEGRATION ==
 +
 +
=== Access Methods ===
 +
 +
=== Internal Messaging(ZMQ) ===
 +
 +
=== Java Library ===
 +
 +
=== Common Restful APIs ===
 +
 +
=== RMM/OTA/SCADA/IMM Integration ===
 +
 +
*Scenario 1) RMM show more information about account
 +
*Scenario 2) OTA deploy a package for region devices
  
 
== Document ==
 
== Document ==

Revision as of 08:12, 16 January 2017

OVERVIEW

RTENOTITLE

  • API Management

Adopt Azure API Management/Open-source (WSO2) to integrate various SRP services API.

  • Common Service APIs/Lib

Basic Account/Device/Group/Role operation APIs, including Add/Edit/Delete/Search/Advance Search WISE-PaaS administration information (Product Support, version, capability…etc.)

  • Custom/SRP Service

RMM/IMM/OTA/SCADA self-service APIs

  • Common Data Workers

Including device basic information and sensor data from broker. (Common MQTT Topic) For structure info (device Info) store into PostgreSQL For non-structure (sensor Info) store into MongoDB/DocumentDB/...etc.

  • Custom/SRP Data Workers

Process RMM/IMM/OTA/SCADA self-MQTT topic message and store into self-database (RMM/IMM/OTASCADA DB)

  • Message Broker (RabbitMQ)

Adopt RabbitMQ as default cluster broker, and plugin MQTT as communication protocol.

  • Device Agent

Define common MQTT topic handshake message and custom/SRP topic format.

  • Database (SQL/NoSQL)

PostgreSQL as default relation database and including Common/RMM /SCADA/IMM/etc. MongoDB/DoucmentDB for sensor information collect.

COMMON DATABASE SCHEME

Concept & Design Rules

  • Device belong to multi-groups or not to any group.
  • Each account have non or multi-groups.
  • Each group must belong to someone account.
  • Group of group (1-3 Levels)
  • Each account must belong to someone role.

RTENOTITLE

Common Database Scheme

RTENOTITLE

Common Database Table Details

Table Account

RTENOTITLE

Table Role

RTENOTITLE

Table Group

RTENOTITLE

Table Device

RTENOTITLE

Non-Structure Data (MongoDB/DocumentDB)

  • Default Collections
  • Event
    • WISE-PaaS platform event message
    • Format

{         "product": "RMM",         "type": "DEVICE",         "subtype": "DEVICE_DISCONNECTED",         "severity": "ERROR",         "message": "DEVICE_DISCONNECTED",         "extMsg": <JSONObject>,         "device_id": 2,         "device_name": "AC09",         "account_id": 2,         "account_name": "admin",         "ts": ISODate('2016-11-29T05:13:46.759Z') }

  • Handler (Plugin)
    • Handler (Plugin) report data (source data)
  • Capability
    • Handler capability structure
  • Heartbeat
    • WISE-PaaS device’s keepalive mechanism, ensure device connection state.


  • Sensor Collections (Dynamic generate and transfer to key/value)
  • SUSIControl
  • HDDMonitor
  • Modbus
  • SenHub
  • IoTGW

Collect.png

API MANAGEMENT (RESTFUL APIS)

Common REST APIs

  • Device APIs
  • Group APIs
  • Account APIs
  • Role APIs
  • Data Management APIs
  • NoSQL APIs

Custom REST API Categories

  • RMM
  • IMM
  • SCADA
  • OTA


DEVICE CONNECTIVITY

Message Topics

Handshake Sequence

Data Format

  • Basic JSON Format
  • IPSO Format (Application Framework)


DEVOPS MANAGEMENT

Continuous Integration & Continuous Delivery

Version Control

Build and Test

Release & Deploy

CUSTOM SERVICE INTEGRATION

Access Methods

Internal Messaging(ZMQ)

Java Library

Common Restful APIs

RMM/OTA/SCADA/IMM Integration

  • Scenario 1) RMM show more information about account
  • Scenario 2) OTA deploy a package for region devices

Document