Home
What is the Aikernel?
Quick start guide
Articles
How can I use it?
Electronic commerce
  Sales and Support
  Automotive
  Entertainment & gaming
  Home media
  Middleware
  Process automation
  EJB & Web services
How does it work
 
Participation
Quick links

 

Article: An Overview of the AiRSS Service Cell

By Michael Rice, Aikernel Project Administrator
September 21, 2003
Contact me at mrice@users.sourceforge.net for questions or follow up about this article.

This is a fun cell that I've been meaning to develop for a long time. It is still in a very primitive state, but I thought it would be a good idea to write a quick article about it to help other cell developers. Yes, this is yet another RSS reader application.

For those of you who aren't familiar with the "RSS" I can honestly tell you that I'm not sure what it stands for! I think it has something to do with "Syndication" something or another. My sincere apologies to the data format designers on their wonderful and clear work! Anyway, the RSS has become quite popular as a way for web content developers to let their writings and work get syndicated. It is a simple XML specification that you can post on your web server that has a list of the what your channel (i.e., your web site) is and what the content on it is. I'm planning on adding RSS feeds to this site when I have a few more free moments if only to feed into the AiRSS Cell! Even Sun has gotten into the act by adding the RSS on their site.

There are a plethora of RSS readers all over the place. So why build another one? To show off the features of the Aikernel, of course! As RSS readers go, this version is pretty limited. It lets you:

  1. browse the available channels in the server
  2. review the items in a channel
  3. review the extra information (such as a news items summary) for a specific item
  4. trigger a news item based on a dynamic activator that was published based on the content discovered in the news feed.

The fourth item is really the only difference. Otherwise, it is simply a feature-poor RSS reader... It can't even pop open a browser to follow a story link. There is a very good reason for this: I couldn't figure out how to do it in telnet! I don't really think it can be done of course. In future versions, I really think we can expand this and turn it into a nice application.

Before we get too far into the cell design, I want to mention two important things:

  1. thank you much to the Apache Commons developers who created an RSS reader instance of the Digester class! This saved all kinds of time developing the RSS scanner. I think it did have a little trouble with the namespaces in the slashdot feed (and probably other more complex feeds).
  2. I split the work of the cell development by doing the basic infrastructure piece as a module. This way the knowledge of the RSS can be exposed to other cell developers. This goes under the extension module packages (aikx...).

For those of you who are new to cell development, each feature of your cell is defined as a "Context". Think for a minute about a windows application. If you have a drop down menu called "File" and a menu choice called "Open" you could call opening a file as discrete feature of your application. If you wanted to do the same thing in the Aikernel, you don't need to define the menu and the mouseclicks. You simply define a Context that you might decide to call "Open a File". Then you'll need to define the Activators that you want to trigger the Context as the Aikernel is listening to input data from the user.

In the AiRSS Cell, I've defined the following contexts:

  1. Browse the available channels
  2. List the items in a channel
  3. Review more details about a specific item

Notice that there are only three Contexts defined here, but I mentioned four features of the AiRSS cell earlier in the article. I did this on purpose.

Context: Browse the available channels
For simplicity's sake, we'll bind only two Activators to this context. Basically, we are simply going to attach the word "channels" and "browse" to this context. What's so smart about this, you say. Well, the idea behind the Aikernel is that the cell developer's effort to bind to the natural world of the user should be limited.

There are four important ways this gets made more intelligent without much effort from the cell developer:

  1. The thesaurus service can define and learn more synonyms for the words "channels" and "browse"
  2. The Cell developer could bind to a universal activator such as "list" that might have lots of different permutations
  3. The Cell developer can also bind the activator to certain Concepts as they come up, such as "reading the news" or "search for knowledge about java" etc...
  4. Handle the "morphology" of words. So if the user says something like "channel" it might be the same as "channels" depending on the way the user is constructing their phrase.

How does the Cell get the context back? Or, how will the cell know when the user has triggered the Context through Activators?? That is the core of the Aikernel. Once it has analyzed the incoming data and compared it to the Activators and Contexts defined by the Cells it will generate an ActivationEvent and pack it with Activators to give to your cell via the doEvent() function.

Context: List the items in a channel
This is similar to the browse context above, but it counts on receiving on of the channel ids as an activator. It also binds to the universal ordinal activators so it can respond to things like "first", "second", etc...

Context: Review more details about a specific item
This is just as simple as the other contexts, but it is kind of interesting because it publishes Activators from the content of items. So if there is a story about "Java" it can publish this as a fact of an article id and tie it to the context. Then if the user says anything about "Java" it can offer this as a possible function.

Getting started
To try it out, connect to the naturalmachine.com by telnetting to port 14284 on the server or (telnet naturalmachine.com 14284) or download your own copy at aikernel.sourceforge.net

Room for improvement:
a) when publishing the activators it would be nice if you could do some analysis on the incoming words to more clearly define the activators. This hasn't been done programmatically before. For example if you see the word "Web Services" and want to publish an activator programmatically, it isn't very smart to do it as "Web" and "Services", instead you should be able to bind it to a concept of "Web Services". Additionally, you should be able to reverse morph the word from "Services" to just "Service"
b) the activators simply come in with an "ID" but it would be nice if they actually had some kind of payload

 

 

 

SourceForge.net Logo    contact project admin