Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

BizTalk 2009 : Implementing a Scatter or Gather Pattern

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
8/6/2012 6:23:43 PM
One of BizTalk's many powerful features is its ability to loosely couple messages, which allows for the subscription-based processing of messages. The ability to route messages based upon content filters makes BizTalk a natural fit for the Scatter/Gather pattern.

The Scatter/Gather pattern is a method for broadcasting and processing messages in parallel. The "scatter" portion distributes a series messages all at the same time, and then an aggregator "gathers" the messages back into the main response before continuing. Figure 1 shows an example.

Figure 1. Example of data flow within a Scatter/Gather pattern

Figure 1 shows a Get Data Request being received. An orchestration "scatters" the request to multiple solicit-response send ports in parallel. The orchestration waits for all responses to be received and aggregates them back into a single Get Data Response message, which is sent back to the requestor.

The key to having BizTalk scatter the requests to multiple backend systems is its ability for send ports to be bound by subscription filters. This allows an orchestration to send one message to the Messagebox via direct binding and have one or more send ports process the request in parallel. With BizTalk's ability to scale across multiple hosts, this pattern can also provide significant performance benefits.

This type of pattern is especially useful for executing identical requests to multiple backend systems. For example, say a customer calls into a call center to retrieve information about all their loans at a bank. The following scenario shows how this pattern could be leveraged:

  1. A customer calls the bank's call center.

  2. The interactive voice response (IVR) system prompts the caller for their account number.

  3. An orchestration is started and simultaneously scatters requests to each of the mortgage, line of credit, and loan backend systems.

  4. Each system responds with their respective data, and the orchestration gathers the responses into a single response.

  5. The customer service representative sees an aggregated view of all systems on their screen.

Figure 6-28 shows a collapsed view of the orchestration that implements the pattern to support this scenario.

The orchestration shown in Figure 2 has the following major sections:

  • A request shape to receive the request from the calling IVR application

  • A Scatter scope that submits a direct "GetLoanInfo" message to the Messagebox where three send ports, one for each backend system, are subscribed to this message schema

  • A construct message shape to create the initial response message

  • A Gather scope that receives the responses from the backend systems and aggregates them into the response template message

  • A send shape to send the aggregated content back to the IVR system

Figure 2. Example collapsed Scatter/Gather orchestration

Figure 3 shows the expanded Scatter scope.

Figure 3. Scatter scope

The Scatter scope is quite simple. It creates a new backend message type and sends the message to a send port via direct binding to the Messagebox. Then, based upon send port subscriptions, there are many recipients of the message, therefore causing multiple messages to be processed. In addition, each send port could have a map associated with it to further transform the message to a schema format required by the backend application.

Once the message has been sent, an empty response message is created, shown in Figure 4, that will ultimately be used to hold all the aggregated result data.

Figure 4. Response message creation

Now that the messages have been sent and the response message is ready, you can start gathering the responses and aggregating them together. Figure 5 shows the expanded Gather scope.

Figure 5. Gather scope

The Gather scope performs the following functions:

  • Loops until all messages are received.

  • Listens for a correlated message to be received.

  • Appends the received message to the response message.

  • If all messages aren't received by the time the delay time occurs, the listen shape is exited.

Once the Gather scope has completed, a send shape is used to send the aggregated messages back to the calling application to complete the pattern.

As you can see from the sample orchestration, the pattern's concept fits seamlessly with one of BizTalk's core features: content-based routing. By using content-based routing, the orchestration's implementation of the pattern is kept quite simple and straightforward.

Other -----------------
- BizTalk 2009 : Using PGP (part 2) - PGP Decode Component
- BizTalk 2009 : Using PGP (part 1) - PGP Encode Component
- SQL Server 2008 R2 : Implementing Policy-Based Management (part 2) - Creating a Category, Evaluating Policies, Importing and Exporting Policies
- SQL Server 2008 R2 : Implementing Policy-Based Management (part 1) - Creating a Condition Based on a Facet, Creating a Policy
- SQL Server 2008 R2 : Policy-Based Management Concepts
- Active Directory Domain Services 2008 : Add Attributes to Global Catalog Replication, Remove Attributes from Global Catalog Replication
- Active Directory Domain Services 2008 : Add Attributes to Ambiguous Name Resolution Filter, Remove Attributes from Ambiguous Name Resolution Filter
- Windows Server 2003 : Software Update Services (part 2) - The Automatic Updates Client, Configuring Automatic Updates Through Group Policy
- Windows Server 2003 : Software Update Services (part 1) - Configuring and Administering SUS
- Microsoft SQL Server 2008 R2 : Physical server design - Memory configuration
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server