google maps api 3 - Possible to get image from Amazon S3 but create it if it doesn't exist -


i'm not sure how word question here looking do.

i have site uses custom map tile overlays on google map.

the javascript calls php file on server checks see if existing map tile exists given x, y, , zoom level.

if if exists, displays image using file_get_contents.

if doesn't exist, creates new tile displays it.

i utilize amazon s3 store , serve images since there end being lot of them , server slow. if have script check see if image exists on amazon , display it, guessing not getting benefits of speed , amazons cdn. there way this?

or there way try , pull file amazon first set on amazon redirect script if files no there?

maybe host script on of amazons services? tile generation quite slow in cases.

thanks

ideas:

1 - use cloudfront, point cluster of tile generation machines. way, can generate tiles on demand, , future requests served right cloudfront.

2 - use cloudfront, with s3 store of generated tiles. turn on logging s3 bucket, can detect failed requests. consume logs on schedule, , generate missing tiles. results in cheaper way of generating tiles, means when tile fails user get's nothing.

3 - pre-generate tiles. throw tasks in sqs queue, spin collection of ec2 instances generate tiles. cost front, users fast experience.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -