googleforgames / open-saves

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

New message to be able to commit chunks and update the record's properties simultaneously #401

Closed ghost closed 1 year ago

ghost commented 1 year ago

Is your feature request related to a problem? Please describe. Too many writes on entities when committing chunks since we need to commit the upload and at the same time modify the record.

Describe the solution you'd like At the end of uploading chunks, our gRPC client is using two messages: CommitChunk and UpdateRecord. The first function modify both the blob and record entities, and the second, the record entities. We suspect that this generates too many writes on entities. We would like a function that combines these operations.

Describe alternatives you've considered Alternatives: perform the second calls asynchronously with a delay in a goroutine or by managing a queue of updates to perform. But I do not like the idea of introducing potential data inconsistency in our solution.

Additional context