Uploaded image for project: '[Read Only] - Hippo GOGREEN'
  1. [Read Only] - Hippo GOGREEN
  2. GOGREEN-1050

GoGreen Twitter feed component should limit #requests and/or fetch tweets client-side

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • 3.07.00
    • 3.07.00
    • None

    Description

      Currently, the Twitter feed component fetches tweets server-side. Fetched tweets are cached for 15 seconds before they are updated on a user request thread, with a timeout of 2 seconds (both are configurable). This means that once every 15 seconds, a request to the site is slowed down by 2 seconds to update some feed that changes once a week or so: not very nice. It also means that the number of requests to Twitter is very large. Actually, the component therefore fails to update after a while and logs:

      [INFO] [talledLocalContainer] 13.11.2012 11:02:10 WARN [com.onehippo.gogreen.utils.FeedFetcher.getSyndFeeds():98] Error 400 while fetching feed: http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=Onehippo

      Twitter's response by then is:

      <?xml version="1.0" encoding="UTF-8"?>
      <hash>
      <request>/1/statuses/user_timeline.rss?screen_name=Onehippo</request>
      <error>Rate limit exceeded. Clients may not make more than 150 requests per hour.</error>
      </hash>

      So, GoGreen simply does way too many requests.

      Various easy improvements are possible here:
      1. increase the update interval to, say, every 5 minutes (should fix the rate limit)
      2. make the component asynchronous (so a client does not block when the feed is updated)

      An even better option would be to fetch the feeds entirely client-side, but that requires a new implementation.

      Attachments

        Activity

          People

            svoortman Simon Voortman (Inactive)
            mdenburger Mathijs den Burger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: