blossom_upload_queue_shim_for_ndk 0.4.1
blossom_upload_queue_shim_for_ndk: ^0.4.1 copied to clipboard
Offline-first wrapper around the ndk package's Blossom upload use case. Persists per-upload metadata to a sembast queue, reads blob bytes from a blossom_cache, and retries until every targeted server [...]
0.4.1 #
- Fix
int64overflow incomputeBackoffon native platforms (Android, iOS, Linux, macOS, Windows). After ~52 failed attempts (with the default 5s initial delay),pow(2, attempts)wrapped to a negative integer, causingdouble.clampto throwInvalid argument(s). The calculation now uses double arithmetic (pow(2.0, ...)) to avoid the overflow.
0.4.0 #
- Breaking (transitive on-disk): Bump
blossom_cacheto^0.3.0. The cache database schema is bumped to version 2, so any cache written byblossom_cache0.2.0 or earlier is dropped on first open after the upgrade. Queue records still in flight whose blob bytes lived only in the dropped cache will fail to retry. TheBlossomCacheAPI itself is unchanged, so no source changes are required in callers of this shim. IdbBlossomCache.open()now accepts achunkSizeparameter (default 1 MB) that fixes the AndroidCursorWindow~2 MB row limit for large blobs when backed by sqflite.
0.3.0 #
- Breaking: Bump
blossom_cacheto^0.2.0. The cache'sput()now takesbytespositionally withsha256as a named argument (cache.put(bytes, sha256: sha, type: 'image/png')instead ofcache.put(sha, bytes, type: 'image/png')). Callers that populate the cache themselves before scheduling an upload must update those call sites.
0.2.0 #
- Bump
ndkto^0.8.4-dev.1and forward the queue's sha256 tondk.blossom.uploadBlobvia the newprecomputedSha256parameter, so each retry skips re-hashing the blob bytes. - Breaking:
BlobUploadFngains arequired String precomputedSha256named parameter. Custom implementations passed via the default constructor must accept it.
0.1.0 #
- Initial release.
OfflineBlossomUploadshim aroundndk.blossom.uploadBlobwith sembast-backed queue metadata andblossom_cache-backed blob bytes.- 100% delivery guarantee: every targeted server must ack before a record is
marked delivered. Monotonic
ackedServersanddeliveredAt. upload()andreupload()withforcedServerssemantics matching the broadcast shim.- Cache pin ownership: the shim only releases pins it applied itself.
- Connectivity-aware retry loop via NDK relay connectivity as a proxy for
internet reachability, plus a generic
onlineSignalinjection point.