Using Amazon S3 to serve JAD files for BlackBerry OTA distribution

Apr 4, 2010 by

If you don’t want the preamble of why I wanted to serve JAD files from Amazon S3, skip to the second paragraph.

I have recently came across the need to push OTA update of the DailyHoroscope application for BlackBerry. I conjectured that OTA updates have different behavior and thus different impact on the web server. There are still many people using their smartphones in general and BlackBerries in particular over the slower EDGE connections as opposed to 3G, not to mention 4G and/or WiMax. So to download 300K file over EDGE connection in the real usage example can take anywhere between 10 seconds to couple minutes. All this time the webserver’s thread serving this specific client will remain running. So it seems like you (or rather your server) can be in a nasty situation when 1000 users simultaneously or almost simultaneously decide to do the OTA update. Also quick calculation with Amazon WS calculator shows that serving files from S3 would be rather cheap even comparing to renting a cheap VPS for that purpose. My estimate was that the whole upgrade process (considering the fact that almost all the users update from S3) will cost me about $15. And this is independent of the time span. For $15 you could get a very cheap VPS for one month (if you are lucky). So it seemed like a no brainer. It indeed was until I faced a few problems with setting this up which I will cover here so that you don’t have to spend much time looking for solutions if you want to do the same.

Setting up S3 is a breeze. Using it – not so much. It is just like any other service pretty much – when you want to sign up and call sales you are answered immediately but if you have a problem and need customer service, well, you can be on hold quite a while. If you have Amazon account already set up, you can use this account. You will have the option to opt for the payment to any of the payment options (now it seems that this is only credit cards) already on file with Amazon or you could add a new credit card so that your S3 bill is billed separately.

read more