Monday, October 03, 2005

The Sky is Falling

Well, Shoechicken is encountering a few setbacks at the moment. It turns out that by leaving the rating agent as a black box, we did not appropriately design the rest of the system to support the Rating Agent. The key issue is that items (news articles) should not be delivered individually, but instead in groups, to the Rating Agent. The benefits of this (according to James) are less computation by the Rating Agent by not having to rebuild a large matrix for each article and more accurate ratings by comparing related articles to each other at the time of rating.

The architecture of the system is in a state of flux. Over the weekend James and I went back to the drawing board (quite literally a whiteboard) to resolve some of the above issues. Much of the functionality has been moved to the UI Agent, which is responsible for managing data from the Feed Subscription Service and the Shoechickens. It has been decided that there will be a 1-to-1 ratio between users and Shoechickens, meaning that for each user in the system there will be a Shoechicken (read Rating Agent + Feedback Interpreter) assigned to that user. The new design still supports the ideas of services mentioned by James, and that of a multi-user environment. The approach will add some additional modules and work, but should benefit the project in the long run.

The UI Agent is now responsibly for managing requests for updates, and ensuring that Shochickens are notified of these updates. The UI Agent will keep track of all active requests from all users, and when requests for article downloads are fulfilled the UI Agent will post events to the appropriate Shoechickens for the users issuing the requests.

A module accidentally left out in the previous design is now called the Bufunkalo, in honor of Hooper P. Bufunkalo (supposed discoverer of the Shoechicken). This module is responsible from capturing feeds and breaking them up into individual items before sending them to the Shredder. The module also weeds out articles that the Shredder has already seen, so that they are not processed again. Before sending articles to the Shredder, it downloads the content of the article if it is available so that the Shredder may break up the content into keywords. Another key aspect of the Bufunkalo is that it will contain a thread pooling system, which will allow multiple articles to be processed simultaneously. This will also prevent any other services which have called the Bufunkalo from having the wait for the Bufunkalo to finish processing (such as the Feed Subscription Service).

Additionally, we determined the need for a UserToFeed table in the database. This table maps a username to a list of feeds that user is subscribed to. This will allow the UI Agent to recreate subscriptions when a user reconnects. This will also provide the Rating Agent with the ability to determine which feeds it should be checking for new articles in the database. This table has been added to the SQL script used to create the database and the database itself in CVS.

The package names have been changed for most of the project. They were getting ridiculously long. For instance, the longest package name was com.shoechicken.shoechicken.bufunkalo.shredder.keywordcounter.event. Now, the same package falls under com.shoechicken.sc.bfnklo.shred.kwcntr.event. The new, more compact, package names should save some typing.

0 Comments:

Post a Comment

<< Home