Skip to content

Replace dsqueue - #1266

Draft
gammazero wants to merge 5 commits into
masterfrom
replace-dsqueue
Draft

Replace dsqueue#1266
gammazero wants to merge 5 commits into
masterfrom
replace-dsqueue

Conversation

@gammazero

@gammazero gammazero commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Replace the provide queue use of go-dsqueue with cascadeq, in boxo and go-libp2p-kad-dht

The intended benefits are:

  • Overall efficiency (faster, less memory overhead)
  • Reliable performance regardless of datastore in use

The efficiency of go-dsqueue depends on the ability of the datastore in use to support ordered query responses without reading all queued items into memory to provide that ordering of queued item(s). With go-dsqueue is it also necessary to store additional ordering information with each queued item, taking up additional space.

Using cascadeq eliminates the need for a datastore implementation to efficiently return ordered query results as these are always stored in queue order when persisted to disk. Storage is also more efficient as there is no need to store additional ordering information with each item.

A potential downside to this PR is the case where is user wants all data written to S3, so an S3-backed datastore is used. In this case, cascadeq would not allow the user to write all data to S3, without some additional work.

kubo PR: ipfs/kubo#11404

boxo PR: ipfs/boxo#1194

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

Successfully merging this pull request may close these issues.

1 participant