Momento Extendo

Recently I have been using an iPhone app called Momento. This is a diary app with a difference. As with any diary app, you can add diary entries complete with photos and tags. Momento also allows you to connect to web services such as Twitter, Facebook and to populate your diary with your online activity. You can also add RSS/Atom feeds to be included in your diary. Here are the feeds I have currently in Momento:

  1. Foursquare
  2. Instapaper: Unread
  3. Instapaper: Archive
  4. Twitter
  5. Loved Tracks
  6. Youtube
  7. Vimeo
  8. Delicious Bookmarks
  9. Quora: Followed Questions
  10. Librarything
  11. Github
  12. Assembla

I created Momento Extendo so I could use some more Twitter related feeds with Momento:

  1. Friendships
    Followed Friends
    Unfollowed Friends
  2. Lists
    New Lists
    Added List Members
    Removed List Members
    Added Subscribed Lists
    Unsubscribed Lists

I thought this would be a good opportunity to learn some Ruby an try hosting an app on Heroku. I choose Sinatra as the web framework because it was lightweight, easy to learn and took little to no time to get up and running. A couple of Heroku add-ons I used were Apigee for Twitter and Cloudant Hosted CouchDB. Apigee provide a proxied Twitter Api endpoint that gives you a whitelisted rate limit (20k reqs/hour). The free Cloudant hosted CouchDB solution offers 250 MB of storage with a hosted Futon admin.

The main purpose of the app is to regularly poll Twitter to detect changes in a user’s friends and lists in order to provide a feed of these changes which can be used with Momento. This polling is required because, at the moment, Twitter does not included timestamps with friendship-follow/unfollow or list activities. Initially, I thought about using Delayed Jobs to take care of the polling but this would involve using a background worker process for which Heroku charges for. As the app is going to have fairly low traffic and the single HTTP process or ‘Dyno’ can handle between 10 and 100 requests per second, I started looking for a solution that could ping the app periodically over HTTP.

I found Moment, a service that allows you to create a delayed job that makes an HTTP request at the time specified.


I use the Daily Cron Heroku add-on to remove any completed Moment jobs.

Heroku Add-Ons


Final Result

Some items from my Twitter Friendships feed in Momento:

Photo Feb 19, 22 59 51