Notification Services in SQL Server 2005
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.
Terminologies in Notification services
- Subscriber is a person or application that subscribes to and receives notifications.
- Subscription is a request for specific information to be sent to an e-mail address or a device.
- Event is a piece of information that the subscriber may be interested in. The triggering event can be something like an increase or decrease in the price of a stock.
- Notification is a message that contains information about the triggering event.
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
- A simple yet powerful Notification Services programming framework that enables the user to quickly create and deploy notification applications. An application can be developed using XML or Notification Services Management Objects (NMO).
- A reliable, high-performance, scalable engine that runs notification applications. The Notification Services engine is built on the Microsoft .NET Framework and SQL Server 2005.
- Notification Services enable the application to send notifications to its subscribers. The notification can include critical information. These subscribers can be customers, employees, or partners.
- Notification Services help subscribers by providing them with timely, customized, and personalized services.
- Notification applications allow users to communicate with mobile subscribers over a wide variety of devices.
- Notification Services keep subscribers alert by providing them with information whenever and wherever they need it. This helps businesses be more productive.
Notification Services Architecture
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:
1. Subscription Management Architecture
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:
2. Event Collection Architecture
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:
- The event object API uses the Event and EventCollector objects to submit individual events. Using the names of the fields in an event table, an application submits an Event object to the event collector, which then writes the data to the event table.
- The XML API provides a way to bulk load XML data. The XML event provider collects an XML document or stream from an event source and submits the data to the XML EventLoader, which then writes the events to the event table.
- The SQL Server API uses stored procedures to load event data from database objects.
Pages: 1 2