FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Add an in-memory and default implementation of detached blob storage

Open anthony-murphy opened this issue 1 year ago • 1 comments

Based on feedback from partners, the current story around blobs is overly complicated, and hard to work with. The existing detached blob storage interface is difficult to work with as it applies to the whole loader, and not a specific container, additionally it is decoupled from the serialization flow which make coordination difficult, lastly the need to supply detached blob storage when not using serialization is burdensome.

To address these issues, this change creates a default in memory detached blob storage which also support serialization and deserialization, so that detached, serialization and rehydration can be used in the presence of blobs without the need to pass a custom storage mechanism which doesn't align with our existing surface area.

For testing I've refactored our existing detached blob storage to support testing with both a custom detached blob storage specified, and an undefined detached blob storage which will result in using the new in memory storage. These test cover attaching, serializing, and deserializing with blobs.

anthony-murphy avatar May 17 '24 20:05 anthony-murphy

@fluid-example/bundle-size-tests: +2.67 KB
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 453.28 KB 453.28 KB No change
azureClient.js 550.75 KB 551.65 KB +924 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 256.97 KB 256.97 KB No change
fluidFramework.js 357.09 KB 357.09 KB No change
loader.js 132.91 KB 133.79 KB +893 Bytes
map.js 41.53 KB 41.53 KB No change
matrix.js 143.75 KB 143.75 KB No change
odspClient.js 519.28 KB 520.17 KB +921 Bytes
odspDriver.js 97.3 KB 97.3 KB No change
odspPrefetchSnapshot.js 42.16 KB 42.16 KB No change
sharedString.js 160.27 KB 160.27 KB No change
sharedTree.js 357.08 KB 357.08 KB No change
Total Size 3.19 MB 3.19 MB +2.67 KB

Baseline commit: 15de84cacaede86b6f032b4fd19ab163155392dc

Generated by :no_entry_sign: dangerJS against 87a09afd52dc05ae3aa474724f1f309f65fc0df1

msfluid-bot avatar May 17 '24 22:05 msfluid-bot