It has been sometime since time2tweet was last deployed and updated. Since there, there have been a lot of users and we have finally hit our Google App Engine free users limit. I had sent out an email to all the users requesting them to host the application on their instance to continue scheduling their tweets seamlessly. Interestingly, a lot of people responded back, wanting to continue using the application to tweet their applications.
Over the last week, I helped them host the applications on their server, and many users now are successfully running the application. During that time, I also discovered some interesting issues that I fixed. To start with, I moved the source control to Mercurial on google code.
The first issue I encountered was asking the users to register for twitter Oauth and enter those credentials for the application to use. Since it was an admin module, I was using a URL that would set the OAuth Secrets using the GET method. Not only is this a bad design, people were confused when the URL spit out a blank page. This release has a nice looking UI around it.
The second bug was interesting. I was reading the OAuth values in the cache once they were set. Once read, they would not be re-read till the cache flushes it out. If the OAuth values were incorrect, no tweets would be posted. It would also not be possible to update the cache as these values were never removed from cache. This was a big problem as the cache seems to maintain state even on new applications. The admin page now explicitly sets this value in the cache and the database, eliminating this problem.
There was a Google App Engine failure some time ago and that had stopped all cron tasks. Once App engine was up, the Cron job has too much work to do and used to time out. This let to no tweets being posted. This ug was fixed but explicitly forcing the Cron job to handle only 20 tweets at a time, no matter how much backlog it has.
Finally, I also corrected the tasks to post have one tweet to be posted per task. This may be heavy on the task, but seemed to be the right thing to do. Given that there can be 30 tasks per minute and the Cron sets 20 tasks every minute, this seemed to be a good thing to do for the load.
As with all systems, not all deployments are great. I still see some errors with the Tasks about "null" screen names, etc. and am still investigating. Please follow this space for update.
I would also like to thank all the users who think this application is good and were ready to deploy it on their instance of App engine.