Jul 2, 2009 by Umesh
Twitter World Crash
Update: The updated with fix has now been accepted by Apple is now @ AppStore. Get it
My previous release of Twitter World application had a nasty bug which made it unusable for lots of “Twitter World” users and completely killed the reputation. I owe these users an explanation of what happened.
As you know, Twitter World uses Google API to translate Tweets. In version 1.0, the Twitter World translated one tweet at a time. This was slow and resulted in significantly slow initial load time. So I decided to use the newly available Google batch translation API. The batch feature of the API allows me to submit multiple translation requests at once. Google also has a limit of maximum 2000 encoded characters in the URL. A given batch could have at most 7 tweets. Any given tweet cannot be more than 140 characters long. So in theory this should always have been safe.
The part I missed was UTF8. In UTF8 (which is the most used character encoding), every character can be encoded in 1-4 byte. Now if you take 140 characters/tweet and mutliply it with 4, you get up to 560 characters in the URL per tweet. That implies even 4 tweets can take up to 2000 URL character limit Google requires. This results in URL too long error from Google.
This along with some lousy error handling caused the crash which a lot of users saw with the version 2.0 of the Twitter World. The fix was uploaded to Apple yesterday. It is frustrating that I cannot push the fix out faster and am @ Apple’s mercy when it comes to pushing update to this critical issue. In the middle if somebody needs an update, I can provide them with ad-hoc release.
[...] more here: Twitter World Crash Posted in News | Tags: a-big-part, and-less, api, are-getting, google-conquest, newly, [...]
[...] Twitter World Crash 02.07.2009 | Posted in Computer World My previous release of Twitter World application had a nasty bug which made it unusable for lots of “Twitter World” users and completely killed the reputation. I owe these users an explanation of what happened. As you know, Twitter World uses Google API to translate Tweets. In version 1.0, the Twitter World translated one tweet at a time. This was slow and resulted in significantly slow initial load time. So I decided to use the newly available Google batch translation API. The batch feature o Excerpt from: Twitter World Crash [...]
[...] Twitter World Crash 02.07.2009 | Posted in Computer World My previous release of Twitter World application had a nasty bug which made it unusable for lots of “Twitter World” users and completely killed the reputation. I owe these users an explanation of what happened. As you know, Twitter World uses Google API to translate Tweets. In version 1.0, the Twitter World translated one tweet at a time. This was slow and resulted in significantly slow initial load time. So I decided to use the newly available Google batch translation API. The batch feature o Excerpt from: Twitter World Crash [...]
Tweets in public timeline translated into russian from english correctly. But when I go to “home” tab - app crash. I write in russian and my timeline in russian too. Wait for fix. Thank you!
Igor,
Most russian alphabets are encoded as two characters. Look at this link for encoding: (http://www.unicode.org/charts/PDF/U0400.pdf). So if most tweets of the people you were following were long, you can see the crash. If the cause of the crash was the bug, you should see home screen with headers and than crash.
“If the cause of the crash was the bug, you should see home screen with headers and than crash.” - Yes, I c home screen (one or two seconds) before crash.
Thanks Igor. I feel bad for overlooking such a bug and affecting so many users.