Chapter 5: Notification Services


Notification Services was first introduced in 2002 as a web download for SQL Server 2000. With SQL Server 2005, Notification Services has been added as a new subsystem to the base product. Notification Services is a framework that enables you to develop custom messaging applications that are able to push customized information to multiple subscribers and devices. Notification Services is used by a variety of well-known companies to deliver personalized information to their customers. For instance, MSN mobile uses Notification Services to send personalized news and other information to a variety of mobile devices. Another well-known Notification Services implementation can be found at ESPN.com, which provides a service that subscribers can use to find sports scores. SQL Server 2005’s Notification Services allows you to build these same types of notification-style applications. While you can build notification applications from scratch, SQL Server 2005’s Notification Services gives you a big head start on this type of project by providing a robust, scalable, and tested framework that you can use as the basis for your own notification applications.

In this chapter, you’ll learn about the new Notification Services subsystem. In the first part of this chapter, you’ll get an overview of this new subsystem. Next, you’ll learn about how you go about building Notification Services applications. To begin with, you’ll get an overview of the development process and then see some sample code that illustrates how the Notification Services framework is used to build notification-style applications.

Notification Services Overview

A Notification Services application is a software layer that sits between an information source and the intended recipient of that information. The Notification Services application monitors certain predefined events and can intelligently filter and route the information about those events to a variety of different target devices using a personalized delivery schedule. Notification Services applications consist of three basic components: events, subscriptions, and notifications. Figure 5-1 provides a very high-level overview of a Notification Services application.

image from book
Figure 5-1: Notification Services overview

Events

In a Notification Services application, events are just what they sound like—things happening that you want to be informed about. In the case of the ESPN.com example, an event might be something like the final scores of some sporting event. For NASDAQ, an event might be a given stock price rising to a certain level. With SQL Server 2005’s Notification Services, events are stored as rows in a table in the Notification Services database.

Subscriptions

Subscriptions are how the users of a Notification Services application tell the system about the type of events that they are interested in. For example, with the sports-based Notification Services example, a user might create a subscription to get the final scores of the Los Angeles Lakers games. In the stock prices Notification Services example, a user might create a subscription to be notified when the price of Microsoft stock climbs over a $50 per share. SQL Server 2005’s Notification Services stores subscriptions, like events, as rows in a table.

Notifications

A notification is essentially a message that will be sent to the end user that contains the information regarding the event that the user subscribed to. For the ESPN notification services example, this might be an e-mail message that your favorite team defeated their rivals and what the final score was. Notifications can be delivered in various formats to a variety of different target devices.

Notification Engine

The job of the Notification Services application is to monitor the external events and to look for matches between events and the registered subscriptions. When an event matches a subscription, the Notification Services engine sends a notification to the end user. The scalability of a Notification Services application depends in large part on how well the Notification Services engine matches events to subscriptions. Microsoft has designed the underlying Notification Services framework to be scalable at an Internet level, meaning that with the appropriate platform, SQL Server 2005’s Notification Services can scale upward to handle millions of events, subscriptions, and notifications. To do that, Notification Services takes advantage of SQL Server 2005’s extremely efficient relational database engine to join the rows from the events table with the rows in the subscriptions table in order to match events to subscriptions.




Microsoft SQL Server 2005 New Features
Microsoft SQL Server 2005 New Features
ISBN: 0072227761
EAN: 2147483647
Year: 2005
Pages: 80
Authors: Michael Otey

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