Re: Strawman Proposal: Web Thing Protocol - WebSocket Sub-protocol

Hi Ben,

My experience with implementing the web of things over WebSockets may be helpful.

For security, there needs to be a way for servers to require clients to be re-authorised when the previously granted security token expires. This can be implemented as simple message exchanges.

You need a way to signal changes to metadata as well as to data, for instance when the user snaps together two devices to extend functionality, e.g. plugging in a camera and likewise unplugging.

For telemetry applications a bundle of measurements can be transmitted in the same message, and there is a choice of whether to include the timestamp in each message or for this to be implicit when such updates are set at a regular interval, e.g. 10 times per second.

Some services send a combination of data and metadata, e.g. medical devices using FHIR (Fast Healthcare Interoperability Resources).  Likewise, services may support actions that return graph data expressed in JSON-LD or other formats.  It isn’t sufficient to limit information exchange to what can be specified with JSON schema!

Best regards,
     Dave

> On 16 Nov 2023, at 14:07, Ben Francis <ben@krellian.com> wrote:
> 
> Dear members of the Web Thing Protocol Community Group,
> 
> Following the publication of our Web Thing Protocol Use Cases & Requirements <https://www.w3.org/community/reports/web-thing-protocol/CG-FINAL-web-thing-protocol-requirements-20231101/> report, I am excited to kick off work on the core deliverables <https://w3c.github.io/web-thing-protocol/charter/#deliverables> in our charter.
> 
> The first deliverable I suggest we tackle is a WebSocket sub-protocol specification.
> 
> I hope you don't mind me kicking off the discussion with a strawm <https://docs.google.com/document/d/1KWv-aQfMgsqBFg0v4rVqzcVvzzisC7y4X4CMUYGc8rE/edit?usp=sharing>a <https://docs.google.com/document/d/1KWv-aQfMgsqBFg0v4rVqzcVvzzisC7y4X4CMUYGc8rE/edit?usp=sharing>an proposal <https://docs.google.com/document/d/1KWv-aQfMgsqBFg0v4rVqzcVvzzisC7y4X4CMUYGc8rE/edit?usp=sharing>. This is a quick (but quite detailed) draft document in a Google Doc outlining a possible WebSocket sub-protocol design approach.
> 
> This design is informed by implementation experience from the relatively primitive WebSocket API <https://webthings.io/api/#web-thing-websocket-api> used in the WebThings platform, but is a more sophisticated design which includes the full set of operations which have now been defined in the Web of Things interaction model. It is also flawed in various ways.
> 
> In the proposal I have defined a collection of message payload formats for the full set of WoT operations. For Property related operations I have written a fairly detailed specification including error conditions etc., to demonstrate the level of detail I have in mind. The rest of the operations are currently just sketched out with examples but are not yet fully specified (I didn't want to get too carried away before getting wider input!). I have also left lots of "Editor's Comments" to highlight areas that I think definitely require further discussion.
> 
> Please note I have no intention of landing this full text in a formal group report, it is only meant as a starting point for discussions, because I think it's easier to discuss something concrete rather than purely theoretical. I welcome your comments (inline in the document using the comments feature, here on the mailing list or on GitHub <https://github.com/w3c/web-thing-protocol/>), but also potentially other strawman proposals outlining alternative approaches based on your own experience if you feel the need.
> 
> Following this initial discussion, I propose we create a more formal report on GitHub using ReSpec, and ensure every paragraph is carefully reviewed before landing.
> 
> I very much look forward to receiving your feedback. Let's get this thing started!
> 
> Best regards
> 
> Ben
> 
> --
> Ben Francis
> Chair, Web Thing Protocol Community Group

Dave Raggett <dsr@w3.org>

Received on Thursday, 16 November 2023 14:44:36 UTC