Skip to main content

Module post_bundle_cache_uploader

Module post_bundle_cache_uploader 

Source
Expand description

§Fire-and-forget cache replication

After a successful post or feedback submission, the server returns a set of CachePostBundle[Feedback]Token values that authorise the client to forward the freshly-written bundle to other servers for caching. This module spawns those forwards as background tasks so the original submission can return to the user without blocking on network propagation.

Bundles that already carry the remote server as an originator are filtered out — there’s no point re-uploading data to a server we already know holds it.

Functions§

upload_post_bundle_caches
Fire-and-forget: for each token, uploads all collected bundles whose originator is not already cached at the token’s server.
upload_post_bundle_feedback_caches
Fire-and-forget: uploads the single combined-best feedback to every token’s server.