Adding docs/spec shell (v2).#286
Conversation
|
[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 |
|
/assign @evankanderson |
| @@ -0,0 +1,32 @@ | |||
| // This is the overview graph for object refrences in the control plane. | |||
There was a problem hiding this comment.
This graph does not include Flows at all.
There was a problem hiding this comment.
I added a Flow, but flow is flexible so it is hard to represent in a single graph
|
|
||
| This directory contains the specification of the Knative Eventing API, which is | ||
| implemented in [`channels.knative.dev`](/pkg/apis/channels/v1alpha1) and | ||
| [`feeds.knative.dev`](/pkg/apis/feeds/v1alpha1) and verified via [the e2e |
There was a problem hiding this comment.
This doesn't mention Flows at all.
| @@ -0,0 +1,80 @@ | |||
| # Resource Groups | |||
There was a problem hiding this comment.
Feel free to steal from https://github.com/knative/docs/blob/master/eventing/README.md#architecture if it makes sense.
There was a problem hiding this comment.
I linked to it. That doc has the wrong abstraction. We did not abstract the bus, we abstracted the channel.
There was a problem hiding this comment.
Or we have the wrong API group names. I could be convinced either way.
| @@ -0,0 +1,80 @@ | |||
| # Resource Groups | |||
|
|
|||
| Knative Eventing API is grouped into _Channels_ and _Feeds_: | |||
|
|
||
| * _Feeds_ bridge the event source into the eventing framework. | ||
|
|
||
| * _Flows_ are the higher order abstractions for eventing that use _Channels_ |
There was a problem hiding this comment.
I'd prefer to talk about what Flows gives the user, rather than where it sits in relation to other objects.
There was a problem hiding this comment.
I am at a loss for the correct words for this
There was a problem hiding this comment.
the desired path from an external Source of events to a destination that will react to the events
?
There was a problem hiding this comment.
not strictly "external", e.g. the k8sevents EventSource
There was a problem hiding this comment.
I am trying: * _Flows_ abstract the path of an event from a source takes to reach an event consumer.
|
|
||
| ## EventType | ||
|
|
||
| TODO |
There was a problem hiding this comment.
Can we fill this out, with at least some justification?
There was a problem hiding this comment.
I have pointed it to the Architecture page from docs.
|
|
||
| # Eventing | ||
|
|
||
| TODO an overview of how these objects are created and perhaps the persona |
There was a problem hiding this comment.
Do we need this section in this doc? If so, it seems like the overview should be at the top rather than near the bottom. (I don't quite understand what should be in this section.)
|
|
||
| **Updates to this spec should include a corresponding change to the | ||
| API implementation for [channels](/pkg/apis/channels/v1alpha1) or | ||
| in [feeds](/pkg/apis/feeds/v1alpha1) and [the e2e test](/test/e2e).** |
There was a problem hiding this comment.
This may be the right place, but it seems like it would be useful to include a section on either "Known issues" with the API and/or patterns that we've agreed upon. In particular, the use of containers/images for extension of Buses and Sources is probably worth highlighting somewhere.
The Parameters/ParametersFrom pattern for passing args to the images is probably also worth documenting.
There was a problem hiding this comment.
I think that is a good TODO but I don't have the context to fully author those. I added a todo for you :D
n3wscott
left a comment
There was a problem hiding this comment.
Updated, PTAL. Thanks for the review!
|
|
||
| **Updates to this spec should include a corresponding change to the | ||
| API implementation for [channels](/pkg/apis/channels/v1alpha1) or | ||
| in [feeds](/pkg/apis/feeds/v1alpha1) and [the e2e test](/test/e2e).** |
There was a problem hiding this comment.
I think that is a good TODO but I don't have the context to fully author those. I added a todo for you :D
| @@ -0,0 +1,32 @@ | |||
| // This is the overview graph for object refrences in the control plane. | |||
There was a problem hiding this comment.
I added a Flow, but flow is flexible so it is hard to represent in a single graph
| @@ -0,0 +1,80 @@ | |||
| # Resource Groups | |||
There was a problem hiding this comment.
I linked to it. That doc has the wrong abstraction. We did not abstract the bus, we abstracted the channel.
|
|
||
| * _Feeds_ bridge the event source into the eventing framework. | ||
|
|
||
| * _Flows_ are the higher order abstractions for eventing that use _Channels_ |
There was a problem hiding this comment.
I am at a loss for the correct words for this
|
|
||
| ## EventType | ||
|
|
||
| TODO |
There was a problem hiding this comment.
I have pointed it to the Architecture page from docs.
evankanderson
left a comment
There was a problem hiding this comment.
A few more comments -- thanks for writing this up and pinging me about actually getting back to the review.
|
|
||
| * [Motivation and goals](motivation.md) | ||
| * [Resource type overview](overview.md) | ||
| <!-- * [Knative Eventing API spec](spec.md) --> |
| subgraph cluster_B { | ||
| Channel | ||
| Subscription; | ||
| label = "Bus"; |
There was a problem hiding this comment.
I'm not sure a "Bus" contains a Channel or Subscription in the same way that a Flow "contains" a Feed or Subscription. In the former case, the implementation of the Channel or Subscription is done by the Bus's controller, but in the latter case, the Flow literally describes the spec of the Feed and Subscription objects in some way. It feels more like a "Bus" is referenced by a Channel (and indirectly via Subscription).
There was a problem hiding this comment.
Updated the graph to have Channel point to Bus, but had to giveup a little formatting OCD because graphviz does what it wants sometimes.
| @@ -0,0 +1,17 @@ | |||
| # Motivation | |||
|
|
|||
| Knative Eventing implements the common components for an event delivery | |||
There was a problem hiding this comment.
I'd turn this around (this talks about what we did, not why):
The goal of Knative Eventing is to define common, composable primitives to enable late-binding event sources and event consumers.
[Why late-binding]
Alternately, you could steal the following principles:
- Services are loosely coupled during development and deployed independently on a variety of platforms (Kubernetes, VMs, SaaS or FaaS).
- A producer can generate events before a consumer is listening, and a consumer can express an interest in an event or class of events that is not yet being produced.
- Services can be connected to create new applications
a. without modifying producer or consumer.
b. with the ability to select a specific subset of events from a particular producer
From there, I think it's fine to reference CloudEvents and Kubernetes event-processing or lack thereof.
| The primary resources in the Knative Eventing _Feeds_ API are EventSource, | ||
| EventType and Feed: | ||
|
|
||
| * **EventSource**, an archetype of an event producer. |
There was a problem hiding this comment.
This doesn't seem entirely clear; maybe give an example, like github.com or storage.googleapis.com. It might also be worth mentioning whether alternate environments/implementations of the API are separate Sources or a parameter in the Feed. (e.g. do you have different EventSources for each AWS region, or is that a Feed status in some way?)
There was a problem hiding this comment.
I added an example to each. See if that helps.
|
|
||
| * **EventSource**, an archetype of an event producer. | ||
|
|
||
| * **EventType**, the schema for an event. |
There was a problem hiding this comment.
It's worth calling out that there may be multiple EventTypes for a single Source. Again, a worked example might be illuminating, even if it is aspirational rather than factual.
You might also want to say something about EventType implying some sort of more-specific schema for the payload (data) of the event.
There was a problem hiding this comment.
I think this should go into the spec part that is still TODO. This is suppose to be the overview.
| The primary resources in the Knative Eventing _Channels_ API are Channel, | ||
| Subscription and Bus: | ||
|
|
||
| * **Channel**, a named endpoint which accepts and forwards events. |
There was a problem hiding this comment.
Again, it might be useful to mention the cardinality here -- a Bus may support many Channels, and a Channel may support multiple Subscriptions.
There was a problem hiding this comment.
I think these are details of our choice of implementation?
There was a problem hiding this comment.
No, I think these are reasons for these to be different objects (like Pod, ReplicaSet, and Deployment).
|
|
||
| * **Channel**, a named endpoint which accepts and forwards events. | ||
|
|
||
| * **Bus**, an implementation of an event delivery mechanism. |
There was a problem hiding this comment.
I'd highlight that a Bus implements some sort of store-and-forward fanout strategy (whether that is Kafka, GCP PubSub, or in-memory).
There was a problem hiding this comment.
Again, I think these are details of our choice of implementation?
There was a problem hiding this comment.
I think the role of the Bus is to provide the store-and-forward delivery implementation. Some may do that more durably than others, but a Bus object describes a particular implementation strategy for the store and forward contract.
|
|
||
| * **Bus**, an implementation of an event delivery mechanism. | ||
|
|
||
| * **Subscription**, an expressed interest in events to be delivered to a |
There was a problem hiding this comment.
... events from a channel to be delivered to an HTTP endpoint. (Which might be a Knative service, or any other HTTP implementation.)
| * **Subscription**, an expressed interest in events to be delivered to a | ||
| service. | ||
|
|
||
| The primary resources in the Knative Eventing _Flows_ API are Flow: |
There was a problem hiding this comment.
"resource" (no "s")
It might make more sense to say this as The _Flows_ API implements a single resource, Flow:
|
|
||
| The primary resources in the Knative Eventing _Flows_ API are Flow: | ||
|
|
||
| * **Flow**, the connection between an event producer to the event consumer. |
There was a problem hiding this comment.
Can you express that this is a high-level intent which abstracts both Flow and Subscription (as well as most of the other resources)?
https://github.com/knative/serving/blob/master/docs/spec/overview.md#service may have some useful verbiage.
evankanderson
left a comment
There was a problem hiding this comment.
This is looking better, but I'm still concerned that the object model doesn't clearly justify the choices and objects.
Thanks for starting this; I'm happy to add the remaining docs over time, but would like the initial object model to explain the decomposition of work and value added.
/approve
|
|
||
| * **Channel**, a named endpoint which accepts and forwards events. | ||
|
|
||
| * **Bus**, an implementation of an event delivery mechanism. |
There was a problem hiding this comment.
I think the role of the Bus is to provide the store-and-forward delivery implementation. Some may do that more durably than others, but a Bus object describes a particular implementation strategy for the store and forward contract.
| * **Subscription**, an expressed interest in events from a _Channel_ to be | ||
| delivered to an HTTP endpoint. | ||
|
|
||
| An example _Channels_ setup: A _Channel_ has declared it is implemented by a |
There was a problem hiding this comment.
I feel like the example here doesn't elucidate much. I'd rather see something like "cluster bus X is implemented via NATS, and has 2 channels: 'pulls' and 'analysis'. 'pulls' has one subscription, and 'analysis' has none at the moment.
| the event consumer leveraging _Feed_s and _Channels_. | ||
|
|
||
|
|
||
| An example _Flows_ setup: The _Flow_ describes the same properties as the _Feed_ |
There was a problem hiding this comment.
Maybe it would be better to give an example of buffering the GitHub notifications if the target is not up yet (to contrast with Feed, which would not).
|  | ||
|
|
||
| See the [Knative Eventing Docs | ||
| Architecture](https://github.com/knative/docs/blob/master/eventing/README.md#architecture) |
There was a problem hiding this comment.
What does "architecture" mean as a modifier to docs?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: evankanderson, n3wscott 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 for lgtm? |
|
/lgtm |
replaces #147