Skip to content

.NET 5.0 runtime implementation supporting Serverless Workflow specification running on Kubernetes

License

Notifications You must be signed in to change notification settings

mkipcak/synapse

 
 

Repository files navigation

Synapse - Serverless Workflow Runtime

.NET 5.0 runtime implementation of the Serverless Workflow specification.

Overview

Features

  • Supports Serverless Workflow specification 0.6x
  • Runs on Kubernetes
  • No software dependencies (aside from Kubernetes)
  • A Command Line Interface, synctl, to quickly easily manage workflows and their instances

Usage

1. Download the Synapse CLI (synctl)

wget 

2. Install Synapse

synctl install -n synapse

3. Verify installation

kubectl get pods -n synapse

Sample output:

NAME                                READY   STATUS    RESTARTS   AGE
synapse-operator-7f9bdd899f-hd8s2   1/1     Running   0          106m

4. Create a new Serverless Workflow definition

#petStoreLogin.yaml
id: petStoreLogin
version: '1.0'
name: Pet Store Login
description: Logs in Swagger's Pet Store API
start: login
functions:
- name: petStoreLogin
  operation: https://petstore.swagger.io/v2/swagger.json#loginUser
states:
- name: login
  type: operation
  actions:
  - name: petStoreLogin
    functionRef:
      refName: petStoreLogin
      parameters:
        username: [email protected]
        password: FakePassword
    actionDataFilter:
      results: '${ { loginResult: .message } }'
  end: true

5. Deploy and run a new workflow instance

synctl run --file petStoreLogin.yaml --wait

Sample output:

Deploying workflow 'petStoreLogin:1.0'...
Workflow deployed.
Waiting for Synapse Operator feedback...
The Synapse Operator has finished processing the workflow:
Status: VALID
Errors: []
Workflow instance 'petstorelogin-q5b7z' has been executed.
Status: 'EXECUTED'
Output: {
  "loginResult": "logged in user session:1620126182003"
}

About

.NET 5.0 runtime implementation supporting Serverless Workflow specification running on Kubernetes

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.6%
  • Dockerfile 0.4%