Saturday, April 28, 2007

Status Report for 04/04/2007 -- 04/25/2007

Progress

Detail design for Atom Feed for CIMA Web 2.0

1. Method I

Basic idea:

  • On the server side:

(1) A program keeps running to get Parcel from CIMA Service every several seconds;

(2) Every time the program get Parcel it will call XML Parser to wrap the data into format of item in the Atom Feed;

(3) Write the new-come item to the Atom Feed, and delete the oldest one at the same time;

(4) Once there is any feed request, it will read the Atom feed (file)

  • On the client side:

(1) User sends feed request to the server;

(2) Show feed content to the user

2. Method II

Basic idea:

  • On the server side:

(1) Once there is any feed request, a serverlet will be started to listen to the Parcel from CIMA service;

(2) If no data comes, return a message to the user; otherwise, get Parcel and call XML Parser. This step keeps doing this way until it gets enough Parcels based on users requirements(For example, user wants to watch the latest 10 data each time) and to wrap the them into format of item in the Atom Feed

(3) Write these items to the Atom Feed;

(4) Once there is any feed request, it will read the Atom feed (file)

  • On the client side:

(1) User sends feed request to the server;

(2) Show feed content to the user

3. Comparison
(1) Method I is simple and it can update information at the same rate they receive information, but it needs to run the program all the time even if no feed request comes;

(2) Method II saves resource and it gets the data just upon the user request, but it is a little bit complicated and the user may need to wait for some time for server get enough data

Discussion

1. Comparison of two implementations

2. Request frequency settings in Sage

Future work

1. The issues described in Discussion section

Friday, April 06, 2007

Status Report for 03/07/2007 -- 04/04/2007

Progress

1. Workflow for Atom Feed for CIMA Web 2.0

(1) CIMA persons subscribe all the available parameters by Sage on the browser side;

(2) CIMA Client gets the http request and registers a CIMA service;

(3) CIMA Service sends back a parcel with the service information users required;

(4) XML Parser converts the parcel format into Atom Syndication format and writes to Atom Feed;

(5) Send results back to users

2. Detail Design

(1) Install Sage at http://sage.mozdev.org/ (Sage is a lightweight RSS and Atom feed reader extension for Mozilla Firefox);

(2) Make CIMAClientPlatform application run. This application a skeleton application to register with a CIMA service and get data (Parcel) back. In a Parcel, it contains many data, currently, the user needs “SensorName”, “TimeStamp” and “DoubleData”;

(3) In the class src/edu/indiana/extreme/www/cima/channel/sink/Channel_sinkImpl.java,

put some code for parsing Parcel to Atom Syndication format and writes to Atom Feed in the "myHandler" method. The basic steps are shown below:

(a) Read XML data into a DOM;

(b) Configure the Factory;

(c) Instantiate the Factory;

(d) Get a parser and parse the parcel;

(e) Write the data required to Atom Feed;

(4) Copy the Atom Feed to an available URL manually;

(5) On browser side, create a new bookmark in Sage for the Atom Feed just created and Check the feed;

(6) The content/data in the Atom Feed will show on the right panel


Discussion

1. Currently, I manually copied the Atom Feed from hagar.cs.indiana.edu/Web2.0/...... to

http://www.cs.indiana.edu/~ydeng/atomfeedcima.xml, so I am wondering if I need to use some TOMCAT programming to move these files automatically.

2. How often the Sage retrieves the data from the Atom Feed.

Future work

1. The issues described in Discussion section