Creating an RSS Mashup

In this assignment, you will learn how to mashup the information published on the Web as RSS feeds. Mashups are situational applications: they are meant for specific, generally short lived, needs and thus have to be put together rather quickly and easily. RSS is a leading standard for publishing structured summaries of information (syndication) over the Web. Example uses of RSS include news headlines, blog posts, stock quotes, and weather information.

A popular way of creating mashups is to aggregate, manipulate, and republish the information published as RSS feeds by various providers. To see some simple mashups and examples of cool mashups created by others, you may visit Yahoo pipes. However, in this assignment you will create your own mashup using tools provided by Project Zero.

UPDATES

Updates override other information specified on this page.

What is our situation (specific need)?

Richard N. Buffett must keep up with the latest in financial news. He likes to read CNN, The Wall Street Journal and US News. So he has subscribed to the following feeds: CNN,WSJ and USN. However, Richard does not like the fact that the news on the feeds is not sorted by date so he wants to merge them and create a sorted feed that shows the latest news item on top.

Part 1a: Read an RSS feed

Let us learn how to read an RSS feed. Learning this part is essential for the final deliverables. We will use the Rome APIs (built-in support in Project Zero) for reading and creating RSS feeds.
  1. Explore these Rome tutorials in general for the entire assignment. In particular, see this on how RSS feeds can be read.
  2. Create a new zero application called "[your unity id].project2.rss" which you will use to read the 3 feeds and dump the retrieved information.
  3. At this point, you should feel comfortable with reading RSS feeds into your application.

Part 1b: Publishing an RSS feed

This part also is just a learning exercise but essential for the final deliverables.
  1. Go through this tutorial.
  2. Remove the iteration and printing part of the code that you incorporated in your financial_roundup.groovy script during the first part. Now create a feed based on your sorted data, and output it as a file to your public folder.
  3. Note that when you create your own feed, you have to specify the feedType. Let us use "rss_2.0" as the feed type in this assignment.
  4. At this point, you should feel comfortable with publishing your own RSS feeds.

Part 1b: Displaying an RSS feed

  1. Write another script, formatted_display.groovy that reads your feed--financial_roundup.rss--and displays it as html

      Deliverables

      • A README.txt file containing the project member's names, unity id's, section numbers, and any special instructions for your submission.
      • The sMash application zip file that is generated when you click the package icon next to your application the "My Applications" page in appbuilder. It must include the following files:
        1. A Groovy script (financial_roundup.groovy) that reads the feeds and publishes a new RSS feed (public/financial_roundup.rss) with the most recent news appearing first. Make sure that your script reads CNN, WSJ and USN feeds every 15 minutes and publishes a new one. Note: we will generate the rss file you don't have to submit it
        2. A groovy script public/formatted_display.groovy that displays financial_roundup.rss as html

      Testing and grading

      We will run your project and fire browser requests to formatted_display.groovy. We will watch the RSS output at public/financial_roundup.rss. We will check that the file is consistent with our output.

      Tips and tricks for solving the Richard N. Buffett situation

      1. You will have to use the zero.timers package instead of the Java Timer API. If you choose this route you must use the "/config/zso/immediateStart = true" option to auto-fire the timer. Recommended.
      2. Optionally, You can use the Java Timer API in your feed publisher scripts to fire them at regular intervals. Here is a useful tutorial. To avoid MissingMethodExceptions, you may want to put your TimerTask class in the java folder of your project and schedule it from Groovy.

      Please use the message board for most cases for special consideration direct questions to Prashant pckediya@ncsu.edu