spinframework / spinframework/spin

PolyGlot- Enable capability to write external triggers in C# and .NET core and many other languages -New features

Open
#910 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement open for comment
Dominant language
Rust
Stars
6.5k
Forks
310
Avg merge
1d 20h
Merged PRs (30d)
24

Description

Hi,

This feature is for allowing to create triggers in other languages like C# or Java. As of today, I see the triggers can all be built only using the RUST language. I also understand that Triggers can be any microservice. The one reason why only RUST can be used is that the triggers are doing a call-back to the Spin code that is RUST. I saw the code in main. rs. Though I'm not good at Rust I see the callback module loader and engine of the SPIN.

f that understanding is correct then additional thing needs to be done. Apart from exposing the engine and modules as an API, Is it also possible to provide a gRPC endpoint of the spin execution engine? The external polyglot language triggers can be clients of the Spin engine. Once the trigger starts running the first request will register itself as a client along with the wasm module that the spin SDK needs to invoke when triggering conditions are met. When a triggering condition occurs say a modification in the database or packet in the queue, we can invoke the gRPC endpoint called to execute with the instance id as a parameter and the record or message packet as another parameter.

There are similar components like DAPR or KEDA engines that are allowing external calling using gRPC. For Dapr this is still in the experimental stage.

If for some reason you decide the gRPC is not good candidate(though my personal preference will be gRPC) you can also look into RSockets

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/spin-timer/src/main.rs and the callback module loader and execution engine referenced in the issue. Review how Dapr and KEDA expose external calls, then clarify the supported polyglot trigger model and whether gRPC or RSockets is appropriate. Done requires an agreed design for registering external triggers and invoking the Spin engine.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, grpc, java, rust, wasm
Domain
api, backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.