Scheduled Subscriptions in the Music Store Application


At this point, of the two kinds of subscriptions that the music store application is supposed to support, we've implemented only one: subscriptions by artist name. The initial design said that the application will also support subscriptions by genre. Using this second kind of subscription, subscribers interested in a particular genrefor example, jazzcan request to be notified whenever any song of that genre is added to the music store.

Because subscriptions by genre will be matched by many more songs than the subscriptions by artist (genre is a less-selective criterion than artist name), we said that the genre subscriptions should be scheduled, rather than event triggered. Each subscription will specify a recurring schedule on which it should be evaluated. For example, a subscription might say, "Notify me at 5:00 p.m. every weekday about any new jazz songs added to the music store." Rather than evaluate the subscription whenever new events arrive, SQL-NS will evaluate it only on the schedule specified.

In this chapter, we implement the music store application's subscriptions by genre, using the built-in SQL-NS support for scheduled subscriptions. Before defining the actual subscription class, we have to modify the application to maintain the state information that the scheduled subscription matching logic requires. Then we'll implement the scheduled subscription class schema and match rule and test the application with sample data.




Microsoft SQL Server 2005 Notification Services
Microsoft SQL Server 2005 Notification Services
ISBN: 0672327791
EAN: 2147483647
Year: 2006
Pages: 166
Authors: Shyam Pather

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net