Support multi-input workers
Created originally on Bitbucket by cdevienne (Christophe de Vienne)
Several obstacles to this feature in the current implementation.
- Each input may be handled by a different instance of the same actor. Which is a problem in the general case. The solution is to change the actor msgbox subjects, so that only the first piece of the first envelope is sent to a default handler, and all the remaining fragments of this envelope and all the remaining envelopes (on the other inputs) are sent to a dedicated context-based namespace.
- The state engine may not handle well the multi-input cases (needs some digging).
- The EnvelopeReceiver api is mono-envelope, and the envelope handler should be able to receive all the envelopes in a single api. A new context-based receiver api, wrapping EnvelopeReceiver, should replace it in the EnvelopeHandler callbacks.
- The "ProcessingEnd" api is envelope-based, which is wrong when multiple inputs of a node are activated in a process, because each input may receive a different envelope. The context should be the only key to this API, and a wrapping function should be provided by the new receiving api (see above)
So far I think solving those problems should allow coding multi-inputs workers.