-
Notifications
You must be signed in to change notification settings - Fork 583
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
Add namespacing to event-type #137
Conversation
@inlined couple of questions for ya as we ponder this:
|
@inlined just to add a little more concreteness to my 2nd bullet in the previous comments... if we do add this, would it make sense to define the namespace portion of it more like this: The namespace portion of the event-type provides a classification mechanism to scope the event. For example, Not thrilled with the wording, but hopefully you get where I'm headed. just an idea.... |
I suspect there would usually be duplication for services (e.g. S3) and almost never duplication with self-managed software. Other cases exist within a software organization if non-prod tiers are hosted at a different URI but still conform to the prod API definition.
Indeed. Maybe I could use some help word-smithing this. I had originally used hosted + on-prem software as my mental model, but there's also a "compatibility mode" use case as well. E.g. Google Cloud Storage implements AWS S3's API. I see no problem with that team also supporting AWS's events, though any divergence in behavior should be Google's bug, not Amazon's. Amazon would "own" the semantics of all events prefixed by their domain. Similarly, I would love it if domain-specific working groups came up with standard events that many vendors would conform to, such as
I would need to think about this. Some software (especially any catalog services akin to Kubernetes' Service Catalog) would need this to be a MUST (and possibly add site ownership verification) were it to link the event type to any documentation, spec, etc. Otherwise there could be land rushes, name stealing, etc. |
@duglin I don't see how it would work if event-type had no namespace. How do people make up new event types? I'd prefer to avoid some kind of central registry in the near-term. As a developer, I want to know that object.create or object.update has a specific payload -- for the latter, some vendors may include a diff, some may include the new object in its entirety, some may include new and old. The proposal is to have namespaces for source and event type separate to allow for multiple orgs (different producers) to deploy the same software. So, for example, in some future world, WordPress might have an event-type This seems to be a critical refinement to the spec in order to allow for interoperability. |
I wasn't thinking of a centralized registry or anything like that. Nor was I suggesting that people not use namespaces. In the internet where you have lots of systems at play I totally agree with something more than just |
I'm with @duglin on this. I find SHOULD sufficient. FWIW, our usage "Microsoft.Storage.BlobCreated" is already compliant. We own the .microsoft TLD. |
@clemensv @duglin I'm not categorically against softening this to a "SHOULD." I'd like to lean on other successful specs as case studies where an analogous key either has a MUST (which lets us ask whether it was considered onerous) or has a SHOULD (which lets us ask whether any problems arose). Do any come to mind? Also, I wonder if we could narrow the amount we weaken the claim. E.g. it MUST be namespaced. The namespace SHOULD be a domain associated with the product. The namespace MAY be used for routing and software MAY require the domain ownership be verified. |
What about:
The reason I dropped the MAY for the "Often..." sentence is because what a consumer does with this info is out of the spec's control. I think we could still use an additional sentence around the namespace to help explain it a bit more, after the "Often..." sentence. Perhaps something like: "Namespaces are useful to provide contextual information for the event, or to group it with related events." I dunno.... feel like it needs work. |
To @inlined's question - I don't know a lot of messaging/evening specs where such a name collision concern is explicitly addressed and fast rules are being set. HTTP is enormously successful with being pretty loose, see https://tools.ietf.org/html/rfc7230#section-3.2.1 and https://tools.ietf.org/html/rfc7231#section-4 where you "ought" to register names you use, but rarely anyone does. I'm perfectly ok with this field with just being a string without any further rules and restrictions. If we make rules, the "reverse DNS" notation should at most be a recommendation. |
I guess this PR, if it would be accepted and merged, closes #32 - please consider amending the commit message appropriately. |
I like that idea. I just wonder, if a producer that produces one of those standard events or even reuses events in a way you described as 'compatibility mode' SHOULD provide an event-type-version. That's probably a topic for a separate PR, though. As CloudEvents focus on interoperability, I think that haveing a namespace is a MUST, but I agree that reverse DNS could be a "SHOULD". |
Did not do a deep-dive discsusion on the 4/5 call, but there was a general sense that the direction was ok. Just need to work on the exact wording. |
Second (or third) the "SHOULD" instead of "MUST" suggestion. |
@inlined can you rebase? Also, there were some requests for changes - are you still thinking about those? |
94ae269
to
374dd5f
Compare
Thanks for the feedback everyone. I've accepted the phrasing suggestions and rebased to fix the conflict. |
spec.md
Outdated
* customer.created | ||
* REQUIRED | ||
* MUST be a non-empty string | ||
* SHOULD be prefixed with a reverse-DNS name associated with the software |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@inlined I'm still unclear on this. Is it really the software that produces the event or the semantics of the event? I thought we wanted it to say com.github.pull.create
even if the software component wasn't a github.com component, but it wanted receivers to act as if it did. Isn't the event type more about semantics of the event and less about where it came from - which would be source
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be semantic namespacing. Could change it to something like
SHOULD be prefixed with a reverse-DNS name. The prefixed domain dictates
the organization which defines the semantics of this event type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me - thanks
@inlined this needs to be rebased due to the camelCase PR going in |
This commit has been spliced off of cloudevents#129 Signed-off-by: Thomas Bouldin <inlined@google.com>
Noticed that "namespace" was still in the searialization docs, even though it was removed from spec.md. Fixed. Signed-off-by: Thomas Bouldin <inlined@google.com>
Accept wording suggestions. This closes issue cloudevents#32 Signed-off-by: Thomas Bouldin <inlined@google.com>
It is explicitly OK for one software organization to emit event-types of another organizatoin, so long as they are conforming to the standard set by the organization in the namespace. Signed-off-by: Thomas Bouldin <inlined@google.com>
c96d49f
to
5606a11
Compare
@duglin totally OK and thanks for the heads up about rebasing. Pushed a fix. |
@inlined thanks for the rebase/update. Per our call on 4/12 we approved this PR pending the minor wording change we agreed to. Merging. |
* Add namespacing to an event. This commit has been spliced off of cloudevents#129 Signed-off-by: Thomas Bouldin <inlined@google.com> * Update serialization.md to namespace event-type. Noticed that "namespace" was still in the searialization docs, even though it was removed from spec.md. Fixed. Signed-off-by: Thomas Bouldin <inlined@google.com> * Soften stance on namespacing to SHOULD. Accept wording suggestions. This closes issue cloudevents#32 Signed-off-by: Thomas Bouldin <inlined@google.com> * Clarify the meaning of the event-type package namespace. It is explicitly OK for one software organization to emit event-types of another organizatoin, so long as they are conforming to the standard set by the organization in the namespace. Signed-off-by: Thomas Bouldin <inlined@google.com>
Overview
Add reverse-DNS namespacing to
event-type
. This commit has been spliced off of #129.I agree that removing
namespace
from the spec was a step in the right direction because it was ambiguous what is being namespaced. This change proposes that event types are themselves namespaced. This can be important for any proxy or action that chooses to group related streams of events. As I've said before, there's a very big difference between "document.create" events when you're referring to a Word document or a Mongo document.Updated seralization.md, including removing the "namespace" parameters that were already removed from spec.md.
Usage Scenarios
Hosted Software
A GitHub pull request event from github.com
Self-managed software
The same event on enterprise GitHub. Because the event is from the same software running in a new location, the source path and event type stay the same; only the source-authority changes.
Closes: #32