blob: cb848bb8334b0c8cfba5709e29869b7a4aef8463 [file] [log] [blame]
{"name":"Release-0.2.0","content":"<p>Finally, the second version (0.2.0) of the Eclipse unide project is released! The <a href=\"http://unide.eclipse.org\">REST Server on the Testserver</a> has been updated as well.</p>\n<h1>Quick start</h1>\n<h2>Binsa chrome app</h2>\n<p>Download the binsa chrome app from <a href=\"http://download.eclipse.org/unide/binsa.crx\">download page</a>. Open your chrome browser at <a href=\"chrome://extensions\">chrome://extensions</a> and drag the binsa.crx file onto the page. You should be able to see your new chrome app in <a href=\"chrome://apps\">chrome://apps</a></p>\n<h2>REST Server</h2>\n<p>Download the REST server file from <a href=\"https://repo.eclipse.org/content/repositories/unide-releases/org/eclipse/iot/unide/ppmp/ppmp-server/0.2.0/ppmp-server-0.2.0.jar\">repo.eclipse.org</a>, create a simple configuration file (e.g. application_conf.json):</p>\n<pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n <span class=\"token property\">\"http.port\"</span><span class=\"token operator\">:</span> <span class=\"token number\">8090</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"persistence.enable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">false</span>\n<span class=\"token punctuation\">}</span>\n\n</code></pre>\n<p>and start the server</p>\n<pre class=\"language-bash\"><code class=\"language-bash\">java -jar ppmp-server-0.2.0.jar -conf application_conf.json\n</code></pre>\n<p>Point your browser to <a href=\"http://localhost:8090\">http://localhost:8090</a> and see the servers documentation running on your local server! At this point, Production Performance Management Protocol validation (via HTTP POST to <code>/rest/v2/validate</code>) is enabled, but no persistence.</p>\n<p>If you want to send data to the server, a quick way is via <a href=\"https://www.getpostman.com/\">Postman App</a>, which is available as native app or <a href=\"https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en\">Chrome app</a>. Once installed and started, you can easily use the &quot;Import &gt; Import From Link&quot; feature to get the prepared <a href=\"https://raw.githubusercontent.com/eclipse/unide/f4d349bc4a0096d3f99e14cf5f8b9f53a5145fdd/servers/rest/assets/postman/unide.postman_collection.json\">unide.postman_collection.json</a> and the corresponding <a href=\"https://raw.githubusercontent.com/eclipse/unide/f4d349bc4a0096d3f99e14cf5f8b9f53a5145fdd/servers/rest/assets/postman/unide.postman_environment.json\">unide.postman_environment</a>. 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 &quot;/validate&quot; and hit &quot;Send&quot; button. If you get the response</p>\n<blockquote>\n<p>Ppmp Message of type 'xy' is valid</p>\n</blockquote>\n<p>the unide REST server works as expected!</p>\n<h1>Persistence</h1>\n<h2>Influx DB</h2>\n<p><a href=\"https://portal.influxdata.com/downloads\">Download</a> 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:</p>\n<pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n <span class=\"token property\">\"http.port\"</span><span class=\"token operator\">:</span> <span class=\"token number\">8090</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"persistence.enable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"persistence.system\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"influxDb\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"influxDb.url\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"http://localhost:8086\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"influxDb.user\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"root\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"influxDb.password\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"root\"</span>\n<span class=\"token punctuation\">}</span>\n</code></pre>\n<p>After starting the database and the unide REST server, it should be possible to send POST requests to <code>http://localhost:8090/rest/v2</code>. This path receives all message types. To query the database after, use:<br>\n<a href=\"http://localhost:8086/query?pretty=true&amp;u=root&amp;p=root&amp;db=Measurements&amp;q=SELECT%20*%20FROM%20%22ppmp_measurements%22\">http://localhost:8086/query?pretty=true&amp;u=root&amp;p=root&amp;db=Measurements&amp;q=SELECT * FROM &quot;ppmp_measurements&quot;</a> or the other databases that are documented on the <a href=\"http://localhost:8090/#influxdb_schema_design\">running server instance</a>, respectively.</p>\n<h2>SQL (timescale, h2)</h2>\n<p>Download the appropriate jdbc driver, e.g. <a href=\"http://repo1.maven.org/maven2/com/h2database/h2/1.4.197/h2-1.4.197.jar\">h2-*.jar</a>, modify the configuration file, e.g. for h2:</p>\n<pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n <span class=\"token property\">\"http.port\"</span><span class=\"token operator\">:</span> <span class=\"token number\">8090</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"persistence.enable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"persistence.system\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"sql\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"sqlDb.driver\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"org.h2.Driver\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"sqlDb.url\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"jdbc:h2:./test\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"sqlDb.user\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"sa\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token property\">\"sqlDb.password\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"\"</span>\n<span class=\"token punctuation\">}</span>\n</code></pre>\n<p>Start the Production Performance Management Protocol Server with the jdbc dependency on the classpath, e.g.:</p>\n<pre class=\"language-bash\"><code class=\"language-bash\">java -cp <span class=\"token string\">\"h2-1.4.197.jar;ppmp-server-0.2.0.jar\"</span> io.vertx.core.Launcher org.eclipse.iot.unide.server.MainVerticle -conf application.conf\n</code></pre>\n<p>Now, all the data send to the REST server is persisted in the file <code>test.mv.db</code>.<br>\nFor concurrent db actions (reading while writing), use the h2 tcp server instead. h2 is not recommended for production use!</p>\n<h1>Background</h1>\n<h2>Download</h2>\n<p>Available artifacts for download:</p>\n<ul>\n<li><a href=\"https://repo.eclipse.org/content/repositories/unide-releases/org/eclipse/iot/unide/ppmp/ppmp-schema/2.0.0/\">Production Performance Management Protocol Schema v2</a></li>\n<li><a href=\"https://repo.eclipse.org/content/repositories/unide-releases/org/eclipse/iot/unide/ppmp/ppmp-java-binding/0.2.0/\">Production Performance Management Protocol java Binding</a></li>\n<li><a href=\"https://pypi.python.org/packages/d5/af/c90911d1da56a1ed0238338ba01068d43b8cd0137e9ca52b0f52a279f73e/unide_python-0.2.0-py2.py3-none-any.whl#md5=ca67bcd536b3a4015f72f5fa53d36543\">Production Performance Management Protocol Python Binding</a></li>\n<li><a href=\"https://repo.eclipse.org/content/repositories/unide-releases/org/eclipse/iot/unide/ppmp/ppmp-server/0.2.0/\">Production Performance Management Protocol Server</a></li>\n<li><a href=\"http://download.eclipse.org/unide/binsa.crx\">binsa client chrome app</a></li>\n</ul>\n<p>Source code:</p>\n<ul>\n<li><a href=\"https://github.com/eclipse/unide/releases/tag/v0.2.0\">unide</a></li>\n<li><a href=\"https://github.com/eclipse/unide.java/releases/tag/v0.2.0\">java binding</a></li>\n<li><a href=\"https://github.com/eclipse/unide.python/releases/tag/v0.2.0\">python binding</a></li>\n</ul>\n<h2>Release notes</h2>\n<h3>REST Server improvements (refactoring &amp; persistence)</h3>\n<ul>\n<li>Added persistence to timeseries/postgres db</li>\n<li>Outfactored schema files</li>\n<li>Adjusted maven file</li>\n<li>Added unit tests</li>\n<li>Added documentation &amp; java docs</li>\n<li>Adjusted error handling</li>\n<li>Removed unused code</li>\n<li>Added postman collections</li>\n<li>Added grafana configuration file</li>\n</ul>\n<h3>New HTML5 simulation client</h3>\n<ul>\n<li>Progressive Webapp runs as website (see <a href=\"https://unide.eclipse.org/binsa\">https://unide.eclipse.org/binsa</a>), browser app, native client (via <a href=\"https://nwjs.io/\">nw.js</a>) or app (via <a href=\"https://cordova.apache.org/\">Apache cordova</a>)</li>\n</ul>\n<h3>Production Performance Management Protocol JSON Schema files</h3>\n<ul>\n<li>Introduced separate bundle for schemas</li>\n<li>general fixes\n<ul>\n<li>make schema draft-06 compliant</li>\n<li>added 'id' and 'descriptions' where applicable</li>\n<li>added 'type' and 'default' for enums</li>\n<li>added 'required' fields where necessary</li>\n<li>made 'additionalProperties': true explicit for 'metaData'</li>\n<li>sorted the properties for improved readability</li>\n</ul>\n</li>\n<li>message_schema fixes\n<ul>\n<li>added minItems: 1 to messages</li>\n</ul>\n</li>\n<li>measurement_schema fixes\n<ul>\n<li>completed 'limits' specification</li>\n<li>added 'patternProperties' and minProperties detail to 'series'</li>\n<li>added minItems: 1 to measurements</li>\n</ul>\n</li>\n<li>process_schema fixes\n<ul>\n<li>made 'id' and 'name' of a 'program' mandatory</li>\n<li>fixed 'shutoffValues', having properties not items</li>\n<li>fixed 'limits', having properties not items and number values rather than object values as limits</li>\n<li>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.</li>\n<li>completed 'series' definition</li>\n</ul>\n</li>\n</ul>\n<h3>Website</h3>\n<ul>\n<li>Autogenerating Production Performance Management Protocol specification from JSON schemas to avoid discrepancies</li>\n<li>Generating UML schemas with plantuml</li>\n<li>Using similar HTML5 stack as simulation client for SPA website</li>\n</ul>\n<h3>Other</h3>\n<ul>\n<li>java and new python bindings in separate github repositories</li>\n</ul>\n","url":"/blog/2018/3/26/Release-0.2.0","title":"Unide 0.2.0 released","date":"2018-03-26T10:39:00.000Z","tags":["releases"],"prev":{"url":"/blog/2018/2/13/grinding-machine-scenario","title":"Use Cases: Unide and the Eclipse Testbed"},"next":{"url":"/blog/2018/9/4/Template-for-PPMP-transformation","title":"Use Cases: Template for transformation"}}