Skip to content
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

Terminology additions for Source, Consumer, Producer and Intermediary #420

Merged
merged 6 commits into from
May 17, 2019
Merged

Terminology additions for Source, Consumer, Producer and Intermediary #420

merged 6 commits into from
May 17, 2019

Conversation

deissnerk
Copy link
Contributor

I added some definitions to the terminology section of the spec. I know there might be some discussion, especially regarding the producer. I need these terms to better propose rules of when and how the event context can be changed.

spec.md Outdated
#### Producer

The "producer" is a specific instance, process or device that creates the data
structure describing the event and its context.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the term "data structure" sounds like it's implying the CloudEvent - if so, we should just say that. If not, can you elaborate on what you mean?

spec.md Outdated

#### Consumer

A "consumer" receives the event and acts upon it. It uses the content and data
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what you mean by "content and data" - do you mean "context attribute and data attribute" ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or if you want to just say "Context" instead of "Context attributes" then perhaps make it a "C" instead of "c" and make it an href to the "Context" definition. It's not clear when you mean the CE Context entity vs something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a general issue about the terminology. If you look at the definition of event, it is already CloudEvent specific, explaining context and data. Does that mean that whenever I mention event, I imply that it is a CloudEvent?

Copy link
Contributor

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to address the questions about middleware, and middleware which modifies the context attributes, but all the content LGTM (non-voting).

spec.md Outdated

The "source" is the logical system or service where the occurrence happened. In
a distributed system it might consist of multiple [Producers](#producer). If a
source is not aware of CloudEvents, a producer creates the CloudEvent on behalf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion from the call: "an external producer"...

spec.md Outdated

#### Source

The "source" is the logical system or service where the occurrence happened. In
Copy link
Member

@erikerikson erikerikson Apr 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I will accept the will of the group to accept this PR, this appears to contradict the definition of the source attribute as defined:

Description: This describes the event producer.

Given this, it seems that either the two should be disambiguated or this PR should be updated to change that text before it is merged.

However, the text following that first sentence and the given examples seem to imply different meaning and purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bringing this up. I was aware of this contradiction and wanted to stir up the discussion, because "describes the event producer" seems to me very vague. Why would we call a field, that describes the producer, source and not producer?
I think the fact the source attribute is a URI (an identifier and not descriptor) and the examples like urn:event:from:myapi/resource suggest that the source attribute identifies something more logical. I really have a hard time finding better words. Any proposals for a better wording are welcome.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I have terminology but perhaps its useful to consider that perhaps the "logical" source exists in user/application conceptual design space while producers live more in the space of system implementation? That seems the strongest argument for the #420 definition of source.

Perhaps a downside is that making it logical reduces the attribute's value to middleware or consumers. Personally, I had leaned towards preferring the source as a unique producer (guaranteed by application), primarily because of the relationship (assuming ordering guarantees) that ensures a map of producers to lists of ordered events which looks much like a logical clock if not a CRDT. If the IDs of producers are monotonically increasing and the event IDs are monotonically increasing, one also gets efficient and simple deduplication+idempotency which in my favored scenarios of many multi-versioned consumer groups makes the costs tractable. I think I, at least (if not fully), failed in my reading of the definition of source because the understanding I retained from some time ago, by bias, weighted that first sentence strongly and broadly ignored the implications of the remainder.

Given the approval of this PR then it seems that solution is to simply remove mention of producers from the definition of source.

@Tapppi
Copy link
Contributor

Tapppi commented Apr 25, 2019

Although we agreed that the terminology here makes sense on the call, writing a comment on PR #391 that made me realise this terminology is in conflict with both the name and description of the source attribute. Reading that comment should make one realise the confusion, but let me try to elaborate here. For clarity, I will capitalise the terminology introduced here.

According to this terminology, two instances of a "Users service" would be distinct PRODUCERS. Together they are a SOURCE (a logical system) and have distinct source attribute values compared to other SOURCES. However, the "Users service" as a SOURCE will likely produce events with multiple source attribute values for different subsystems/data/tables/etc within the system. When one says "source", it can be difficult to know whether they mean the SOURCE (e.g. "Users service") or a specific source attribute value from SOURCE (e.g. example.com/user/account or example.com/user/address).

The granularity of source attribute values will vary depending on system but that granularity would rarely match with SOURCE as defined here. For example a database change data capture system would probably base it on table/resource names/OIDs while an event-driven microservice would likely assign a value with semantic meaning not necessarily tied to technical implementation. Neither of these match SOURCE.

@duglin
Copy link
Collaborator

duglin commented Apr 25, 2019

While we accepted this PR on today's call, based on some chats afterwards (and with @deissnerk's agreement) we decided to hold off merging it since there are still some lingering questions. Please add comments!!

@deissnerk
Copy link
Contributor Author

@Tapppi I was actually quite happy that you brought this up, yesterday! So defining source as a logical system might not be the best wording. I still kind of like logical, though. I also liked that you mentioned semantic meaning.
Bottom line to me is that producer is something technical, while source is more logical or abstract, and with semantic meaning.
I could of course also delete my definition of source, as the attribute is already defined, but that would just shift the discussion, as my definition of producer would still be conflicting.
So I would like to know if any of the definitions in this PR make sense in your eyes, or if they should be adjusted. The discussion we had about #391 showed me that some more clarity on the definitions is needed.

@duglin
Copy link
Collaborator

duglin commented May 15, 2019

We may need to do a little bit of word-merging with #391 in the "source" attribute section but that's minor and I think the two align nicely. LGTM

@duglin
Copy link
Collaborator

duglin commented May 16, 2019

Approved on the 5/16 call

@deissnerk can you rebase this? Then I can merge it.

deissnerk added 6 commits May 17, 2019 13:30
Signed-off-by: Klaus Deissner <[email protected]>
Signed-off-by: Klaus Deissner <[email protected]>
Eliminate ambiguities in definition of producer

Signed-off-by: Klaus Deissner <[email protected]>
@deissnerk
Copy link
Contributor Author

@duglin done

@duglin
Copy link
Collaborator

duglin commented May 17, 2019

@deissnerk thanks!
merging

@duglin duglin merged commit 0cbebab into cloudevents:master May 17, 2019
@deissnerk deissnerk deleted the terminology branch February 6, 2020 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants