goflow
goflow copied to clipboard
[GoFlow-4] Allow GoFlow workload to be completely independent to the flow
Currently Flow and Workload are tightly coupled as workload are defined inside of a flow definition This has a few drawbacks
- You can't scale only a specific workload
- Changing a workload will touch the whole flow definition
- Workload can't be shared across other flows
To solve this issue GoFlow will support a special kind of Operation called ApplyExternal()
like Apply()
It will take a unique ID of the workload that need to be called
Node('n2').ApplyExternal('task1')
To define a workload user need to use the GoFlow Library and Register a Workload using the unique ID
fs.Register('task1', PerformTask1)
fs.StartWorkload(['myflow']) // start workload will take the list of flows
Workload will have the same signature
func PerformTask1(data []byte, option map[string][]string) ([]byte, error) {
...
}
Hi, any updates on this feature?