fission / fission-workflows

Workflows for Fission: Fast, reliable and lightweight function composition for serverless functions
Apache License 2.0
371 stars 42 forks source link

Deduplicate dynamic workflows internally #120

Closed erwinvaneyk closed 5 years ago

erwinvaneyk commented 6 years ago

Currently, dynamic workflows are created with a unique identifier. This means that every dynamic workflow invocation gets a new workflow, which can lead to (performance) issues if there is a workflow creating many (duplicate) dynamic workflows. This change fixes this by forcing the id of these dynamic workflows to be equal to the hash of the workflow specification. It then checks if there isn't yet a workflow with the hash in the event store. If so, it is a duplicate, and no new workflow is created - instead the id of the existing workflow is returned.

soamvasani commented 6 years ago

Moving to a later milestone, doesn't seem urgent.

erwinvaneyk commented 5 years ago

Closing this since it is old and needs heavy refactoring if worked in the future - keeping the branch around for future referencing.