Adding docs/spec shell.#147
Conversation
|
/assign mattmoor |
evankanderson
left a comment
There was a problem hiding this comment.
More comments later, have several hours of meetings next.
|
|
||
| This directory contains the specification of the Knative Eventing API, which is | ||
| implemented in [`pkg/apis/channels/v1alpha1`](/pkg/apis/channels/v1alpha1) and | ||
| [`pkg/apis/feeds/v1alpha1`](/pkg/apis/feeds/v1alpha1) and verified via [the e2e |
There was a problem hiding this comment.
Prefer to specify the k8s apiversion paths, rather than the repo paths.
| # Motivation | ||
|
|
||
| The goal of the Knative Eventing project is to provide a common toolkit and API | ||
| framework for producing and consuming events, primarily inside of serverless |
There was a problem hiding this comment.
I'd stress that this is intended to complement serverless workloads, but should work independently of any particular serverless implementation.
It's probably also worth referencing the CloudEvents spec.
Feel free to also lift text from the Eventing Glossary.
There was a problem hiding this comment.
ok, linked and reworded. Left off the serverless aspect.
evankanderson
left a comment
There was a problem hiding this comment.
More notes, almost done.
I may send you a PR or two as well.
| workloads. | ||
|
|
||
| Kubernetes has no primitives related to event processing, yet this is an | ||
| essential component in serverless workloads. Eventing will introduce high-level |
There was a problem hiding this comment.
essential component (citation needed)
There was a problem hiding this comment.
I don't have a citation... hm
| workloads. | ||
|
|
||
| Kubernetes has no primitives related to event processing, yet this is an | ||
| essential component in serverless workloads. Eventing will introduce high-level |
There was a problem hiding this comment.
Prefer active voice "Eventing introduces"
| integrate with existing message consumers. | ||
|
|
||
| The Knative Eventing APIs consist of Eventing API (these documents), | ||
| [Compute API](https://github.com/knative/serving) and |
There was a problem hiding this comment.
Eventing should be able to operate independently of serving and build, but those may be the best targets for eventing delivery (in terms of cost & observability).
|
|
||
| Kubernetes has no primitives related to event processing, yet this is an | ||
| essential component in serverless workloads. Eventing will introduce high-level | ||
| primitives for event production and delivery in forms that are extensible. If a |
There was a problem hiding this comment.
We should scope the extensibility of production and delivery. My personal $0.02 given the architecture of knative/serving and Istio is that event delivery should be push (retried if needed), and that delivery should be done using HTTP-compatible framing (because that works nearly everywhere), and provides nice mechanisms for multiplexing.
| @@ -0,0 +1,61 @@ | |||
| # Resource Groups | |||
|
|
|||
| Knative Eventing API is grouped into _Channels_ and _Feeds_: | |||
There was a problem hiding this comment.
Slight preference for "Delivery" over "Channels", but @scothis may have sharper opinions than I.
There was a problem hiding this comment.
I am just basing this on the k8s grouping currently being used in the CRDs
|
|
||
| The primary resources in the Knative Eventing _Feeds_ API are EventSource, EventType and Bind: | ||
|
|
||
| * An **EventSource** wraps an event producer and is able to produce multiple definitions of |
There was a problem hiding this comment.
Slight preference for standardizing on terms in the Eventing Glossary and/or in the CloudEvents spec. If the current names are terrible, propose new ones in the glossary as well as here.
There was a problem hiding this comment.
I am attempting to document what is implemented. I have tried to suggest changes to the glossary to bring it closer to what has been implemented.
|
|
||
| The primary resources in the Knative Eventing _Feeds_ API are EventSource, EventType and Bind: | ||
|
|
||
| * An **EventSource** wraps an event producer and is able to produce multiple definitions of |
There was a problem hiding this comment.
The end of this sentence got lost.
There was a problem hiding this comment.
I was following the serving/docs/spec overview where they string the definitions of each type into a paragraph flow...
|
|
||
| The primary resources in the Knative Eventing _Feeds_ API are EventSource, EventType and Bind: | ||
|
|
||
| * An **EventSource** wraps an event producer and is able to produce multiple definitions of |
There was a problem hiding this comment.
Thoughts on calling this just a "Source"?
There was a problem hiding this comment.
EventSource.feeds.knative.dev vs Source.feeds.knative.dev
hmm... I do like that EventType matches, because these are tied together.
EventType.feeds.knative.dev
But type is a reserved word in golang.
Cloudevents uses eventType and source. so... I am in favor of changing to Source.
|
|
||
| * An **EventSource** wraps an event producer and is able to produce multiple definitions of | ||
|
|
||
| * **EventType**, which describes the schema for the shape of the event and Subscription. |
|
|
||
| The primary resources in the Knative Eventing _Channels_ API are Channel, Subscription and Bus: | ||
|
|
||
| * A **Channel** is a logical endpoint to allow events to flow into a |
There was a problem hiding this comment.
I'd prefer to see this be a complete sentence. Bonus points if the object reference graph is acyclic, but that may not be possible.
There was a problem hiding this comment.
I think it would be more clear as real sentences too. Let me just rework it and not try to copy the style of serving.
n3wscott
left a comment
There was a problem hiding this comment.
I moved over the glossary terms here, I think it needs more work and reading the glossary showed me that there might be some concepts that are not backed by a CR directly, but are properties in those CRs.
| workloads. | ||
|
|
||
| Kubernetes has no primitives related to event processing, yet this is an | ||
| essential component in serverless workloads. Eventing will introduce high-level |
There was a problem hiding this comment.
I don't have a citation... hm
| # Motivation | ||
|
|
||
| The goal of the Knative Eventing project is to provide a common toolkit and API | ||
| framework for producing and consuming events, primarily inside of serverless |
There was a problem hiding this comment.
ok, linked and reworded. Left off the serverless aspect.
| @@ -0,0 +1,61 @@ | |||
| # Resource Groups | |||
|
|
|||
| Knative Eventing API is grouped into _Channels_ and _Feeds_: | |||
There was a problem hiding this comment.
I am just basing this on the k8s grouping currently being used in the CRDs
|
|
||
| The primary resources in the Knative Eventing _Feeds_ API are EventSource, EventType and Bind: | ||
|
|
||
| * An **EventSource** wraps an event producer and is able to produce multiple definitions of |
There was a problem hiding this comment.
I was following the serving/docs/spec overview where they string the definitions of each type into a paragraph flow...
|
|
||
| The primary resources in the Knative Eventing _Feeds_ API are EventSource, EventType and Bind: | ||
|
|
||
| * An **EventSource** wraps an event producer and is able to produce multiple definitions of |
There was a problem hiding this comment.
I am attempting to document what is implemented. I have tried to suggest changes to the glossary to bring it closer to what has been implemented.
|
|
||
| The primary resources in the Knative Eventing _Feeds_ API are EventSource, EventType and Bind: | ||
|
|
||
| * An **EventSource** wraps an event producer and is able to produce multiple definitions of |
There was a problem hiding this comment.
EventSource.feeds.knative.dev vs Source.feeds.knative.dev
hmm... I do like that EventType matches, because these are tied together.
EventType.feeds.knative.dev
But type is a reserved word in golang.
Cloudevents uses eventType and source. so... I am in favor of changing to Source.
|
|
||
| The primary resources in the Knative Eventing _Channels_ API are Channel, Subscription and Bus: | ||
|
|
||
| * A **Channel** is a logical endpoint to allow events to flow into a |
There was a problem hiding this comment.
I think it would be more clear as real sentences too. Let me just rework it and not try to copy the style of serving.
evankanderson
left a comment
There was a problem hiding this comment.
At what point do you want to commit some part of this and leave the others with TODOs for a future PR?
We should also review this at an eventing WG at some point.
| # Motivation | ||
|
|
||
| Knative Eventing implements the common components for an event delivery | ||
| ecosystem. These common components enable producing and consuming events, |
There was a problem hiding this comment.
I don't think you need the commas here, assuming you're attempting to say "(producing and consuming) (events adhering to the CloudEvents Specification) in a decoupled way."
| integrate with existing message consumers. | ||
|
|
||
| The Knative Eventing APIs is intended to operate independently, and interop | ||
| well with the [Compute API](https://github.com/knative/serving) and [Build |
There was a problem hiding this comment.
Prefer "Serving API", since that's the package and repo name.
| primitives for event production and delivery with a focus on push over HTTP. If a | ||
| new event source or type is required of your application, the effort required | ||
| to plumb them into the existing eventing framework will be minimal and will | ||
| integrate with existing message consumers. |
There was a problem hiding this comment.
I think it's also worth calling out middleware as well as consumers.
You might want to say "CloudEvents" rather than "existing", because CloudEvents is still quite young.
| * **Subscription**, an expressed interest in events to be delivered to a | ||
| service. | ||
|
|
||
|  |
There was a problem hiding this comment.
This will be a broken image tag. Put it in comments?
|
|
||
| * **EventType**, the schema for an event. | ||
|
|
||
| * **Bind**, ties the output of an event producer to the input of an event |
There was a problem hiding this comment.
No comma here on Bind between subject and verb. If you want the same construction as above, try:
** Bind **, the association between the output ...
There was a problem hiding this comment.
I think the EventSource in many cases is not actually the source of the event. If you look at the Pub/Sub EventSource, the topics will most likely not be the sources. In the case of CloudEvents, the source attribute will contain something different. Pub/Sub is then the infrastructure propagating the events of potentially many different sources.
|
|
||
| # Eventing | ||
|
|
||
| TODO an overview of how these objects are created and perhaps the persona |
There was a problem hiding this comment.
TAL at https://www.draw.io/#G1EgWHszjc8tO-5hW6_yoFBrWDt4F9TJcn / https://drive.google.com/open?id=1EgWHszjc8tO-5hW6_yoFBrWDt4F9TJcn if you want a sample picture of things working together.
I'm trying to find a good format to actually check that image into a repo. Sadly, UML does not have quite the layout control needed. I may end up doing SVG/PNG + the draw.io XML, which would make me slightly sad.
|
|
||
| Kubernetes has no primitives related to event processing, yet this is an | ||
| essential component in serverless workloads. Eventing introduces high-level | ||
| primitives for event production and delivery with a focus on push over HTTP. If a |
There was a problem hiding this comment.
If we're going to emphasize HTTP here, perhaps we should qualify with a "currently". We hope to have gRPC support soon, and it might be the preferred approach for many use-cases since that would enable the use of streams.
|
|
||
| ## Channel | ||
|
|
||
| A named endpoint on a Bus which accepts events delivered from an outside system. |
There was a problem hiding this comment.
Currently Channels are only exposed as in-cluster Services. We have a PoC for a "gateway" (another naming conflict we'll have to resolve) that is exposed as an ingress, but in general, Channels may be used for app-to-app (or function-to-function) interacts within the cluster as well.
|
|
||
| ## Bus | ||
|
|
||
| A system which routes events from Channels to Actions. The Broker MAY (RFC |
There was a problem hiding this comment.
I would prefer "to subscribed Service endpoints" rather than "to Actions" here.
|
|
||
| * **Subscription**, an expressed interest in events to be delivered to a | ||
| service. | ||
|
|
There was a problem hiding this comment.
This definition of Subscription might cause confusion in combination with Bind.
There was a problem hiding this comment.
This is another reason I prefer "Feed" since that would then emphasize its role as the manifestation of events from a source, and if it simply has a target (k8s) Service, that could be a direct connection to a Knative workload via the Service created by its Route, or it could be the Service that corresponds to a Channel. Only when using a Channel would there be something to "subscribe" to.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: n3wscott If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
grantr
left a comment
There was a problem hiding this comment.
/lgtm
Thanks @n3wscott, would love to see this in the repo.
@markfisher @deissnerk I think your comments are resolved (hold if not). @evankanderson I'll let you approve when you're ready.
|
|
||
| # Resource Types | ||
|
|
||
| The primary resources in the Knative Eventing _Feeds_ API are EventSource, EventType and Bind: |
| to plumb them into the existing eventing framework will be minimal and will | ||
| integrate with CloudEvents middleware and message consumers. | ||
|
|
||
| The Knative Eventing APIs is intended to operate independently, and interop |
There was a problem hiding this comment.
Nit: APIs is should be changed to either API is or APIs are.
Is "intended to operate independently" an accurate description of the relationship between serving and eventing? My understanding is that the API definition and control plane are intended to be independent of serving, but the data plane (bus, channel, and feed implementations) have no such intent.
The serving/docs/spec dir is an awesome resource. Eventing should have one too.