Experience   Technology   Services   Resources   Products   News   Blog About   Contact   
Resources  

Syndicate your System with RSS

RSS is the must have feature for 2006. Lets look at how the hype can help feature embedded systems.

What is RSS?

RSS (Really Simple Syndication) is a web content syndication format. It is intended to allow agent software to retrieve a set of headlines and story summaries for quick review or integration into another display.

RSS is an XML dialect that conforms to the XML 1.0 specification. An RSS file is a data source providing structured information according to a common standard. The presentation of the information in the file is left to the client software.

RSS has been around for years, but is currently exploding in popularity. In addition to its merits as a standard, the growth of RSS is tied to a series of recent changes in the web ecosystem.

  • The popularity of blogging and other CMS software which generally support RSS out of the box
  • The focus on RSS as a feature in the new browser war between Internet Explorer, Firefox and Apple Safari
  • The integration of RSS into Microsoft Windows Vista and Apple OSX Tiger in the form of widgets and gadgets

RSS is starting to pop up everywhere - on the operating system sidebar, on the Outlook home page, on the browser toolbar. It is the pervasive acceptance and integration of RSS that makes it of interest to embedded developers. Embedded systems can use RSS to distribute information to desktops, servers and other systems by generating a simple and well-defined text file.

Applications

RSS is useful for generating a summary of device status or history for display in the context of another application.

  • Device status by creating an item for each component
  • Alarm history by creating an item per alarm
  • Activity log by creating an item per event

By implementing these features in RSS, a device can provide information in a format that is integrated into the user's preferred display program.

Weaknesses

Since we are repurposing an established standard for our own needs, we are inherently limited by the definition and nature of RSS.

RSS is a pull technology. There is no notification mechanism akin to an SNMP trap. The reader has to come and get the information frequently enough to avoid missing information. A limited notification service is provided by using clouds.

The format of an RSS item is fixed. Essentially, it provides a timestamped string title, a larger text description and a link to more information on the web.

System Requirements

The RSS 2.0 specification is protocol (FTP/HTTP/etc.) independent, but application of RSS generally requires a web server on the device. The web server must support the specification of MIME types to identify the RSS content as "application/xml". In addition, a mechanism for dynamically generating the XML file is needed. Normally, RSS is generated with a server scripting language such as Perl or PHP. In embedded cases, it normally falls back to C or C++ through conventional CGI.

Anatomy of an RSS File

The RSS feed is an XML file that consists of a channel and items that are associated with the channel.

XML

The RSS file must be properly identified as XML and provide the RSS element around all of the document contents.

Channel

The RSS feed must contain one and only one properly formatted channel. A channel has three required elements.

  • title: The name of the channel
  • link: The URL of the web site corresponding to the channel
  • description: A block of text that provides a more informative description of the channel

There are a number of optional elements that may be defined for the channel. Including these elements will create a richer user experience if there is an application for your feed.

  • language: The language the channel is written in (see RFC1766)
  • copyright: Copyright message for the channel
  • managingEditor: E-Mail address for person responsible for content
  • webmaster: E-Mail address for person responsible for server
  • pubDate: Publication date of channel (see RFC822)
  • lastBuildDate: Timestamp of feed generation
  • category: Defines categorization of the channel and a site that defines categories
  • generator: Indicates the program used to generate the feed
  • docs: A link to the specification
  • cloud: Support for registration for notification of changes
  • ttl: Time to live in number of minutes
  • image: Specifies a link to a representative graphic (88x31 is the standard)
  • rating: The PICS rating of the channel content
  • textInput: Allows for definition of an input for feedback, search, etc.
  • skipHours: Identifies hours of the day which may be skipped
  • skipDays: Identifies days of the week which may be skipped

Aggregators generally support only a subset of the optional elements.

Item

The channel feed consists of a series of item tags. Each element of an item is optional. The only requirement is that a title or a description is provided. In general, each item should have at least a title, description and link. Logs should use the pubDate as a timestamp.

  • title: Short description of the item
  • link: URL for more information
  • description: A longer description of the item
  • author: E-Mail address of the item's author
  • category: Categorization of this item
  • comments: Link to URL for comments
  • enclosure: Attaches a resource such as an image or video to the item
  • guid: Unique identifier for the story
  • pubDate: Date of publication of the item - use as a timestamp
  • source: Identifies an original source for the item

A Sample RSS File


<?xml version="1.0" encoding="utf-8"?> <rss version="2.0"> <channel> <title>MicroSockets RSS Sample</title> <link>http://www.microsockets.com</link> <description>A sample file to illustrate the basic format of an RSS feed.</description> <item> <title>CH 1: Alpha</title> <description>Online, 25.5 mW, 59&deg;C</description> <link>http://device/channel.cgi?ch=1</link> </item> <item> <title>CH 2: Beta</title> <description>Online, 23.4 mW, 56&deg;C</description> <link>http://device/channel.cgi?ch=2</link> </item> <item> <title>CH 3: Gamma</title> <description>Offline, 0 mW, 42&deg;C</description> <link>http://device/channel.cgi?ch=3</link> </item> </channel> </rss>

Conclusion

As with many web technologies, RSS provides unexpected features for embedded systems simply through universal adoption. While intended for summarizing articles and blog entries, we can apply RSS to provide a lightweight and easy to implement protocol for real-time data ranging from activity logs to device status. As RSS is being integrated into all levels of client software, embedded systems are enabled to deliver up to date information in the user's preferred interface.

 
RSS 2.0 Standard
Find out more by checking out the RSS 2.0 standard.


e-Newsletter
Sign up for the MICROSOCKETS e-mail newsletter.

EMAIL ADDRESS:

Search
Search MICROSOCKETS.COM

SEARCH FOR:

Contact Us
MICROSOCKETS
Sanctuary Software Studio, Inc.
3560 West Market St. Suite 100
Akron, Ohio 44333

877.832.3351 | 330.666.9690

 
Home | Experience | Technology | Services | Resources | Products | News | Blog | About | Contact © 2005 MICROSOCKETS