Overall System Architecture

The general system architecture is pretty simple and straightforward. Its core is the FeedMaster.xml file, which has several main purposes:
  • Configuration file: contains information about what RSS feeds the application consumes and where they are located.
  • Data storage: is updated with new feed data every time the Updater application is run.
  • Transformation source: serves as a source document for XSLT transformation.
For description of structure of this document see the Template Developer Guide. Two applications access the data store: the updater and the web interface:

Updater component

The updater application is a Windows console application written in C# 2.0. Each time when run it reads the FeedMaster.xml file (its location is specified in the application configuration file) and searches for all /root/group/feed elements.

It tries to download the feed from given URL. When the download is successful, it copies contents of the feed’s /rss/channel element into the data sub-element of the FeedMaster.xml. The data are copied as received, including all possible extensions and errors (as long as the input data are well-formed XML).

If the operation is successful, it updates two attributes of the feed/last element. The time attribute is set to current time and status attribute is set to "OK".

If the operation failed, then the time attribute is updated as before, and the status attribute contains textual description of error. The data element is not modified. It’s up to the processing template, if it will display the “last known good” data or will communicate the error to user in some form.

Web interface component

The web interface component consists mainly of the ContentHandler class. This is HTTP handler, which will perform server-side XSLT transformation of the FeedMaster.xml and display the result to user.

There are three configuration variables in the appSettings section of web.config file:
  • DataFileName is fully qualified virtual path to the FeedMaster.xml file. By default it resides in the ~/AppData/_ folder.
  • TemplateFileName is fully qualified virtual path to XSLT template which will be used for transformation. It may contain the {0} replacement string, which will be replaced with the template name read from URL. By default, the templates are expected to be in the ~/Templates/ folder. This means that the text of XSL templates is accessible to end users from web, which is by design. If you want to hide the transformation logic, change the template location to some folder under ~/AppData/_.
  • Expiration is time in minutes, for which the transformation result should be cached. For performance reasons the handler caches its response for given number of minutes. The cache depends on the FeedMaster.xml and given template file and expires every time one of these files is changed.

The ContentHandler is mapped to all requests having format transform.*.axd. The wildcard part is considered to be name of the template and is used to determine the file name of the template being used. For security reasons, the template name may contain only letters A-Z, numbers, the minus sign and an underscore.

For example: in default configuration, if you request for example http://server/transform.plain.axd, the file ~/Templates/plain/Template.xslt will be used as a template for transformation.

Last edited Sep 28, 2008 at 5:47 PM by altair, version 2


No comments yet.