ahoy,

almost a fortnight ago i needed to {up,down}load images.

who would attend this wild and crazy party?

it wasn't obvious at first but it soon became clear.

rack, amazon's s3 and ec2, imagemagick, mysql and memcache.

the diagram at right exposes two entry points to the party.

where is HEAD you ask. it's there but you can't see it.

where is DELETE you ask. you can't see that as well.

==========================================

GET: /api/image/92/large/foo.jpg

===>: check the local disk. if not, go to s3.

===>: initial request caches to local disk.

===>: subsequent requests served from cache.

==========================================

POST: curl -ikv -X POST -F image=@foo.jpg /api/image/foo.jpg

===>: store original in s3 and on local disk.

===>: upon success update mysql and memcache metadata.

===>: generate thumbnails. store thumbnails in s3 and local disk.

==========================================

demo is coming to an ec2 instance near you. stay tuned.

TODO: upload progress reporting.

 me a message if would like to find out more.