Share this
Use of integration patterns in batch scenarios
by Raghu Pushpakath on 31 July 2012
The book Enterprise Integration Patterns – Designing, Building and Deploying Messaging Solutionsby Gregor Hohpe and Bobby Woolf (Addison-Wesley) describes a number of patterns for enterprise integration, focusing mainly on messaging concepts. It is interesting to note that many of these patterns can be applied to the batch scenarios as well, especially since the batch processing landscape has changed in the last several years from a traditional sequential processing style into a multi-threaded processing style involving integration with several internal and external systems.
Not so long ago, I used a couple of these patterns while recommending a solution for the architecture for the batch processes in a project. Various batch processes in the project consisted of multiple processing steps and adhered to the following two styles of execution:
- Per-record multi-threaded execution – Every selected record is assigned to a thread in a thread pool and goes through the various steps sequentially. The job ends when all threads join.
- Per-step multi-threaded execution: All selected records execute a given step concurrently via threads in a thread pool. However, these records will go to the next step only after all records finish the previous step.
(In the actual scenarios in the project, the steps were again subdivided into tasks. For the sake of simplicity in this article, I am considering each step as the lowest unit of work). The steps in the batch process were time-consuming. Without putting much extra burden on each step, I had to find a way to extract some information when each step finishes and use this information for purposes such as checkpoints, logging and monitoring.
The approach chosen was to use a wire-tapping mechanism to receive messages from every step with the required information, and then use the recipient list pattern to forward the information to the registered listeners. The Wire Tap is an integration pattern widely used in message-based integration architecture to capture a copy of the messages while they are being forwarded to the ultimate destination. Similarly, the Recipient List pattern is used in the integration domain to route messages to a number of statically or dynamically specified recipients.
The above diagram shows the batch execution styles (a) and (b) modified by incorporating these patterns. From an implementation point of view, a decorator pattern was used to add to each step the responsibility to send messages to the wire tap at the end of the processing.
Interestingly, several other integration patterns may be used in batch architecture. For example:
- Routers allow the data to choose the processing step to be used, based on certain properties or rules.
- Translaters allow the data to be transformed, as required by a given processing step.
- Splitters allow the data to be split and fed into various processing steps concurrently.
- Aggregators allow the data from each concurrent processing step to be combined, for the use of subsequent steps.
But in all these cases, the patterns are used in a data-centric fashion rather than message-centric, mainly because the batch processing tends to be data-focussed, whereas the integration is more message-oriented.
Share this
- Agile Development (89)
- Software Development (68)
- Scrum (41)
- Agile (32)
- Business Analysis (28)
- Application Lifecycle Management (27)
- Capability Development (23)
- Requirements (21)
- Lean Software Development (20)
- Solution Architecture (19)
- DevOps (17)
- Digital Disruption (17)
- Project Management (17)
- Coaching (16)
- IT Professional (15)
- IT Project (15)
- Knowledge Sharing (13)
- Equinox IT News (12)
- Agile Transformation (11)
- IT Consulting (11)
- Digital Transformation (10)
- Strategic Planning (10)
- IT Governance (9)
- International Leaders (9)
- People (9)
- Change Management (8)
- Cloud (8)
- MIT Sloan CISR (7)
- Working from Home (6)
- Azure DevOps (5)
- Innovation (5)
- Kanban (5)
- Business Architecture (4)
- Continuous Integration (4)
- Enterprise Analysis (4)
- Client Briefing Events (3)
- GitHub (3)
- IT Services (3)
- AI (2)
- Business Rules (2)
- Communities of Practice (2)
- Data Visualisation (2)
- Java Development (2)
- Lean Startup (2)
- Scaling (2)
- Security (2)
- System Performance (2)
- ✨ (2)
- Automation (1)
- FinOps (1)
- Microsoft Azure (1)
- Satir Change Model (1)
- Testing (1)
- March 2025 (1)
- December 2024 (1)
- August 2024 (1)
- February 2024 (3)
- January 2024 (1)
- September 2023 (2)
- July 2023 (3)
- August 2022 (4)
- July 2021 (1)
- March 2021 (1)
- February 2021 (1)
- November 2020 (2)
- July 2020 (1)
- June 2020 (2)
- May 2020 (3)
- March 2020 (3)
- August 2019 (1)
- July 2019 (2)
- June 2019 (1)
- April 2019 (3)
- March 2019 (2)
- December 2018 (1)
- October 2018 (1)
- August 2018 (1)
- July 2018 (1)
- April 2018 (2)
- February 2018 (1)
- January 2018 (1)
- September 2017 (1)
- July 2017 (1)
- February 2017 (1)
- January 2017 (1)
- October 2016 (2)
- September 2016 (1)
- August 2016 (4)
- July 2016 (3)
- June 2016 (3)
- May 2016 (4)
- April 2016 (5)
- March 2016 (1)
- February 2016 (1)
- January 2016 (3)
- December 2015 (5)
- November 2015 (11)
- October 2015 (3)
- September 2015 (2)
- August 2015 (2)
- July 2015 (7)
- June 2015 (7)
- April 2015 (1)
- March 2015 (2)
- February 2015 (2)
- December 2014 (3)
- September 2014 (2)
- July 2014 (1)
- June 2014 (2)
- May 2014 (8)
- April 2014 (1)
- March 2014 (2)
- February 2014 (2)
- November 2013 (1)
- October 2013 (2)
- September 2013 (2)
- August 2013 (2)
- May 2013 (1)
- April 2013 (3)
- March 2013 (2)
- February 2013 (1)
- January 2013 (1)
- November 2012 (1)
- October 2012 (1)
- September 2012 (1)
- July 2012 (2)
- June 2012 (1)
- May 2012 (1)
- November 2011 (2)
- August 2011 (2)
- July 2011 (3)
- June 2011 (4)
- April 2011 (2)
- February 2011 (1)
- January 2011 (2)
- December 2010 (1)
- November 2010 (1)
- October 2010 (1)
- February 2010 (1)
- July 2009 (1)
- October 2008 (1)