googleforgames / open-saves

Open Saves is a cloud native data store for game development.
Apache License 2.0
219 stars 22 forks source link

Server should update Blob.Size #265

Open yuryu opened 3 years ago

yuryu commented 3 years ago

Currently the client needs to send the size of blob objects before transmission. This is a weird spec, and I think it should be handled by the server (like GCS doesn't require clients to send object sizes beforehand). It is trickier for chunked uploads, and in this case the server should put a sum of all "Ready" chunks.

yuryu commented 3 years ago

This is the current behavior for chunked uploads (once the PRs are merged). We still need to change the legacy blob behavior.

yuryu commented 2 years ago

There's a bit of a chicken-and-egg situation here. The server basically needs to decide where to store the blob, and it needs the size of the blob for the decision, but the size of the entire stream is unknown until you reach the EOF. I think we could do something like