2019-06-18 00:05:33 UTC - Roberto Diaz: Hi I have a quick question, what are the differences between conductor actions and composer? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560816333002300 ---- 2019-06-18 00:07:17 UTC - Roberto Diaz: they seem quite similar, I think that there is something related with the cost that makes composer cheaper than conductor but apart from that are there any other difference? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560816437003700 ---- 2019-06-18 00:33:42 UTC - Rodric Rabbah: @Olivier Tardieu ^^ https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560818022004300 ---- 2019-06-18 01:06:11 UTC - Olivier Tardieu: Composer synthesizes conductor actions so the performance of the two is basically the same. Composer is about ease of use. Composer makes it possible to write code that is very much like a typical imperative programs with conditionals, loops, structured exceptions. On the other hand, a conductor action is a more primitive action that gets invoked over and over again. It is the responsibility of the programmer of the conductor action to make it do different things over time, by directly managing the _control state_ of the conductor action. https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560819971008800 ---- 2019-06-18 01:06:58 UTC - Olivier Tardieu: see eg the example in the documentation (<https://github.com/apache/incubator-openwhisk/blob/master/docs/conductors.md>) https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560820018009400 ---- 2019-06-18 01:07:10 UTC - Olivier Tardieu: the conductor action code: https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560820030009700 ---- 2019-06-18 01:07:15 UTC - Olivier Tardieu: ```function main(params) { let step = params.$step || 0 delete params.$step switch (step) { case 0: return { action: 'triple', params, state: { $step: 1 } } case 1: return { action: 'increment', params, state: { $step: 2 } } case 2: return { params } } } ``` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560820035009900 ---- 2019-06-18 01:07:55 UTC - Olivier Tardieu: can be obtained using composer with code https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560820075010700 ---- 2019-06-18 01:08:07 UTC - Olivier Tardieu: ``` composer.seq('triple', 'increment') ``` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560820087011100 ---- 2019-06-18 01:08:13 UTC - Olivier Tardieu: much simpler… https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560820093011300 ---- 2019-06-18 01:10:20 UTC - Rodric Rabbah: In terms of cost, the activation record associated with a composition is treated the same as a sequence wrt billing (namely duration and max memory footprint). https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560820220012900 ---- 2019-06-18 01:11:10 UTC - Rodric Rabbah: Unrelated conductor activations would not get the benefit of a single activation record so they each be billed separately to the nearest quanta. https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560820270014000 ---- 2019-06-18 06:47:23 UTC - Roberto Diaz: Very clear explanation thanks guys!! https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1560840443014800 ----