Skip to content

feat(sdk): Add content delivery layer buffer configurations - #3305

Merged
juslesan merged 15 commits into
mainfrom
add-buffer-configurations-required-by-streamr-tv
Dec 17, 2025
Merged

juslesan merged 15 commits into
mainfrom
add-buffer-configurations-required-by-streamr-tv

Conversation

@juslesan

@juslesan juslesan commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

Background

There are two different buffers related to this PR. The propagation buffer and connection buffers. The propagation buffer is used when a node is broadcasting data but does not have neighbors to send the data to. The connection buffer is used when a new connection is formed in the network.

Summary

We can now configure these two options for the content delivery layer:

  • streamPartitionMaxPropagationBufferSize can be used to set the size of the propagation buffer.
  • contentDeliveryBufferWhileConnecting can be used to stop buffering while a connection is being formed.

Related changes

  • renamed doNotBufferWhileConnecting to bufferWhileConnecting in the trackerless-network and dht packages.

Example use case

In a case where a publisher joins the network before subscribers the publisher stores the data to a buffer as it cannot send it to anyone. When a subscriber joins the content of the buffer is sent to the subscriber first and after that the real-time data is sent. If we don't want that the buffer content is sent then we can use set streamPartitionMaxBufferSize to 0 to avoid propagation buffering.

Additionally if the opening of connections takes long it is possible to disable buffering on connecting connections to avoid sending of old messages by setting the contentDeliveryBufferWhileConnecting as false.

@juslesan
juslesan requested a review from teogeb December 17, 2025 10:57
@github-actions github-actions Bot added the sdk label Dec 17, 2025
@juslesan juslesan changed the title feat(sdk): Add buffer configurations required by StreamrTV to the SDK feat(sdk): Add content delivery layer buffer configurations Dec 17, 2025
@github-actions github-actions Bot added network Related to Network Package dht Related to DHT package labels Dec 17, 2025
Base automatically changed from NET-1661-bypass-contracts to main December 17, 2025 13:40
@github-actions github-actions Bot added the docs label Dec 17, 2025
@juslesan
juslesan merged commit 2de7f48 into main Dec 17, 2025
42 of 43 checks passed
@juslesan
juslesan deleted the add-buffer-configurations-required-by-streamr-tv branch December 17, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dht Related to DHT package docs network Related to Network Package sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants