-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency on Cloud Events #126
Comments
@egekorkan |
Apart from not being from a standards body (whether in part or in full), I don't think a dependency on CloudEvents is needed or desirable for the Core Profile, see #100. |
@benfrancis Wrt. reference problem: we can resolve by defining a compatible payload as part of the profile. |
Again, "tying into specifics of the protocol" is the whole point of a protocol binding. Protocol bindings should not be protocol agnostic because their purpose is to be protocol specific. Other event mechanisms in other protocols may also have their own payload formats and may use a non-JSON serialisation or binary data format, so there's not even any guarantee that the same object wrapper could be re-used. The current event protocol binding provides a very simple and neat mapping from the WoT information model onto the server-sent events event stream format:
Example event affordance in a Thing Description:
Example event payload:
Why overcomplicate this by adding in an unnecessary data wrapper which must then be added to the data schema of every single event affordance? Other than the non-goal of protocol agnosticism, what value does it provide to justify the added complexity? |
#235 needs to be revisited since it was merged with no proper reviews (also the PR was merged when it was 1 day old) |
Summary of my points across multiple issues and PRs since this issue is going to be used for discussions:
Adding this information in a TD makes for longer TDs (maybe not depending on the my comment below) and bigger payloads.
|
@egekorkan All questions have been answered in The content of the MR has not changed, it has been just rebased to resolve merge conflicts, |
On the technical side: Interop with existing cloud environments is helping adoption of WoT by enabling interop with what is in the world right now. It is unlikely that the following implementations will change to use an event format that is exclusively defined in a TD: |
I think my core comment is not addressed anywhere: #198 (review) If we are not aiming for others to change/adapt to our views of WoT, the whole profile specification makes no sense. We want people to do a specific thing when doing a new WoT implementation. If not, we have the entire binding templates documents that are all about explaining how you can use existing technology or standard in a WoT way. Maybe this is just my mistinterpretation.
We are talking about devices and sometimes about consumers. We do not have a clear statement about the cloud. Also, if we are talking about cloud like this, we are becoming a cloud-specific HTTP profile which means we need a renaming. |
I believe this is your main comment, please clarify if you mean something else. "too much" and "does not make sense" are opinions, but what "too much"? What means "does not make sense"? Do you have a counterproposal about a scalable message format that will be easily integrated into changing existing event mechanisms of cloud systems? |
Everything that is in the TD already or can be put into the TD, should not be in the payload. Copy pasting the relevant part of my comment from above:
Only the bold parts should stay and are the ones that make sense.
I do not know where this motivation comes from. Also, how does adding a wrapper around the data improves scalability? |
In #100 (comment) I explained why I don't think CloudEvents is a good fit for the HTTP SSE Profile, which already has its own payload format for events. All of the metadata in the CloudEvent format can be provided in a Thing Description and by existing standardised fields in the Server-Sent Events standard. From my implementation experience for the HTTP SSE Profile I found that the only data actually needed inside an event payload were:
WebHooks is a bit different for a couple of reasons:
As @egekorkan has already said, most of the metadata in CloudEvents is redundant in the context of WoT because it's already provided by the Thing Description. Putting those metadata in the payload of every WebHook event request has no obvious benefit for greenfield implementations, and is therefore wasteful. From what I can tell, the useful fields from CloudEvents for WoT use cases are:
A minimal solution would be a payload format like the following:
A more verbose option would be:
Or if we wanted to be consistent with the HTTP SSE Profile:
I don't see much benefit of including all the metadata from the CloudEvents format for greenfield WoT implementations (for which the Profile specification is designed), but big downsides in terms of inefficiency. It might make sense to create a CloudEvents protocol binding template, since binding templates are designed for describing brownfield devices. Since @egekorkan and I disagree with @mlagally on whether to use CloudEvents for the HTTP Webhooks Profile, do any of the other editor's of the specification have an opinion? @mmccool, @mryuichi, @sebastiankb, @k-toumura? Other than Oracle, is anyone else interested in providing an implementation which uses CloudEvents? |
Payload formats for WebHooks are deferred to Profile 1.1. / Profile 2.0. |
@mlagally has mentioned the F2F before TPAC of using cloud events in the profile and there are also other mentions of it in various issues. Something that needs to be documented somewhere is that the CloudEvents specification is driven by the Cloud Native Foundation, which is not a standards organization, thus cannot be simply linked to. This implies that having a dependency requires this profile spec to mirror their specification, as TD does with JSON Schema. The group should decide on whether this work is feasible in the current charter before deciding on adopting this specification.
The text was updated successfully, but these errors were encountered: