I’m a PM at Google, working on the CLI and UI experience for GCP products built on Knative Eventing. The current system has a lot of granular objects that can be combined in very flexible ways. Unfortunately, this makes it quite difficult to create a user experience for some common cases. I think these considerations would apply to most vendors who are building products on top of Knative, so I’d like to get feedback from both the community and especially other vendors doing their own implementations.
I think there are two key developer scenarios that our product needs to support:
- [FaaS scenario] (Similar to: AWS Lambda and Google Cloud Functions) As a developer, I want to deliver from a managed cloud service, to a target Service (or Addressable). Managed cloud services are services like AWS S3, Google Cloud Storage, Pub/Sub, etc.
- [Event-Driven scenario] (Similar to: Kafka, Google Pub/Sub, AWS SNS, etc)
- As an event-producer developer, I want to define custom on-cluster events and send them to a central location.
- As an event-consumer developer, I want to consume these custom on-cluster events, without directly specifying the sender of the event (i.e., the Service generating the event).
The Event-Driven scenario is very easy to express in Knative Eventing. The FaaS scenario is easy as well, but only if you just use Importer directly.
NOTE: Here I am assuming there is value in having a single model for both scenarios (see @sixolet's comment below for options along with the pros and cons). This may not be a valid assumption.
A good UI and CLI for the FaaS experience would involve customers configuring an upstream sender and target Service in one logical step. Since we don’t currently have an object that does exactly this, I’ll use the placeholder name Storm.
Note: Trigger could be modified to have the properties we need in Storm. It just doesn’t have them today.
Storm could be implemented with a number of objects, but the key is that ideally, FaaS customers just think about Storm. If they list all Storms in a namespace, they should have a complete view of what is happening.
Unfortunately, the current model has the following issues:
- To create a Storm, you’d have to create an EventSource and a Trigger. Creation works, but after that there’s no clear way to list all Storms in the system. (Trigger could have all the fields that are currently in the EventSource, but then the developer would have to keep both in sync.)
- Suppose Alice instantiates an EventSource for
PubSub/awesome-topic (exposing event type AwesomeEvent) and a Trigger for AwesomeEvent -> Service1. Bob, not knowing the state of the cluster, also instantiates PubSub/awesome-topic and creates a Trigger for AwesomeEvent -> Service2. Now, Service1 and Service2 will get duplicate events.
Problem 1 makes it very hard to create a UI or CLI that lists all Storms in the system.
Problem 2 could even cause semantic issues if both EventSources publicize the same event type, without realizing that there are other subscribers.
I’m a PM at Google, working on the CLI and UI experience for GCP products built on Knative Eventing. The current system has a lot of granular objects that can be combined in very flexible ways. Unfortunately, this makes it quite difficult to create a user experience for some common cases. I think these considerations would apply to most vendors who are building products on top of Knative, so I’d like to get feedback from both the community and especially other vendors doing their own implementations.
I think there are two key developer scenarios that our product needs to support:
The Event-Driven scenario is very easy to express in Knative Eventing. The FaaS scenario is easy as well, but only if you just use Importer directly.
NOTE: Here I am assuming there is value in having a single model for both scenarios (see @sixolet's comment below for options along with the pros and cons). This may not be a valid assumption.
A good UI and CLI for the FaaS experience would involve customers configuring an upstream sender and target Service in one logical step. Since we don’t currently have an object that does exactly this, I’ll use the placeholder name Storm.
Note: Trigger could be modified to have the properties we need in Storm. It just doesn’t have them today.
Storm could be implemented with a number of objects, but the key is that ideally, FaaS customers just think about Storm. If they list all Storms in a namespace, they should have a complete view of what is happening.
Unfortunately, the current model has the following issues:
PubSub/awesome-topic(exposing event typeAwesomeEvent) and a Trigger forAwesomeEvent -> Service1. Bob, not knowing the state of the cluster, also instantiatesPubSub/awesome-topicand creates a Trigger forAwesomeEvent -> Service2. Now, Service1 and Service2 will get duplicate events.Problem 1 makes it very hard to create a UI or CLI that lists all Storms in the system.
Problem 2 could even cause semantic issues if both EventSources publicize the same event type, without realizing that there are other subscribers.