Subject: [T2TRG] PlugREST in Nice

From: "Kovatsch Matthias" <[email-masked]>
Date: Tue, 19 Jan 2016 19:00:10 +0000

Dear RG

Next week we will have a joint W3C IG WoT/T2TRG meeting in Nice, France: https://www.yesgolive.com/eurecom/w3c-wot-ig-f2f-meeting-and-plugfest

We had the plan to hold our first PlugREST there. However, the participation of implementers was unfortunately low. As a reminder, Klaus provided the following draft to sketch out our lighting use case:

https://tools.ietf.org/html/draft-hartke-core-lighting-00

A bulletin board following this spec is running here: coap://129.132.130.252:5082/

The development version of Copper (https://github.com/mkovatsc/Copper) is supporting the experimental Content-Formats. With it, you should be able to discover a light bulb and a remote control. Unfortunately, you will have to copy the URIs from the raw "Incoming" payload and paste it into the URL bar by hand to follow the links...

For the PlugREST, you could try to implement a CoAP server that supports Observe and provides a lighting state resource serving application/lighting+json. Follow the link to the config resource and use the form to configure your LRC with the light bulb! :)

Due to the low participation, the PlugREST will be more like a tech demo to stimulate discussion this time (still try to prepare something based on the explanation above! :D). Together with a student, we extended Klaus's use case a bit and show the first prototype of a machine client that uses hypermedia controls to fulfill certain goals. It can automatically follow links and use forms based on the relation types. Thus, there are no hardcoded URIs or pre-defined resource structures. This allows to handle changes in the environment without reprogramming the client.

We altered the media types defined by Klaus a bit to play with different concepts. You can use the following Web app to explore the environment through their links and the media types used: http://ynh.github.io/core-hal-explorer/
You will have to run an HTTP-CoAP cross-proxy locally, so that CoAP requests can be emulated in the browser: https://github.com/ynh/coap-polyfill ("mvn clean install" and then "java -jar coap-polyfill-1.0.0-SNAPSHOT-jar-with-dependencies.jar").
In the Web app text field enter: "coap://129.132.130.252:5783/rd-lookup/res" and press "Run!". By clicking on the nodes, you can inspect the resource representations.

Feel free to play around and please provide feedback (also if you crash something ;) ).

Michael Koster has done something similar. Unfortunately, he has a conflict but will present his hypermedia solution remotely. An expectation is to discuss the findings and include them for the next issue of the PlugREST. Furthermore, we want to align the HATEOAS approach with the W3C WoT IG work.

Looking forward to Nice,
Matthias

---

From: Michael Koster <[email-masked]>
Date: Fri, 22 Jan 2016 07:20:01 -0800

Thanks Matthias,

I have put up a public repository on github with instructions and various resources 
including a simple self-test that spins up a local server and creates some resources 
from a model using the client, then reads them back from the server.

https://github.com/connectIOT/HypermediaDemo <https://github.com/connectIOT/HypermediaDemo>

Also there is a demo public resource at thingschema.org <http://thingschema.org/> to demonstrate the schema
and vocabulary that the model is based on, roughly patterned after schema.org <http://schema.org/> but 
for things. There is a meta-catalog example on thingschema.org <http://thingschema.org/> that points to a
live demo “thing” with a core link-format+json discovery index (read only please).

Please use the github issues for questions and comments 

Best regards,

Michael

> On Jan 19, 2016, at 11:00 AM, Kovatsch Matthias <[email-masked]> wrote:
> 
> Dear RG
>  
> Next week we will have a joint W3C IG WoT/T2TRG meeting in Nice, France: https://www.yesgolive.com/eurecom/w3c-wot-ig-f2f-meeting-and-plugfest <https://www.yesgolive.com/eurecom/w3c-wot-ig-f2f-meeting-and-plugfest>
>  
> https://tools.ietf.org/html/draft-hartke-core-lighting-00 <https://tools.ietf.org/html/draft-hartke-core-lighting-00>
>  
> A bulletin board following this spec is running here: coap://129.132.130.252:5082/ <coap://129.132.130.252:5082/>
> The development version of Copper (https://github.com/mkovatsc/Copper <https://github.com/mkovatsc/Copper>) is supporting the experimental Content-Formats. With it, you should be able to discover a light bulb and a remote control. Unfortunately, you will have to copy the URIs from the raw “Incoming” payload and paste it into the URL bar by hand to follow the links…
>  
> Due to the low participation, the PlugREST will be more like a tech demo to stimulate discussion this time (still try to prepare something based on the explanation above! :D). Together with a student, we extended Klaus’s use case a bit and show the first prototype of a machine client that uses hypermedia controls to fulfill certain goals. It can automatically follow links and use forms based on the relation types. Thus, there are no hardcoded URIs or pre-defined resource structures. This allows to handle changes in the environment without reprogramming the client.
>  
> We altered the media types defined by Klaus a bit to play with different concepts. You can use the following Web app to explore the environment through their links and the media types used: http://ynh.github.io/core-hal-explorer/ <http://ynh.github.io/core-hal-explorer/>
> You will have to run an HTTP-CoAP cross-proxy locally, so that CoAP requests can be emulated in the browser: https://github.com/ynh/coap-polyfill <https://github.com/ynh/coap-polyfill>(“mvn clean install” and then “java -jar coap-polyfill-1.0.0-SNAPSHOT-jar-with-dependencies.jar”).
> In the Web app text field enter: “coap://129.132.130.252:5783/rd-lookup/res <coap://129.132.130.252:5783/rd-lookup/res>” and press “Run!”. By clicking on the nodes, you can inspect the resource representations.
>  
> _______________________________________________
> T2TRG mailing list
> [email-masked] <mailto:[email-masked]>
> https://www.irtf.org/mailman/listinfo/t2trg <https://www.irtf.org/mailman/listinfo/t2trg>