SergioLucas
SergioLucas

Reputation: 1104

What is the best implementation to delete objects when Google Cloud Storage eliminate the entity referenced in Google Cloud Datastore

Summary:

Note: After the user has deleted the GCD object, the GCS object is Inaccessible.

Question: What is the best implementation to delete the innacesible object.

Possible solution:

  1. Delete from mobile app: Using Storage API in APP to delete GCS object before using the GCE method to delete the GCD object
  2. Delete from GCE: Using Storage API in endpoint to delete GCS object before delete GCD object with ofy
  3. Not delete: Or maybe not delete because the cost of computation is higher than the storage.

Upvotes: 0

Views: 128

Answers (1)

Alex Martelli
Alex Martelli

Reputation: 881745

Problem with #3 is, the "cost of computation" is one-off... the "cost of storage" continues to be incurred as time goes by. No matter what the ratio may be to start, there has to be some time in the future when just keeping inaccessible bytes around becomes higher than getting rid of them ASAP.

I see little to choose between #1 and #2; personally, I'd use #2, because it "feels" architecturally "sounder" to have a single "delete this entity and all its appurtenances" method supplied by the GCE server -- the latter could better log such deletion events, with all needed info, for example.

Upvotes: 1

Related Questions