Unide 0.2.0 released

  03/26/18, 12:39

Finally, the second version (0.2.0) of the Eclipse unide project is released! The REST Server on the Testserver has been updated as well.

Quick start

Binsa chrome app

Download the binsa chrome app from download page. Open your chrome browser at chrome://extensions and drag the binsa.crx file onto the page. You should be able to see your new chrome app in chrome://apps

REST Server

Download the REST server file from repo.eclipse.org, create a simple configuration file (e.g. application_conf.json):

{
  "http.port": 8090,
  "persistence.enable": false
}

and start the server

java -jar ppmp-server-0.2.0.jar -conf application_conf.json

Point your browser to http://localhost:8090 and see the servers documentation running on your local server! At this point, Production Performance Management Protocol validation (via HTTP POST to /rest/v2/validate) is enabled, but no persistence.

If you want to send data to the server, a quick way is via Postman App, which is available as native app or Chrome app. Once installed and started, you can easily use the "Import > Import From Link" feature to get the prepared unide.postman_collection.json and the corresponding unide.postman_environment. You should now have Machine/Measurement/Process messages and requests prepared in the Collections tab. In order to send, you could extend the URL with "/validate" and hit "Send" button. If you get the response

Ppmp Message of type 'xy' is valid

the unide REST server works as expected!

Persistence

Influx DB

Download the InfluxDB Time-Series Data Storage and unzip or install it on your system. By default, it opens an http port at 8086. In order to make use of it, the configuration file should be modified, e.g. to:

{
  "http.port": 8090,
  "persistence.enable": true,
  "persistence.system": "influxDb",
  "influxDb.url": "http://localhost:8086",
  "influxDb.user": "root",
  "influxDb.password": "root"
}

After starting the database and the unide REST server, it should be possible to send POST requests to http://localhost:8090/rest/v2. This path receives all message types. To query the database after, use:
http://localhost:8086/query?pretty=true&u=root&p=root&db=Measurements&q=SELECT * FROM "ppmp_measurements" or the other databases that are documented on the running server instance, respectively.

SQL (timescale, h2)

Download the appropriate jdbc driver, e.g. h2-*.jar, modify the configuration file, e.g. for h2:

{
  "http.port": 8090,
  "persistence.enable": true,
  "persistence.system": "sql",
  "sqlDb.driver": "org.h2.Driver",
  "sqlDb.url": "jdbc:h2:./test",
  "sqlDb.user": "sa",
  "sqlDb.password": ""
}

Start the Production Performance Management Protocol Server with the jdbc dependency on the classpath, e.g.:

java -cp "h2-1.4.197.jar;ppmp-server-0.2.0.jar" io.vertx.core.Launcher org.eclipse.iot.unide.server.MainVerticle -conf application.conf

Now, all the data send to the REST server is persisted in the file test.mv.db.
For concurrent db actions (reading while writing), use the h2 tcp server instead. h2 is not recommended for production use!

Background

Download

Available artifacts for download:

Source code:

Release notes

REST Server improvements (refactoring & persistence)

  • Added persistence to timeseries/postgres db
  • Outfactored schema files
  • Adjusted maven file
  • Added unit tests
  • Added documentation & java docs
  • Adjusted error handling
  • Removed unused code
  • Added postman collections
  • Added grafana configuration file

New HTML5 simulation client

Production Performance Management Protocol JSON Schema files

  • Introduced separate bundle for schemas
  • general fixes
    • make schema draft-06 compliant
    • added 'id' and 'descriptions' where applicable
    • added 'type' and 'default' for enums
    • added 'required' fields where necessary
    • made 'additionalProperties': true explicit for 'metaData'
    • sorted the properties for improved readability
  • message_schema fixes
    • added minItems: 1 to messages
  • measurement_schema fixes
    • completed 'limits' specification
    • added 'patternProperties' and minProperties detail to 'series'
    • added minItems: 1 to measurements
  • process_schema fixes
    • made 'id' and 'name' of a 'program' mandatory
    • fixed 'shutoffValues', having properties not items
    • fixed 'limits', having properties not items and number values rather than object values as limits
    • fixed 'specialValues' to be an array of specialValue items with 'name' for indicating the nature, rather than one single object with its keys indicating the nature. Offering optional '$_time' tag to be consistent with measurements.
    • completed 'series' definition

Website

  • Autogenerating Production Performance Management Protocol specification from JSON schemas to avoid discrepancies
  • Generating UML schemas with plantuml
  • Using similar HTML5 stack as simulation client for SPA website

Other

  • java and new python bindings in separate github repositories