3 ms·
Replay with side/external-effects is problematic, but it seems like you just need futures to handle this. Each event that triggers external effects is bound to
by naasking 9y ago
Replay with side/external-effects is problematic, but it seems like you just need futures to handle this.
Each event that triggers external effects is bound to a future identifier. The replay actor then accumulates a map of these events. When encountering an event that represents resolving a future, that future is removed from the map. At the end of the replay, you're left with the list of futures that haven't been resolved.
At this point, you can trigger the side-effecting computation to try and resolve the futures.