Skip to content

DISCUSSION: abstractions of service calls in storage #545

@silvolu

Description

@silvolu

Generally speaking, the library functions seem to abstract when service interactions occur from the user. In other words, some operations are local to the object (e.g acl.grant), others interact with the service (e.g. acl.save), while still others interact only some of the time (e.g. bucket.default_object_acl).
If you're going to follow this model (and I'm not sure you should), I think you need to add preconditions to most service calls to ensure that confusing things don't happen.
A good example of this would be the save and reload functions in the ACL class. When should the user call reload()? I don't think it's clear. What happens when the user calls save() but the target ACL has changed on the service side since we last loaded it?

This abstraction is especially dangerous because it works very well when a single client is involved but creates subtle problems when deployed at scale.

/cc @thobrla

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions