Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orchestrator Plugin Example #1536

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

suneetnangia
Copy link
Contributor

An approach to enable intra Spin (within same the Spin instance) guest modules orchestration using WIT contracts. It makes use of the plugin model extensibility Spin provides to build a domain specific orchestrator (a custom plugin). Domain specific plugin defines the WIT contracts as per the business domain for multiple guest (Wasm) modules, it will also host and move messages/data between these guest modules as per the domain logic.
Drawing some parallels here from code level and service level design patterns, intra Spin orchestration of modules can be considered as nano services which do not need to cross the boundary of network but still need to be composed together to form a business logic. By not involving network, we avoid the complex compensation logic (idempotency, circuit-breaking) in absence of transactions and serialisation-deserialization of messages. WIT contracts defined in the custom Plugin allows a contract driven development of guest modules in a polyglot manner.
These composed services may eventually then interact with other services (could be Spin based or otherwise) on the network using standard Spin SDKs e.g. Http.

[still in progress, will clean up a bit but I wanted to gather some initial thoughts on it]

@suneetnangia
Copy link
Contributor Author

Building on this, now considering adding export functions from WIT which can be used by components to make a service composition, this should reduce tight coupling between components in the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant