WIP: K2V PollRange (old proposal, abandonned) #467

Closed
lx wants to merge 3 commits from k2v-watch-range into main
Owner

This PR is the first proposal of an implementation of PollRange for K2V.

The hard part with implementing this new endpoint is that we need to define a "seen marker" type, which is compact enough but yet transmits enough information so that items that have already been seen will not be retransmitted upon further PollRange call, but most importantly, that items will never be missed, which could happen for example if they arrive out of order at the various storage nodes (because we do not have something like causal-order delivery).

In this first proposal, we wanted to emulate causal order delivery by having a history table where nodes store all the operations they do in order, so that we can define the possible results of PollRange as prefixes of this operation sequence, and thus the seen marker is just an integer per node (the most compact thing that can be done). The downside is that the entire history has to be stored and managed (transmitted between nodes; garbage collected after some time), which makes this solution very inefficient in the case of frequent K2V inserts.

This proposal is mostly abandonned in favor of the version 2, which reports the cost on the caller of PollRange with a bigger "seen marker" type, but no further storage complexity on the server side (except making k2v timestamps globally increasing on each node).

  • Update Rust toolchain to 1.65.0 to make (modest) use of GATs
  • K2V History table
    • Change structure to be based on K2VItem
  • Update K2V insertion procedure to also write history entries
  • Range subscriptions
  • Poll range RPC
  • Poll range API endpoint
    • Spec
    • Impl
This PR is the first proposal of an implementation of PollRange for K2V. The hard part with implementing this new endpoint is that we need to define a "seen marker" type, which is compact enough but yet transmits enough information so that items that have already been seen will not be retransmitted upon further PollRange call, but most importantly, that items **will never be missed**, which could happen for example if they arrive out of order at the various storage nodes (because we do not have something like causal-order delivery). In this first proposal, we wanted to emulate causal order delivery by having a history table where nodes store all the operations they do in order, so that we can define the possible results of PollRange as prefixes of this operation sequence, and thus the seen marker is just an integer per node (the most compact thing that can be done). The downside is that the entire history has to be stored and managed (transmitted between nodes; garbage collected after some time), which makes this solution very inefficient in the case of frequent K2V inserts. This proposal is mostly abandonned in favor of the version 2, which reports the cost on the caller of PollRange with a bigger "seen marker" type, but no further storage complexity on the server side (except making k2v timestamps globally increasing on each node). - [x] Update Rust toolchain to 1.65.0 to make (modest) use of GATs - [x] K2V History table - [ ] Change structure to be based on `K2VItem` - [x] Update K2V insertion procedure to also write history entries - [x] Range subscriptions - [ ] Poll range RPC - [ ] Poll range API endpoint - [ ] Spec - [ ] Impl
lx added 1 commit 2023-01-05 12:12:32 +00:00
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/pr Build is failing Details
49b5d18554
K2V history and preparation for range watch
lx force-pushed k2v-watch-range from 7a23def61f to b337895fce 2023-01-09 12:21:48 +00:00 Compare
lx force-pushed k2v-watch-range from 96232d5ff9 to 32715d462e 2023-01-09 14:00:06 +00:00 Compare
lx closed this pull request 2023-01-11 10:20:47 +00:00
lx changed title from WIP: K2V PollRange to WIP: K2V PollRange (old proposal, abandonned) 2023-01-11 10:20:56 +00:00
Some checks reported errors
continuous-integration/drone/pr Build is failing
Required
Details
continuous-integration/drone/push Build was killed

Pull request closed

Sign in to join this conversation.
No description provided.