Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from xmtp/rich/change-nodes
1. Define a 'vector clock' type with clearly defined rules. 2. Allow a vector clock to be specified as the cursor, for clients that wish to change gateway nodes. Clients will be tracking this information regardless, and this allows us to avoid any heuristics such as a 'lookback period'. The client's first query to the node will specify a vector clock as the cursor, with subsequent queries free to fall back to using the gateway SID again. A consideration to be made here is whether we should dispense with gateway sids completely, and use the vector clock for all queries. What holds me back is whether we need to worry about the additional message size for queries, and whether the SQL query will be slower (it'll have one `OR originator_node_id = ... AND originator_sequence_id > ...` for each entry in the vector clock). Getting rid of gateway sids would simplify a lot though.
- Loading branch information