SQL Server 2008 - Worth the Wait
SQL Server Notification Services is used for developing and deploying applications that generate and send notifications. Notifications are personalized messages sent to a device that subscribes to them. A subscription defines the preference of the subscriber for a specific type of event. For example, a subscriber can specify a preference to the notification application such as "Notify me when new content is added to the Web site." The notification application in this example is the Web site. The subscriber could be the editor of the Web site or someone responsible for managing its content. The triggering event is the addition of new content. Thus, a notification will be sent to the subscriber when the triggering event occurs. The notification can be scheduled on a weekly, daily, or hourly basis. SQL Server Notification Services can be used to send a notification to a wide variety of devices, such as a subscriber's cell phone, personal digital assistant (PDA), Windows Messenger or e-mail account.
The basic operation of the Notification Services application can be illustrated as follows:
Notification Services can be built and deployed quickly. The Notification Services are capable of scaling to millions of subscribers. Notification Services consists of
The Notification Services platform provides an interface for collecting subscribers and subscriber data, and contains components that collect events and generate, format, and distribute notifications. The user can also create custom components for doing these functions.
The various components in Notification Services are:
Subscription management is the process of managing the subscriber, subscription, and subscriber device data. This function is performed by the subscription management interfaces. Subscriber Management objects and views help in the interface development process. The Subscription management interface is usually an ASP.NET Web application. This application is developed using a subscription management API. This API is used to add, update, or delete subscribers, subscriber devices, and subscriptions.
The following diagram shows how a subscription management interface interacts with the Notification Services.
The subscriber and the subscriber device data are stored in the instance and database subscription data in the application database. When a Notification Services application is running, applications typically use the subscription data to generate notifications, and then use the subscriber and subscriber device data to format and distribute the notifications.
When a Notification Services instance is created, Notification Services add three Subscription Management Views that are used to manage subscriber, subscriber device and subscription data. The views are named as follows:
This is the process of gathering event data from the sources and submitting it to the notification application. The sources could be XML files, databases, or applications. This job is usually done by the event providers. Event providers use the APIs to submit the information to the notification application. The APIs can be event APIs, XML APIs, or SQL Server APIs. The Event Collection Architecture can be illustrated as follows:
The following are ways in which the events are written to the Events table: