Best solution / practice for temp files with Google App Engine PHP? -
what's accepted wisdom/tech solution temp files on gae using php, please?
i need store , process image (a few hundred k in size) using php momentarily (e.g. < 1 second) needs exist temp file somewhere before it's sent on elsewhere , temp file can deleted. site need autoscale potentially large numbers of users (using gae standard).
my idea attempt store temp file in memory (using tempnam() etc) , if failed (e.g. mem full on instance), try , use other storage instead on fly. question what? image has available file curl access (i think?) , send elsewhere, memcache not option (can't access data file pass curl - or can i?), e.g. cloud storage (via 'gs://[bucket-name]/...'). thing is, if i've written file storage, available reading? that's significant cost incurred...
any appreciated!
thanks, alex
gcs provides default application free bucket tied app well. there no quota bucket.
using default bucket
to use default bucket:
determine whether app has default bucket created:
- visiting app engine admin console , select app.
- select application settings in left navigation pane.
- if app has default bucket, application settings page contain label google cloud storage bucket, bucket name listed under it. default bucket name typically .appspot.com, application id.
if app doesn't have default bucket, create one:
- visit app engine admin console , select app.
- select application settings in left navigation pane , scroll bottom of page cloud integration
- click create , wait bucket created. bucket set , ready use.
Comments
Post a Comment