Rethink the emission strategy
Created originally on Bitbucket by cdevienne (Christophe de Vienne)
Current status
The current emission strategy is to send all the ongoing envelopes in parallel, regardless to their destination. Also, it does not check if the destination actor is up before attempting to send.
Shortcomings
- A single actor that reconnects may receive way too many envelopes at once
- If many envelopes are being sent to unavailable actor(s), we have a bottleneck
- When a actor connects to receive a single fragment and disconnects, all the other emissions to this actor will timeout.
Ideas
- Limit the number of parallel emissions to a single actor.
- A slow emission (long running process/envelope) should allow other envelopes to pass in parallel.
- No send to unavailable actors
- An actor should signal its disconnection to avoid useless emission attempts