Skip to content

~GSoC2010: Ninad Pundalik's Messaging Plugins Framework Proposal

anildash edited this page Mar 26, 2011 · 1 revision

Project Abstract

Adding interactivity to the ThinkTank application, by providing a framework that allows a ThinkTank user to reply to updates from users on his timeline. This includes the development of a small queuing system where posts/messages from the user are collected, and then they are posted to their respective networks by a cron script similar to the current crawler active in ThinkTank.

Project Description

ThinkTank is an application that aims at organizing a chaotic timeline of updates from social networks and providing it’s users with a useful picture. To do this, the application crawls and collates posts from the different networks (Twitter and Facebook at the moment), and detects conversations based on the post metadata. However, to utilise the full potential of these social network services, ThinkTank should be able to not just read posts from different networks, but also allow it’s users to post replies and interact with the replies and updates in the timeline.

This project will create a framework for posting these updates and modify the user interface of ThinkTank (i.e., the webapp) so that a user can create new updates/messages. Due to the modular nature of ThinkTank and the fact that it stores all it’s updates in it’s own database, to provide a backup to the users, the framework must be network independent.

Technical Details

Some of the terms used:

  1. Network : Facebook, Twitter, StatusNet, Buzz and other services where a user can post text updates and send messages to other users.
  2. Post : An update on Facebook/Buzz, a Tweet/Dent (i.e., public messages) or a private message (DM) on any of the networks.
  3. webapp : The user interface of ThinkTank.
  • To implement the queuing system, a table will be added to the ThinkTank database (posts_queue). It will contain the text/content of the post, author user id, network name, post type (DM/@ mention/update) and other meta data similar to the posts table. Every new post that must be posted to a social network will be added to this table.
  • Cron is used to invoke a script (send_posts.php) on a periodic basis.
    • This script collects the list of all unsent posts from the posts_queue table.
    • For each update, the appropriate method is called and an attempt is made to send the post to the user’s account.
    • If the post fails, the update remains in the queue, otherwise the update is marked as successful in the queue.
  • In the webapp, a button to create a new post will be added. Also, every post on the time line will contain a button that allows the user to post a reply. On clicking either of the two:
    • The webapp will check who is logged in, and accordingly, check the various accounts that the user can post to. This will be done on a server side PHP script (get_user_accounts) and AJAX calls from the webapp UI.
    • A dialog (jQueryUI dialog or something similar) will pop up, and it will present the user with a list containing the networks and accounts that s/he can post to. In case it is a reply, the same network will be selected automatically, though the user may add more.
    • The user enters the text of the post and clicks the submit button.
    • The webapp validates the text length and other necessary attributes with JavaScript and makes an AJAX call to a server side PHP script (create_post.php) which adds the post to the queue by inserting it into the posts_queue table.

Deliverables

  1. The cron script (send_posts.php) that will control posting of all posts to various networks.
  2. Changes in the ThinkTank User Interface for creating posts and replying to posts from other users in the timeline.
  3. Update the Twitter Plugin to include posting of @ replies and sending DMs to users.
  4. Update the Facebook plugin to include posting of updates and private messages.
  5. Sample code that can be used to extend this functionality to other plugins (for other networks).

Project Time Line

  • Community Bonding Period : Understand the codebase better, get used to the project’s coding style by bug-fixing. Be a more active participant on the mailing list and spend time on writing and understand Smarty templates.
  • First & Second week (May 24- June 6) : Modify the database as per requirements (posts_queue table) and create the class that will process the queue. Write the cron script that will use the class to send the posts.
  • Second & Third week (June 7-13) : Extend the Twitter plugin and write the methods to post direct messages and replies on behalf of the ThinkTank user.
  • Fourth & Fifth week (June 14-28) : Modify the User Interface and allow a user to create new posts from the ThinkTank application.
  • Sixth & Seventh week (June 29- July 11) : Add functionality to reply to posts in timeline by modifying the functions that generate the timelines.
  • Eighth & Ninth week (July 11-25) : Extend the Facebook plugin to send messages and updates on behalf of the ThinkTank user.
  • Tenth week (July 26-August 1) : Test the code developed till now, find bugs in the cron scripts and improve error handling. Also, test the User Interface across browsers and platforms for consistency.
  • Eleventh week (August 2-8) : Prepare sample code for other plugins.
  • Twelfth week (August 9-15) : Suggested Pencils Down date is here! Check the entire code for crappy and incomplete documentation/comments, improve it.
  • August 16 : GSoC ‘Pencils down’
Clone this wiki locally