grrowl/redux-scuttlebutt

Replay scuttlebutt updates from orderedHistory

Closed this issue · 1 comments

Basically, the Dispatcher's this._updates stores raw scuttlebutt updates in the form [action, timestamp, source]. orderedHistory stores updates in the form [action, timestamp, source, snapshot].

  • The major blocker is that orderedHistory's actions have the special meta keys @@scuttlebutt/TIMESTAMP and meta.@@scuttlebutt/SOURCE mixed in with them, which we do NOT want propagated over the network
    • We could change the scuttlebutt protocol to send these fully-formed objects, or
    • We could get orderedHistory itself to mix in these meta keys when it calls the reducer, but then:
    • We need a way to pass timestamp and history through to the orderedHistory reducer, which means...
    • We'd have to dispatch all actions as type @@scuttlebutt/DISPATCH of shape { payload, meta: { timestamp, source } } and have orderedHistory call the reducer with payload as the action

So, not impossible, but requires a certain amount of re-plumbing so I'll park this task for now.

This was fixed in 0.3.0