Handle rate limits

Bug #1263378 reported by Kai Mast
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Friends
New
Undecided
Unassigned

Bug Description

When rate limits are exceeded it is only visible in the log. There should be a notification so the user knows what is going on.

Also the rate limit headers have a X-Rate-Limit-Reset field that tells you how much seconds it takes until the rate limit is reset. That would also be helpful to know as a user.

Tags: twitter
Kai Mast (kai-mast)
tags: added: twitter
Revision history for this message
Kai Mast (kai-mast) wrote :

Oh seems like friends already parses these headers. So we just have to create a notification when they are reached so the user knows what is going on.

Revision history for this message
Robert Bruce Park (robru) wrote :

Yes, friends backend parses the headers (at least for Twitter) and then enforces them in a gentle way, introducing short pauses in order to avoid going over the limits.

Unfortunately one of the limitations of the frontend/backend architecture we're using is that we really don't have a good communication channel for signaling errors to the user. Part of the reason for this is that the backend is expecting to have multiple frontends (eg, the Social Scope, the Friends App, we were hoping many apps would begin integrating social network feeds from the same backend), so there's no real way to say "display an error in the friends app" because as far as the backend is concerned, there's no way to know which frontend is running (if any).

To properly resolve this bug, friends backend is going to need some kind of error-message-db (similar to the existing DeeModel used for tweets) but existing separately, in parallel to the original. Then various frontends like Friends App and Social Scope can listen for callbacks on that model to know when to display a notification/error message.

We already had a plan to implement something like this, but it just fell on the backburner as other projects became higher priority for Ken and I.

Revision history for this message
Kai Mast (kai-mast) wrote :

Thanks for the feedback. Its a pity that so few people are working on friends. It could be killer feature of Ubuntu. No other OS has social media directly integrated.
Currently, its not even one of the core apps. :/

But doesn't friends already notify the user about mentions? Would this be different because you wanted some kind of interaction with the errors?

Revision history for this message
Robert Bruce Park (robru) wrote :

yes, currently Friends calls libnotify directly when there are new mentions; friends-app is not involved in those notifications. I suppose it would be possible to use those same kinds of notifications to signal rate limits and things, that never occurred to me. just that there's no way to tell friends-app when a rate limit has been hit.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.