Shyam Pather was the Development Lead on the SQL Server 2005 Notification Services team at Microsoft. He joined the Notification Services team when it was formed in late 2000, made key contributions to the product's design and architecture, and implemented several components of the Notification Services compiler and execution engine. Since the first public release of SQL Server Notification Services in August 2002, Shyam has delivered numerous technical talks about notification application development, deployment, and administration at various conferences.
Before joining the SQL Server group, Shyam worked in the Windows Networking organization at Microsoft. As a developer on the Universal Plug and Play (UPnP) team, he helped define the UPnP 1.0 Device Architecture and implemented the UPnP Control Protocol in Windows XP. Prior to working on UPnP, Shyam was a developer in the Windows Network Driver Infrastructure team, working on Raw Channel Access and a unified driver model for voice and data.
After SQL Server 2005 shipped, Shyam moved to Microsoft's Data Programmability team to work on the next generation of data access APIs. He currently runs a small development team building object-relational mapping technology.
Shyam lives in Seattle, Washington. He can be reached via email at spather@microsoft.com or through his website, http://pather.net/shyam.
IntroductionIntroduction
A business traveler's cell phone beeps; he's received a text message informing him that his flight's departure gate has been changed. A system administrator receives a message on her pager alerting her that a critical server has gone down. An inventory manager at a grocery store gets an email telling him that the stock level for a popular product has dropped below the threshold for reordering.
These are examples of personalized notifications reaching people when the information is most relevant, on whatever device they have available. In today's information-driven world, notifications such as these have real business value. Timely information can attract customers, make employees more productive, and enable agile decision making. The software systems that generate and deliver these notifications extend the reach of information beyond the corporate desktop.
Building notification software presents several challenges. Every day, people are bombarded with an overload of irrelevant information. For a notification system to add value, it must deliver only targeted, focused information based on the needs and preferences of each user. Doing this correctly requires sophisticated matching and filtering capabilities.
Also, notification systems must be reliable because they're often used to deliver mission-critical alerts. They must be scalable so that they can support millions of users and high volumes of data, without requiring excessive hardware. They must be manageable and fit seamlessly into an existing IT infrastructurethey must not burden the operators who maintain them. Most importantly, notification systems must be secure.
Microsoft SQL Server 2005 Notification Services is a platform for building notification applications that meet all these requirements. It provides a reliable, manageable, secure base for your applications, with a rich, scalable matching engine that can filter an information stream based on the subscriptions of millions of users.
Notification Services offers a simple, declarative programming model that lets you build your application with much less development effort than would be required if you were building it from scratch. Using this programming model, you can get a working prototype of a typical application running in just a single day. Furthermore, the platform offers a number of sophisticated features, such as support for multiple languages and device types, scheduled subscriptions, user-defined matching logic, and multicast delivery, that you can incorporate into your applications by setting a few options. These kinds of beyond-the-obvious features set the most advanced notification applications apart from the rest.
This book is about building notification applications with Microsoft SQL Server 2005 Notification Services. It covers general Notification Services concepts, describes specific coding techniques used to build applications, and walks you through the process of developing a sample application, from the initial design and prototype to final deployment and administration. In addition to the basics, it covers more advanced concepts for developers who want to get the most out of the Notification Services functionality.
Who Should Read This Book
This book is aimed primarily at developers wanting to learn notification application development with Microsoft SQL Server Notification Services. It assumes some familiarity with SQL and XML but no prior background in Notification Services. The book also contains material on deployment, administration, and troubleshooting (Chapter 13, "Deploying a SQL-NS Instance"; Chapter 14, "Administering a SQL-NS Instance"; and Chapter 15, "Troubleshooting SQL-NS Applications") relevant to administrators and IT operators (in addition to developers).
Chapters 710 and Chapters 1618 describe using managed code to build subscription-management interfaces, custom components that extend the Notification Services framework, and applications that embed Notification Services functionality. C# is used in the examples, but all .NET languages are supported. The material in these chapters assumes some familiarity with C#, the .NET Framework, and object-oriented programming.
Teaching Approach
I'm a firm believer that the best way to teach is by example. In this book, I generally explain new concepts in high-level terms first and then go into practical code examples that show those concepts in use. In all cases, the examples form part of a working application you can run.
This book is designed to complement, rather than replace, the Notification Services Books Online (the electronic documentation that comes with the product). Books Online provides a thorough reference to every Notification Services command, programming construct, and configuration option. This book does not attempt to duplicate this reference information. Instead, this book is a guide that shows you how, when, and why to use the various aspects of Notification Services in real scenarios. My expectation is that you will use this book to learn the concepts and work through practical examples, but refer to the Books Online for exact syntax details, usage restrictions, and other detailed reference information.
When providing instructions throughout this book, I've chosen to err on the side of being too specific, rather than not specific enough. In many cases, I explicitly state steps or commands, even though I know most readers will already be familiar with them. My purpose in doing this is to leave no room for ambiguity. I realize that calling out what may seem like obvious instructions can come across as pedantic, but doing this eliminates potential confusion and misinterpretation. I want every reader to get the most out of this book, and to that end I've tried to be as clear as possible at every step. I consider my readers to be capable software engineering professionals, and the tone of the instructions is never intended to contradict that.
Organization of This Book
This book is divided into five parts:
Part I, "Notification Services Concepts," (Chapters 1 to 4) provides basic background information on notification applications and the Notification Services platform. It provides instructions for getting your development system set up to work with Notification Services and includes a walkthrough of a sample Notification Services application.
Part II, "Notification Services Application Development," (Chapters 5 to 11) covers the specific techniques and tools used to build applications with Notification Services. It describes the development process and the parts of the application that are built at each stage, before taking you through this process with a sample application. In working through the sample application, you learn about the features of the Notification Services platform and how to use them in your own applications.
Part III, "Optimization, Deployment, and Administration," (Chapters 12 to 15) covers the steps you perform after the basic development work is completed, to bring a Notification Services application online in a live production environment. It describes performance-tuning tools and techniques, deployment on various hardware configurations, and the administration and maintenance of a running application. It also includes a troubleshooting guide that provides diagnostic information and suggested solutions for the most common problems encountered in running Notification Services applications.
Part IV, "Advanced Notification Services Concepts," (Chapters 16 to 18) describes some of the more advanced features of the platform, including many of the new features added in the SQL Server 2005 release. It covers the new programming APIs used to perform Notification Services management tasks programmatically and host the Notification Services engine as a component within another application. It also covers the extensions to the programming model for supporting user-defined matching logic in Notification Services applications.
Part V, "Appendix,"...