Title: DISCUSSION: abstractions of service calls in storage · Issue #545 · googleapis/google-cloud-python · GitHub
Open Graph Title: DISCUSSION: abstractions of service calls in storage · Issue #545 · googleapis/google-cloud-python
X Title: DISCUSSION: abstractions of service calls in storage · Issue #545 · googleapis/google-cloud-python
Description: 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 st...
Open Graph Description: 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 wi...
X Description: 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 wi...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/545
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DISCUSSION: abstractions of service calls in storage","articleBody":"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](https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/gcloud/storage/acl.py#L125)), others interact with the service (e.g. [acl.save](https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/gcloud/storage/acl.py#L414)), while still others interact only some of the time (e.g. [bucket.default_object_acl](https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/gcloud/storage/bucket.py#L124)).\nIf 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. \nA 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? \n\nThis abstraction is especially dangerous because it works very well when a single client is involved but creates subtle problems when deployed at scale.\n\n/cc @thobrla \n","author":{"url":"https://github.com/silvolu","@type":"Person","name":"silvolu"},"datePublished":"2015-01-14T19:21:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/545/google-cloud-python/issues/545"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:67fe2d5d-ea79-1992-f81e-835a9233ce02 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B342:11FDDC:B1EBD2:1047A5E:6A4E21C8 |
| html-safe-nonce | ac30e6e3fe875c90014733794575f023fe670794911ed7ca60f006e6d4e165e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzQyOjExRkREQzpCMUVCRDI6MTA0N0E1RTo2QTRFMjFDOCIsInZpc2l0b3JfaWQiOiI0NTE1OTU2ODI0NDYxODkwMDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e3cab46a8c7413ff4bb5ff017eed51ea6c55af9fb878a7bf4d57ad7343fa8bee |
| hovercard-subject-tag | issue:54364106 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/545/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7a3d72c2d34de180e576184b91331597c8a6e101aee2d1eab449d746863fe0f4/googleapis/google-cloud-python/issues/545 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7a3d72c2d34de180e576184b91331597c8a6e101aee2d1eab449d746863fe0f4/googleapis/google-cloud-python/issues/545 |
| og:image:alt | 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 wi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | silvolu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5fe497b4815fcce3df76c0e246faa739a82c3124 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width