Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is still mostly a rough sketch, but the big outlines are there:

There are three main packages: pub, sub and hub.

The pub package is basically just a single utility class for pushing notifications to a hub.

The hub package contains the Hub class. This is a general business controller that is intended to allow you to build a servlet around it with a very, very thin veneer, but you could also use it to drive an XMPP or JMS version too. It is basically built by composition of a number of classes, for which there are some default implementations: A Verifier, which makes the callback to verify new subscriptions, the HubDAO which stores the current subscriptions and subscriber statistics, and a Notifier which actually sends notifications to the subscribers. There are a couple of implementations of each of these (though the JPA HubDAO is still in process). Mostly the implementations for the Verifier and Notifier support threadpooling or no-threads (for App Engine use).

I have just started sketching out the sub package, but it basically has a "Subscriptions" class that will take in notifications (using the same "thin veneer" pattern that the Hub class uses). It is also constructed with some impls: A SubscriptionDAO that stores you current subscription information, a FeedFetcherCache that holds the received data, and a Requester that makes the subscription requests to hubs.

I am hoping to have a basic end to end example working sometime in the next week or so, but if anyone wants to look over what is there, feel free.