danthegoodman1 / UltraQueue

Distributed pull queue based on Segment's Centrifuge. Zero dependency p2p clustering.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Switch btree to tidwall/btree #17

Open danthegoodman1 opened 2 years ago

danthegoodman1 commented 2 years ago

https://github.com/tidwall/btree Has generics support, key value based rather than item compare based (so we don't have to ascend before trying to delete)

danthegoodman1 commented 2 years ago

Specifically the .Map version with key and value separates. The key is the Task ID and the value is the Task itself, we can remove the InTreeTask struct because of this.

danthegoodman1 commented 2 years ago

Maybe https://github.com/tidwall/tinybtree since it seems to perform more evently between insert and delete