Thursday, September 04, 2014

Introducing Photodump

Photodump is an ultra-minimalist multiuser photo sharing application.  It's fast, it's free, and it doesn't require a sign up.

This is a quick hack on Firebase that I've been playing with.  There are a few interesting implementation details that you might find interesting:

Thumbnails are first-class objects, for lack of a better term.  When you upload a photo, Photodump will create a thumbnail on the client (using Canvas) and immediately sync that to the server.  All connected users will instantly see the thumbnail while the full-size image downloads in the background.

Firebase only deals in strings.  And, firebase isn't really very good at big strings.  In order to upload large images, I have to chunk them into 200k base64-encoded strings and upload one at a time.  It's ugly, but it works.

There are few features still in the works:  Notably, caching using IndexedDB (I had it working with LocalStorage, but the limit is 5MB, so that wasn't going to work), and better handling of upload and download events.

No comments: