Sunday, June 15, 2008

Yakkle Adds Twitter Auto-Throttle

Yakkle version (v0.6.1) was recently released. It contains several updates to its integrated Twitter client. The most important of update was the addition of Twitter auto-throttle. This feature should should help avoid the dreaded "rate limit" message during periods when the Twitter service limits access to clients like Yakkle.

But what exactly is the Twitter rate limit and Yakkle auto-throttle? This blog post will offer a little more detail to help understand what is going on.

Twitter API and Rate Limits
One of the reasons why there are a host of Twitter clients is because Twitter provides a publicly available and documented application programming interface (API). This allows software applications (i.e. Twitter clients) to access the majority of Twitter services. Twitter clients like Yakkle use these API methods to update user status, send direct messages, and update timelines by automatically polling specific API methods looking for changes and updates. This automatic polling through the API makes accessing Twitter through a client (arguably) a better experiencing than using the current Twitter web interface.

This openness too allow other client access Twitter data has the potential to be (and has been) abused. To combat the abuse, access to the Twitter API methods is limited to a certain number of calls per user, per hour. This threshold, refered to as the Twitter rate limit has historically hovered around 70.

When a certain user calls the API more than the threshold in a (rolling) hour period, any subsequent calls are failed due to the rate limit. Client Response to being Rate Limited Clients like Yakkle differ in how they handled these rate limit failures. Some clients will lock up for a certain number of minutes while others (like Yakkle) will let you view statuses and messages that your client has already gathered, just preventing operations that require additional API calls.

Within Yakkle, you know that you are in rate limit mode because the label where your Twitter username is displayed changes to "rate limited" and certain operations will either be disabled or display waring dialogs when attempted.

When in "rate limit" mode, Yakkle will also disable any automatic polling of timelines. By default, Yakkle will remain in rate limit mode for 4 minutes.

Adjusting to Changing Twittter Rate Limits
When Yakkle rolled out its integrated Twitter client way back in v0.6.0 (about a month ago ;->), it was optimized to try and keep timelines and direct messages as current as possible within the hourly threshold of 70. Recently, the folks at Twitter have become more aggressive in dynamically adjusting the rate limit threshold based upon the load they are experiencing in the system. In fact, on the day of the Apple Worldwide Developers Conference, the threshold was reduced to 10 for several hours.

These changes often resulted in the Yakkle client (and most others for that matter) spending most of the time in rate limit mode. To their credit, the Twitter folks listened to developers using their API and added a new API method to let clients as what the current rate limit value is.

Yakkle Auto-Throttle
By quickly adapting the Yakkle Twitter client to actively query the current Twitter rate limit we were able to update our update algorithm to better adapt to dynamic rate limit ranges that are now more often found.

In v0.6.1, Yakkle will limit its automatic polling of timlines and messages to 75% of the current rate limit threshold. Of that 75%, the majority of polling is allocated to the friends timeline and received direct messages. We have found that this ratio provides a good mix between keeping you timelines current and the other ad-hoc operations like adding and removing favorites, viewing and friending other users, and maintenance of direct messages.

Up Next
In our next update coming in a couple weeks, Yakkle will provide even more visibility to a user's rate limit value and allow customization of automatic update parameters. We will also be enhancing the Twitter client to to be more responsive when access of the Twitter API is slow due to their server load or your local network connection speed (latency).

If you have other suggestions for the Yakkle integrate Twitter client please drop us a note at or reply to us on Twitter (@yakkle).

blog comments powered by Disqus