View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Capybara (Notification System)

Notification Hub for Applications

Members:
Chan, Christopher
Cheah, Chin Fei
Chen, Nicholas
Sammons, Mark

Our project wil now be called Capybara, inspired as a rodent akin to Squeak and capable of versatile living activities, such as sleeping underwater. The project Capybara is a notification system for passing application messages to users via network or local. The JabTalk infrastructure is utilized for network notification, enabling Jabber protocol. JabTalk essentialy serves as the networking layer.
Capybara Features:

  • Login Authentication
  • Chat:This is not mere message chatting but also sending data and other information via XML streams
  • Signout
  • Application Registration and Messaging Passing

The Jabber protocol relies on a layer of XML streams to send messages to different users. It is fully extensible, providing different namespaces for users to add new functionality for communicating. For Capybara, we will be making use of some of the custom messaging features to send notification messages to different users on the Jabber server.

What are notification messages? Let's begin with a use case. Imagine that you are downloading a file in Squeak using a FTP client. The file that you are downloading is going to take a couple of minutes to download. You want to be notified of when the file completes its download but you do not want to monitor it yourself. Enter Capybara. By registering the FTP client with Capybard and hooking up a file complete notification, the user will automatically be notified when a file completes via a discrete message box at the top right corner of the screen.

Or as another case. Assume that you are using the IRC client in Squeak. If you have ever used IRC before, you know that the "signal to noise ratio" is pretty low. Most of the time you will not be interested in what the chatters are saying. However, if someone mentions a word that you are interested in, you would like to be notified of this. Enter Capybara. By registering the IRC application with Capybard and hooking up the detection of words to it, Capybara will send you a notification everytime the word you are interested in appears in the window.

What about network notifications? Imagine that you and you colleague are programming something. And you would like a notification everytime he changes some file. No problem. Register that file with Capybara and everytime the file changes, it send a notification to those interested in it via the Jabber protocol

Basically, Capybara is going to be the Observer pattern with a slight twist. Applications can register notifications with Capybara and hook up different events where the user can be notified. To prevent an overload of notification propagation, there will be a preference pane where the user can select the different notifications he is interested in for each application. Also, the user can change the priority of the notifications and whether those notifications will persist or not.

In short, Capybara will be an application agnostic (any squeak object can register with it and hook up with it) framework for local and network notifications. We plan to make Capybara modular enough so that you can easily plug in new modules for it. For instance, the displaying of notifications can be modularized so that users can write their own display notifications if they choose. Squeak makes this extremely easy because all objects can send the #changed selector

Why use Capybara? It makes life easier for the user. Instead of each application worrying about creating its own way of notifying users of particular events, we provide the framework for them to do so. The user benefits as well since all notifications can now be consistent across applications. It is very confusing for the user when notifications for different applications pop up at different areas of the screen and they have no control over it.

Since this is a class about design, here is some preliminary design decisions:

  • Capybara itself will use the Singleton pattern. Only one instance of Capybara will be created and it will run in its own thread.
  • Capybara will make use of a form of the Observer pattern where applications will send notifications of their changes to Capybara for displaying.
  • Capybara will also make use of the Strategy pattern for its notifications. Users can easily switch the different notification schemes because each notification basically encapsulates
  • Capybara will make use of the Template Method since each notification will have to support a certain methods.
  • Capybara will use the Facade pattern by making a simple API for developers and users who are interested in using Capybara to register and hook up their application without worrying about the internals of how it is done.

There will be many more uses for Capybard and we have only shown some of the common examples where users may benefit from it.

Some of these ideas have been influenced by two very useful programs for the mac. You might want to visit those sites if you are still unclear with what Capybara is all about.

REFERENCE:
Growl http://growl.info/
LanOSD http://oomz.net/Lanosd/

Uploaded Image: Capybara Architecture.jpg

SOURCE FILES:
Capybara-UI-5-12.st
Capybara-Testing-5-12.st
Capybara-JabTalk-5-12.st
Capybara-Application-5-12.st
Capybara-5-12.st

SAMPLE REGISTERED APPLICATIONS:
Network-Url-5-12.st
MCInstaller-5-12.st

README: capybara README.pdf

To Run: CapybaraUserInterface open.

Monticello Repository: /home/spring06proj/jabtalk

For more information, go to our wiki http://cheahcf.com:8080/Jabtalk



Discussion

When I google "squeak jabber", I get a bunch of pages. Don't any of these projects work? You should do something new. -Ralph Johnson

After checking out most of the results for "Squeak Jabber" from Google, it seems that there is really only one implementation for Squeak (the other hits are merely links to this one). It can be found at http://map1.squeakfoundation.org/package/8a78ec9e-162d-438c-80c1-5e5f8eb10ce8. There might be a couple of implementation for VisualWorks. - Chen, Nicholas

Link to this Page

  • Class projects last edited on 2 April 2008 at 5:20:59 pm by vpn3-144241.near.uiuc.edu