What this book covers
Chapter 1, Introduction to Sagas, discusses NServiceBus and a basic design pattern that it uses, known as sagas, which is used to save states of messages. We will discuss the benefits of sagas and what it brings to the table with regard to software design.
Chapter 2, NServiceBus Saga Architecture, expands on the uses of sagas for persistence, timeouts, message durability, and message handling. We will discuss various message exchange patterns through examples to include gateway and cluster managing. These are important concepts as they drive the high availability and high performance that NSB brings to the table.
Chapter 3, The Particular Service Platform, is an overview of the Particular website-associated tools for NServiceBus. We will discuss building sagas through the ServiceMatrix tool, which is a Visual Studio extension tool for visually designing NSB endpoints, messages, and services. The other tools that we will discuss at length as they apply to sagas are the ServicePulse to monitor the endpoint availability during production, and ServiceInsight to take a deep dive into the functionality and properties of endpoints, services, and messages as they execute.
Chapter 4, Saga Development, focuses on various useful constructions of sagas and message handlers. The purpose of sagas will be discussed as the discussion goes into the need for extending and coordinating transactional integrity using sagas. The chapter then morphs into a discussion of NServiceBus, using integrated pre-built WCF bridges. While some might consider it unusual to discuss WCF in a saga chapter, sagas become an intermediate for coordinating WCF and NServiceBus work. We can decouple the workflow from the frontend for interaction with backend processes through message handling. Sagas provide the means to persist the state information of the messages. This discussion will also handle other queuing sources as well to include RabbitMQ and ActiveMQ.
Chapter 5, Saga Snippets, discusses two primary saga examples, one using an e-mail, and one using the Secure File Transfer Protocol (SFTP). These samples sill demonstrate the saga workflow and the use of timeouts more in depth. The saga code will be a mediator between a frontend Windows Presentation Framework (WPF) and a backend client executing either an e-mail or SFTP. Using a saga as a mediator between frontend and backend code that will interface into an external server, there will be many added benefits and features. The external server interface, such as an e-mail server or SFTP server, is usually beyond our control and is in the control of external operations or organizations, such as a bank. So, the interface into these servers is all that we have to work with, and as business, software and operational needs increase, we need a framework that is robust enough to meet these demands. Thus, we have NSB and sagas.
Chapter 6, Using NServiceBus in the Cloud, gives an introduction to the cloud with a deeper dive into the Microsoft Azure cloud. The Azure Storage containers and Service Bus will be discussed at length. An Azure Storage example will be discussed, which will work on-premise using the Azure SDK and Azure Storage Emulator. Another example will be given with NSB sagas as it works through Service Bus in the Azure cloud.