spinframework / spinframework/spin
Feature: CloudEvents component
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
Enabling CloudEvents component could make spin a great solution to serverless and event-driven applications. I am thinking about an event trigger that subscribes to a addressible broker, and whenever the broker emits an event, the event trigger will instantiate a wasm module to hanlde. Or the trigger itself can emits an event.
For example the trigger can subscribe to a knative event source.
I am proposing the following component sdk. Let me know your thoughts. @radu-matei
use anyhow::Result;
use spin_sdk::{
event::{Event},
event_component,
};
/// A simple Spin event component.
#[event_component]
fn trigger(event: Event) -> Result<()> {
println!("{}", event);
Ok(())
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the CloudEvents proposal, the Knative event source example, and the proposed Rust component SDK in the issue. Define the event trigger and broker behavior before identifying implementation and validation work; done means the scope and event-component interface are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100