Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sumtree]: High level sumtree spec #46

Closed
Tracked by #44
AlpinYukseloglu opened this issue Feb 26, 2024 · 1 comment
Closed
Tracked by #44

[Sumtree]: High level sumtree spec #46

AlpinYukseloglu opened this issue Feb 26, 2024 · 1 comment

Comments

@AlpinYukseloglu
Copy link
Collaborator

Background

For our purposes, a sumtree will be a BST where each internal node stores the sum of its nodes and the leaves store the actual data (which in our case will be cancelled orders for a given tick).

Suggested Design

  • It would likely be most appropriate to implement this as an augmented B+ tree with an additional prefix sum query and custom insertion and deletion logic that allows this query to be maintained as correct (e.g. updates necessary internal nodes along the way to insertions/deletions)

Acceptance Criteria

  • Implementation-level sumtree spec is converged on
@AlpinYukseloglu
Copy link
Collaborator Author

AlpinYukseloglu commented Mar 15, 2024

I think analogizing with B+ trees/other binary tree constructions was not helpful given how unique our sumtree structure is with the whole internal range tracking. We essentially manually worked out insertion/deletion logic in #56 and #59 but it will probably make most sense to write this spec from first principles #60.

Will close this issue for now since the high level spec is already ready (see here), understanding that we still need a full implementation level spec that granularly covers all flows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant