Archive for May, 2006

What really is an RSS feed?

If you have been trying to make sense of all the Web 2.0 hype, you probably have wondered what RSS is. To me an RSS feed is:

  • a mechanism to inform people of changes to your website content
  • an XML document (that conforms to the RSS specification),
  • accessible over HTTP
  • that automatically updates when you update your website content

Let's use a sample from the RSS Specification page at Harvard. The location of the RSS feed file is:

http://media-cyber.law.harvard.edu/blogs/gems/tech/rss2sample.xml

Once you point your RSS Reader to the above location, it reads the feed and displays it in human readable format. Here is what my favorite Reader, Netvibes displays:

Feed Reader

Lets take the XML file apart. The channel represents a feed.

<title>Liftoff News</title>
    <link>http://liftoff.msfc.nasa.gov/</link>
    <description>Liftoff to Space Exploration.</description>
    <language>en-us</language>
    <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>

The title ("Liftoff News") usually shows up as the feed title in your reader. The link is a URL to your main site/blog etc.

The most important pieces in the feed are items. These show up as a list in your reader. If this was a feed of your blog, then each item would represent a blog post.

<item>
      <title>The Engine That Does More</title>
      <link>http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp</link>
      <description>Before man travels to Mars, NASA hopes to design new engines
        that will let us fly through the Solar System more quickly.  The proposed
        VASIMR engine would do that.</description>
      <pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>
      <guid>http://liftoff.msfc.nasa.gov/2003/05/27.html#item571</guid>
    </item>

Each item has a title, link, description and guid. The title ("The Engine That Does More") appears in the feed. The description is what appears when you hover your mouse over the item title in most readers. The link is where you are redirected to when you click the item (which is the whole purpose of publishing the feed if you ask me). I am assuming the guid is so that the reader can tell two posts apart even if they have the same title.

Resources

Leave a Comment

Monitor batch jobs with Oracle XE

Since installation, the Oracle 10g XE on my desktop has mostly been used for quickly testing how database stuff works. Last week I finally got around to digging a bit deeper into the HTMLDB/Application Express part.

Lets say you have batch jobs on your system. Every morning management requires a report of the previous day’s run. Fortunately, your batch jobs log their status in a table. Now you could always run a query against this table, spool the data and email it to management. Or you could create a report using Application Express. Consider:

  • No software to deploy on management desktops (need a browser though)
  • You aren’t the messenger that delivers bad news about batch job failures
  • A browser based report looks a lot more impressive than spooled CSV (especially when your boss is trying to impress his boss)
  • Not wastefully repetetive or mind numbingly boring

So here is how you go about impressing management:

  1. Login to your desktop Oracle XE instance as a user with DBA privileges
  2. Create a new user – say rss
  3. Create a database link to your application database(say remdb) that has the batch log table(app_batch_log)
  4. Create a public synonym (app_batch_log_remdb) for this remote table (app_batch_log@remdb)
  5. Grant select on app_batch_log_remdb to user rss
  6. Logout and login to Oracle XE as user rss
  7. Choose Application Builder >> Create Application >> Create Application from the (rather picturesque) XE menu
  8. Enter your application name and click Next
  9. Select Report as Page Type, SQL Query as Page Source and enter your query (SELECT * FROM app_batch_log_remdb). Click Add Page.
  10. Click Next thrice
  11. Change Authentication Scheme to No Authentication and click Next twice
  12. Click Create
  13. Click Run Application

Here is a screen capture of the application creation process (Steps 7 thru 13).

To deploy:

  1. Enable HTTP access to your XE instance as described here
  2. Copy the URL from the last step and replace the 127.0.0.1 with your desktop IP address/hostname
  3. Send off to those interested.

Leave a Comment