Foreword | p. xiii |
About the Author | p. xv |
About the Technical Reviewer | p. xvii |
Acknowledgments | p. xix |
Introduction | p. xxi |
The Service Broker Programming Model | |
Fundamentals of Message-Based Processing | p. 3 |
Message Concepts | p. 4 |
Message Anatomy | p. 4 |
Messaging in Daily Life | p. 5 |
Why Messaging? | p. 5 |
Asynchronous Message Processing | p. 6 |
Deferred Message Processing | p. 6 |
Fault Tolerance | p. 7 |
Distributed Systems | p. 7 |
Messaging Problems | p. 8 |
Performance | p. 8 |
Queue Reader Management | p. 9 |
Transaction Management | p. 10 |
Message Sequencing and Correlation | p. 10 |
Maintenance | p. 11 |
Messaging Architectures | p. 12 |
SOA | p. 12 |
SODA | p. 12 |
Available Messaging Technologies | p. 13 |
MSMQ | p. 13 |
Queued Components | p. 14 |
BizTalk Server | p. 14 |
XML Web Services | p. 14 |
WCF | p. 14 |
Summary | p. 15 |
Introduction to Service Broker | p. 17 |
Conversations | p. 17 |
Dialogs | p. 17 |
Dialog Lifetime | p. 18 |
Conversation Groups | p. 19 |
Message Sequencing | p. 20 |
Reliable Delivery | p. 20 |
Error Handling | p. 21 |
Anatomy of a Service | p. 21 |
Message Types | p. 23 |
Contracts | p. 23 |
Queues | p. 24 |
Service Programs | p. 25 |
Routes | p. 25 |
Security | p. 25 |
Transport Security | p. 25 |
Dialog Security | p. 26 |
Message Processing | p. 27 |
Performance | p. 29 |
Benefits | p. 30 |
Summary | p. 30 |
Service Broker in Action | p. 31 |
Defining Service Broker Applications | p. 31 |
Message Types | p. 32 |
Contracts | p. 36 |
Queue | p. 39 |
Service | p. 41 |
Sending Messages | p. 45 |
Retrieving and Processing Messages | p. 51 |
Retrieving Messages | p. 53 |
Processing Messages | p. 55 |
Error Handling | p. 59 |
Error Handling in Service Programs | p. 59 |
Poison-Message Handling | p. 63 |
Ending Conversations with Errors | p. 66 |
Summary | p. 68 |
Service Broker Activation | p. 69 |
Activation Basics | p. 69 |
Startup Strategies | p. 70 |
When Is Activation Needed? | p. 71 |
Internal Activation | p. 72 |
Controlling Message Throughput | p. 79 |
Stored-Procedure Signing | p. 82 |
Calling a Stored Procedure in Another Database | p. 90 |
Using a Single Stored Procedure to Process Many Queues | p. 94 |
External Activation | p. 97 |
Parallel Activation | p. 112 |
Troubleshooting Activation | p. 117 |
When the Activated Stored Procedure Doesn't Run | p. 117 |
When Messages Remain on the Queue | p. 117 |
Summary | p. 118 |
Service Broker with Managed Code | p. 119 |
The Managed Assembly | p. 119 |
Architecture and Design of the Managed Assembly | p. 123 |
Building a Managed Service Broker Client | p. 129 |
Building a Managed Service Program | p. 133 |
Derive Your Service Class | p. 134 |
Implement an Entry Point | p. 134 |
Implement Message Type Handling | p. 136 |
Deploy the Assembly | p. 136 |
Register the Managed Stored Procedure | p. 138 |
Configure the Service Broker Activation | p. 139 |
Using the Service Program | p. 139 |
A Practical Example | p. 142 |
Summary | p. 150 |
Locking and Transaction Management | p. 151 |
Conversation Groups and Locks | p. 151 |
State Handling | p. 158 |
Get Conversation Group | p. 159 |
The Receive Loop with State Handling | p. 160 |
State Handling with a Managed Stored Procedure | p. 164 |
A Practical Example | p. 170 |
Compensation Logic with Service Broker | p. 198 |
Transaction Management | p. 204 |
Basic Receive Loop | p. 204 |
Measuring Performance | p. 205 |
Batched Commits | p. 208 |
Cursor-Based Processing | p. 210 |
Set-Based Processing | p. 213 |
Binary Payload | p. 216 |
Summary | p. 219 |
Distributed Service Broker Applications | p. 221 |
Communication | p. 221 |
Service Broker Protocols | p. 222 |
Sending a Message | p. 222 |
Routing | p. 224 |
Routing Algorithm | p. 225 |
Managing Routes | p. 226 |
Distributed Applications | p. 228 |
The Application | p. 228 |
Setting Up Routes | p. 229 |
Establishing a Communication Channel | p. 232 |
Setting Up Security | p. 236 |
Summary | p. 249 |
Advanced Service Broker Programming | |
Advanced Distributed Service Broker Programming | p. 253 |
Transport Security | p. 253 |
Local Route | p. 254 |
Transport Route | p. 255 |
Dialog Security | p. 257 |
Service Broker Security Protocol | p. 257 |
Configuration | p. 259 |
Encryption | p. 268 |
Transport Encryption | p. 269 |
Dialog Encryption | p. 270 |
Recommendation | p. 271 |
Transport Protocol | p. 271 |
Setting Up Tracing | p. 271 |
The Captured Service Broker Message | p. 273 |
Replaying Service Broker Messages | p. 276 |
Replacing Certificates | p. 276 |
Transport Security | p. 276 |
Dialog Security | p. 277 |
Service Listing Manager | p. 277 |
Exporting a Service Listing | p. 279 |
Importing a Service Listing | p. 281 |
Summary | p. 284 |
Service-Oriented Database Architecture | p. 285 |
Service-Oriented Database Architecture | p. 285 |
SOA | p. 286 |
Reasons for SODA Architectures | p. 287 |
Requirements for a SODA Service Provider | p. 288 |
Data in SODA | p. 288 |
Outside Data | p. 289 |
Inside Data | p. 290 |
SODA Features in SQL Server 2005 | p. 292 |
XML Support | p. 292 |
Native Web Services | p. 295 |
SQLCLR | p. 307 |
Query Notifications | p. 316 |
Summary | p. 327 |
Real-World Application Scenarios | p. 329 |
Asynchronous Triggers | p. 329 |
Defining the Problem | p. 330 |
Implementing the Trigger | p. 331 |
Creating the Service Broker Infrastructure | p. 333 |
Writing the Service Program | p. 334 |
Batch Frameworks | p. 337 |
Creating the Service Broker Infrastructure | p. 338 |
The Implementation of the Batch Framework | p. 339 |
Extending the Batch Framework | p. 345 |
Publish-Subscribe Frameworks | p. 348 |
Defining the Infrastructure | p. 349 |
Applying Publisher Logic | p. 351 |
Publishing Information | p. 356 |
Priority-Based Message Processing | p. 358 |
Implementing Priority-Based Messaging | p. 358 |
Reliable Web Service Requests | p. 371 |
Service Broker Infrastructure | p. 372 |
Implementation of the Web Proxy | p. 376 |
Using the Web Proxy in a Smart Client | p. 388 |
Summary | p. 393 |
High Availability and Scalability | p. 395 |
Database Mirroring | p. 395 |
Implementation Details | p. 396 |
Setting Up Database Mirroring | p. 397 |
Using Service Broker with Database Mirroring | p. 402 |
Load Balancing | p. 404 |
Service Deployment | p. 405 |
Initiator Configuration | p. 406 |
Message Forwarding | p. 408 |
Reliable Delivery | p. 408 |
Security | p. 408 |
Network Topology Abstraction | p. 409 |
Centralized Routing Instance | p. 410 |
Work Distribution | p. 410 |
Using Message Forwarding | p. 411 |
Monitoring Message Forwarding | p. 415 |
Configuration Notice Service | p. 416 |
Implementing Dynamic Routing | p. 417 |
Implementing the Configuration Notice Service | p. 417 |
Summary | p. 422 |
Administration | p. 423 |
SQL Profiler | p. 423 |
Using SQL Profiler | p. 425 |
System Monitor | p. 428 |
SQL Server Management Objects | p. 432 |
Creating Service Broker Objects | p. 434 |
Retrieving Information | p. 435 |
Summary | p. 436 |
Index | p. 437 |
Table of Contents provided by Ingram. All Rights Reserved. |
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.