Group functions #295
Description
Group function is an umbrella term for a function which is not backed by an infrastructure function (like AWS Lambda) but by other functions registered in the EG. It enables building complicated workflows but also canary deployments and A/B tests.
Group function has id
, type
and a list of backing functions (IDs of functions already registered in the EG). Group function doesn't have provider
property.
Group function is just another type of function which means that they can be used for creating async subscriptions or HTTP subscriptions.
Example configuration object:
{
functionId: "getUser"
group: {
type: "weighted"
functions: [{
functionId: "getUserV1"
weight: 9
}, {
functionId: "getUserV2"
weight: 1
}]
}
}
Group Function Types
weighted
Described in separate issue: #213
multiregion
Described in separate issue: #216
parallel
Invoke backing functions in parallel and return results from all of them.
waterfall
Invoke backing function in series, each passing their results to the next in the array.