Notification Formatting and Delivery Architecture
In Notification Services, notification formatting and distribution is the job of the distributor. After the generator creates a batch of notifications, the distributor separates the batch into work items, with each work item destined for the same delivery channel. The distributor then sends the work item to the content formatter. When formatting is complete, the distributor sends the notifications to the delivery endpoint specified by the delivery channel.
Message Formatting
Part of creating an application is defining how raw notification data is transformed into readable messages. Notification Services includes a standard Extensible Stylesheet Language Transformation (XSLT) content formatter, which requires one XSLT file for each device type and locale supported by the application. You can also develop custom content formatters that format your notifications as appropriate based on the device and locale.
The formatted message can contain a combination of raw notification data, data that is computed at formatting time, and text added by the content formatter. These options allow for professional-looking and user-friendly message text as well as URLs or other links.
Delivery Channels
Notification Services itself does not handle the final delivery of notifications. Instead, Notification Services uses delivery channels, which are like pipes to delivery services such as Simple Mail Transfer Protocol (SMTP) servers. Notification Services sends the notifications to one or more delivery channels. Each delivery channel in turn packages the notifications for its protocol and then sends them to the delivery services. The delivery services handle the final delivery to the subscribers.
You configure delivery channels for the Notification Services instance. All applications hosted by the instance share the delivery channels.
Each delivery channel uses a specific delivery protocol to a specific delivery endpoint. Notification Services includes the following common protocols:
- The SMTP protocol for sending notifications to Microsoft Exchange Server or other SMTP servers.
- The extensible HTTP protocol, which can be used for Simple Object Access Protocol (SOAP), Short Message Service (SMS), .NET Alerts, and other HTTP-related protocols.
- The File protocol for sending notifications to operating system files, which is used primarily for debugging applications.
If necessary, you can define multiple delivery channels for a single delivery protocol.
You can develop custom delivery protocols if you want to support other types of devices or want to use specific SMTP or File features.
For more information about standard and custom protocols, see Standard Delivery Protocols and Developing a Custom Delivery Protocol.
Tracking and Retrying Notification Distribution
To support delivery retry, performance monitoring, and troubleshooting, Notification Services retains notification delivery information. Delivery channels invoke a delivery channel callback to report delivery successes and failures for individual notifications. The callback updates the notification table to reflect the success or failure of each notification. You can view delivery status using the NSNotificationClassNameNotificationDistribution view or the Notification Services stored procedures.
For each type of notification you send, you can configure a retry schedule. For more information, see Specifying Delivery Protocol Execution Settings.
Delivery Options
In addition to standard notification-by-notification formatting and delivery, Notification Services offers two options: digest delivery and multicast delivery.
- If multiple notifications are likely to be sent to individual subscribers, such as price information for multiple stocks, you can use digest delivery to group notifications into a single message. A subscriber's notifications within a notification batch can be grouped and sent as a single message. Digest delivery can reduce the formatting and distribution load on the system.
- If an application produces notifications that tend to be the same for many subscribers, such as sport scores or weather reports, you can use multicast delivery. Multicasting formats notifications once and then sends them to multiple subscribers, which improves performance by reducing the formatting load on the system.
See Also
Concepts
Defining Delivery Channels
Specifying Digest or Multicast Delivery
Subscription Management Architecture
Event Collection Architecture
Subscription Processing Architecture
Other Resources
Configuring Delivery Protocols
Notification Services Stored Procedures (Transact-SQL)