Archives For Code

MoodApp.mobi is a product that helps companies track the pulse of their staff (or customers). Throughout 2013 as I developed MoodApp.mobi I used Heroku. As the product has recently seen a surge in traffic and usage I decided to reevaluate hosting options with two goals in mind:

  1. Performance
  2. Cost

After looking around I found Ninefold. They explain their performance and also have a free tier (just like Heroku):

How does the free tier work?

  1. Sign-up to Ninefold
  2. Deploy a Rails app
  3. Enter your billing details within 30 days
  4. They waive the first $50 of your monthly invoice – forever

So, MoodApp.mobi is getting more users, more concurrent traffic, and starting to cost more on Heroku. Hence the switch to Ninefold to see how it compares (find my performance analysis below).

Switch from Heroku to Ninefold

Once you have set up an account and deployed the latest revision of your app a migration is not too hard. Here are the steps:

  1. Put the Heroku app in maintenance mode
  2. Take a database dump from Heroku
  3. Import the database dump into Ninefold Postgres
  4. Change the CNAME to point to the Ninefold host

See the Ninefold migration guide for more information.

Ninefold Performance

The two most common actions on MoodApp.mobi according to analytics are the iPad voting page and the actual votes results page for a survey/location combo:

  1. 1s off the load time for the admin analytics page
  2. ~100ms off the iPad voting page load time
  3. ~200ms off the voting results page load time

All in all I’m happy with the performance improvement and the small monthly cost saving doesn’t hurt either – allows me to handle the additional traffic at the same monthly cost.

Gold!

 

Back in February last year I spoke at Startup Product Summit 2013. I’ve been remiss in not posting this sooner.

Some call this drinking your own champaign. At Atlassian we called it eating your own dogfood – trying the product, using the product, before sending that release out to the customers. Higher quality, empathy for the customer, all that great stuff.

Here it is…

This is annoying. On the T-Mobile website I could never get the PDF to display, download, or even get a print of the bill. BAH!

Workaround as below, for you (and for my future reference):

  1. Head to the Past Bills page
  2. Check the page resources and find the JSON response for pastbills (see below)
  3. Take the billStatementId of the bill you want and add it to this URL:

https://beta.my.t-mobile.com/apps/mytmobile/components/content/common/billing/pastbillsPdf?statementID=[INSERT STATEMENT ID HERE]&action=true

For an example of the JSON:

pastbills: “{“pastBills”:[{“fromDate”:”Oct. 19, 2013″,”billStatementId”:”4499720298″,”amountDue”:”95.08″,”toDate”:”Nov. 19, 2013″},{“fromDate”:”Sep. 19, 2013″,”billStatementId”:”4435309747″,”amountDue”:”99.03″,”toDate”:”Oct. 19, 2013″},{“fromDate”:”Aug. 19, 2013″,”billStatementId”:”4367402855″,”amountDue”:”98.02″,”toDate”:”Sep. 19, 2013″},{“fromDate”:”Jul. 19, 2013″,”billStatementId”:”4300649226″,”amountDue”:”103.98″,”toDate”:”Aug. 19, 2013″},{“fromDate”:”Jun. 19,

From all that you get the PDF, which you can then submit to Concur for your expense report. All a bit convoluted, eh? Life.