Skip to main content

Bootstrap Amazon Ion into existing projects

Project description

machinery

State-aware workflow orchestrator.

This project aims to bring stateful workflows, by defining a list of actions representing multiple microservices.

Define a suite of actions to process events, abstract intelligence for your microservices.

Once defined, use your workflows to process your Events.

Example

We have 3 microservices:

  • The upper microservice that transforms texts into uppercase
  • The reverse microservice that reverses a text
  • The space-counter microservice that returns the number of space in a string

Suppose we want to process some text by making it uppercase and reversing it.

We will define the following definitions:

Then, we can define a Workflow in examples/definitions/workflow-process-text.json.

After having created our Workflow, we can send our first Event !

We will send the content of examples/definitions/event-text.json

Goals

  • Register services (ex: a new API)
  • Define a simple Workflow (subsequent calls to different services)
  • Allow async (expose endpoint for webhook?)
  • Visualisation

Components

API (WIP)

Could be divided into Consumer API and Management API.

  • Register services
  • Define Workflows (json with arbitrary service definition)
  • Treat Event

Data structures

Service

{
    "name": "my-service-name",
    "address": "http://my-service:5000/",
    "spec": {
        "inputs": {
            "message": {
                "type": "string",
                "description": "The text to transform"
            }
        },
        "outputs": {
            "message": {
                "type": "string",
                "description": "The transformed text"
            }
        }
    }
}

input:

  • name: The name of the Service
  • address: The URL of the Service
  • spec: The inputs/outputs of this Service
  • spec.inputs: Each input with its type and description
  • spec.outputs: Each output with its type and description

output: TBD (service-id, ack date)

Event

POST /e/<workflow-id>

{
    "data": {
        "message": "The Sun will rise in the morning !"
    }
}

POSTing an Event will return an event-id, an ack date and a status. input:

  • data: The Event's data that must match the Workflow's inputs.

Workflow

{
    "name": "my-workflow",
    "spec": {
        "services": ["service-1", "service-2"],
        "inputs": {
            "message": {
                "type": "string",
                "description": "The text to process"
            }
        },
        "outputs": {
            "message": {
                "type": "string",
                "description": "The processed text"
            }
        },
        "operations": { }
    }
}

input:

  • name: The name of the Workflow
  • spec: The spec of the Workflow
  • spec.services: The Services to be called, in order
  • spec.inputs: The inputs of this Workflow
  • spec.outputs: The outputs of this workflow

output: TBD (workflow-id, ack date)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

workflow-machinery-0.0.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

workflow_machinery-0.0.0-py2.py3-none-any.whl (2.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file workflow-machinery-0.0.0.tar.gz.

File metadata

  • Download URL: workflow-machinery-0.0.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for workflow-machinery-0.0.0.tar.gz
Algorithm Hash digest
SHA256 7ee32048849dc3d67f453e55173f1d1c2a7275beeff91931210ec054fe1075c0
MD5 05f3b6649a02ec2181c8a2741cf0a141
BLAKE2b-256 9eef46b6779597ec5fa009da082ea9f4e112d26748e2a44bbf9e6805df802c6f

See more details on using hashes here.

File details

Details for the file workflow_machinery-0.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: workflow_machinery-0.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for workflow_machinery-0.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 69cd30c446d78f18f9f8b21157b47376451f8a422fb93802a56ae670e3c1a3e7
MD5 5f447e0a7ce3c70538c139bf51320183
BLAKE2b-256 9864a24edf98dbd18b97f56001ff411d928acccc215efadeb1bf48d5133b8d69

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page