NewsReader:Main Page

From ACT4D Project Wiki

Jump to: navigation, search

There is a lot of content available on the Internet today in the form of news, articles and blog posts. It is becoming increasingly difficult for users to find content over the Internet that is relevant to them or that interests them. Another discernible trend is the steep rise of Online Social Networks (OSNs) over the last few years.

There has been a marked shift in the way people are using the Internet. Historically, the Internet was based on a Producer-Consumer content model supporting one-way broadcasting and dissemination of information. Today, OSNs such as Facebook and Twitter are driving new forms of social inter-action. They have enabled users to actively contribute to the content available on the Internet by sharing posts, adding comments and participating in online activities. One of the most popular online social networking sites, Facebook, currently has more than 600 million active users. An average user on Facebook has 130 friends and people spend over 700 billion minutes per month on Facebook. These figures indicate that OSNs have a potential to revolutionize the Internet experience for users.

On this Page we have tried to document the implementation of our system that provides a new way to read news by leveraging the connectivity in Online Social Networks(OSNs) making it easier for a user to find news content that interests him.


Contents

Central Server

Currently, 10.22.5.40 is used as central server which can be accessed from outside IITD through 220.227.156.21.

nohup sh net.sh &
sudo ./lampp start

Got to '/opt/acache-tomcat-6.0.30/bin/ and run this command

sudo ./startup.sh

Facebook Application

For getting started with Facebook applications, go through sample examples at Facebook Developers. Our Facebook application is running at application. The callback url specified is http://220.227.156.21/xampp/iitnewsreader/ and the code for Facebook application is located at /opt/lampp/htdocs/xampp/iitnewsreader.

You do not need to download Facebook php SDK since it is already there at the above location. The file index.php contains the APP_ID and APP_SECRET for this application.

If you want to add yourself to the developer list for this facebook application, send a mail to Sandeep Gupta.

Firefox Plugin

You need to download the plugin iitdnewsreader@cse.iitd.ernet.in to extensions directory of your firefox. The directory structure in plugin is as below:

-chrome.manifest
    -install.rdf
    -chrome
        -content
           -browser.xul # XML User Interface Language
           -config
           -mainscript.js # Contains all the Javascript functions
        -treeviz
          - Treeviz.jar
          - solution.xml
          - file.html
    -locale
    -skin 

Mainscript.js: It is the main script file for the extension and contains all the javascript functions inside the IITDnewsreader namespace. A list of these functions is given below:

Database Functions

Parameters: None

Returns: DB object

Opens a connection with the Sqlite database (newsreader_metadata.sqlite) and returns the DB object for execution of statements. It creates a new database (Sqlite) file if it does not exist already.

Parameters: Tab object

Returns: Void

Given the tab object for which related URLs are to be computed, the function searches in the local database for news similar to the news item opened in this tab. The function stores the resulting related news in a new attribute for this tab (“newsreader_keywords”). If the input tab is the current selected tab, the function calls setToolbarButtons() which puts this related news in a horizontal scrolling toolbar at the bottom of the Firefox window.

Parameters: XML object

Returns: Void

Given a well formed XML object that is returned by our server on a GetNews request, this function parses the xml and adds entries to the local database.

XMLHTTPRequests

Parameters: String - news text, Tab Object, String - previous tab title

Returns: Void

Sends a request to OpenCalais server to fetch Social tags for the current news URL. The request contains the news text for fetching related keywords. The response for this request is received asynchronously by callBackFromCalais function. The Tab object is used to temporarily set the window title as (“Waiting for response from Open Calais”).

Parameters: Tab Object, XMLHttpRequest Object, String - previous tab title

Returns: Void

Receives the response from OpenCalais and insert the tags along with the current URL in the local database. It also resets the Tab’s title to prevTitle.

Parameters: String - keywords separated by ‘#’, Tab Object, String - previous tab title

Returns: Void

Sends a request the local server to update it with the news items that are being read by the client. It also sends the Social Tags (keywords) of the news text to the server. The response for this request is received asynchronously by callBackFromServer function. The Tab object is used to temporarily set the window title as (“Waiting for response from Server”).

Parameters: Tab Object, XMLHttpRequest Object, String - previous tab title

Receives the response from Server and resets the Tab’s title to prevTitle.

Parameters: None

Returns: Void

Called at the start of Firefox, it sends a request to the local server for global time. The response for this request is received asynchronously by callBackFromTimeServer function.

Parameters: XMLHttpRequest Object

Returns: Void

Updates the local time on receiving a response from the server.

Parameters: String - Time Stamp after which news is to be fetched

Returns: Void

Sends a request to the server to fetch all news items having cluster ID equal to the client’s cluster ID and having been read after the sent time stamp. The response for this request is received asynchronously by callBackFromServerForOwnNews function.

Parameters: XMLHttpRequest Object

Returns: Void Calls putXMLIntoDatabase(resXML) with the XML returned by the server as parameter.

Parameters: Event Object (Sent automatically on 10 sec timeout)

Returns: Void

Called after every 10 secs so as to update the local database and make it consistent with database on server. The function reads the configuration file, calls sendRequestToServerForOwnNews(time) with the last update time as parameter, and sets the last update time in the configuration file.

Configuration File Functions

Parameters: None

Returns: Void

Reads the config file and sets global parameters for the last update time and the cluster ID and the config XML.

Parameters: None

Returns: Void

Saves the current xml configuration to the disk.

Parameters: None

Returns: Void

Changes the last update time in the config XML object and calls saveConfFile function.

Parameters: None

Returns: String - time in ms

Calculates the current server time from the time saved locally at the start of the extension.

Toolbar Functions

Parameters: None

Returns: Void

Event that sets “hover” as true

Parameters: None

Returns: Void Event that sets “hover” as false

Parameters: None

Returns: Void

Opens the java applet for visualization in a new window

Parameters: String - The related news items and keywords serialized to a string

Returns: Void

Parses the input and adds these urls as buttons to the horizontal scrolling toolbar.

Parameters: None

Returns: Void

Makes the horizontal toolbar at the bottom of the page scroll. The scrolling stops on mouse over (that is if the hover attribute is set to true)


Visualization

We have used TreeViz visualization in our system. Here. For running it on your machine, download the code and import it as an Eclipse project. We are only using Circular Treemap. There are three main files in the package ch.randelshofer.tree.circlemap which we have edited in the code and they are explained below:

  1. getColors(String topic): sends an http request to the server to return an xml containing counts for each cluster corresponding to that news. Processes that xml to create a frequency_array. While drawing nodes, it uses colors depending on values from this array.
  1. getClusterId(): Processes the original tooltip to extract the clusterID for that circle.
  2. getNewsForCluster(int cid): Queries the local database for all the news corresponding to the clusterID and returns a tag embedded string to be shown in the tool tip.


Clustering

Twitter Analysis

There is a folder Twitter Analysis on central server at /home/sgupta/ which contains all the scripts used to run simulations on the twitter dataset. It also contains the Twitter Datset in the form of two files socialgraph.data and tweets.data. Some of the scripts are:

People

Abhinav Uppal

Sandeep Kumar Gupta

Sahil Singla

Personal tools
Namespaces
Variants
Actions
AllProjects
Navigation
others
Toolbox