2. Spring Batch is a lightweight, comprehensive batch
framework designed to enable the development of robust
batch applications vital for the daily operations of enterprise
systems.
SPRING BATCH
3. 3
WHAT’S IN
STORE?
1. Introduction
What is a Batch Process?
2. Architecture
Interactions and services
Core concepts
3. Demo
Simple Read write
JMS Read Write
4. Some points to ponder
5. Summary
6. 6
BATCH PROCESS?
• Bulk process
• Long running process
• Mostly sequential
• Once, daily, monthly, yearly, ...
7. 7
REQUIREMENTS OF A BATCH PROCESS
Large data volume—Batch applications must be able to handle
large volumes of data to import, export, or compute.
Automation—Batch applications must run without user
interaction except for serious problem resolution.
Robustness—Batch applications must handle invalid data
without crashing or
aborting prematurely.
Reliability—Batch applications must keep track of what goes
wrong and when(logging, notification).
Performance—Batch applications must perform well to finish
processing in a dedicated time window or to avoid disturbing any
other applications running simultaneously.
9. 9
HOW BATCH APPLICATIONS FIT IN TODAY’S
SOFTWARE ARCHITECTURES
• Every day, large and complex calculations take place to index billions of documents,
using cutting-edge algorithms like MapReduce.
• Even in our event- and notification-driven world, batch applications are still
relevant!
• Databases
Batch processing is also used for efficient bulk database updates and automated
transaction processing, as contrasted to interactive online transaction processing
(OLTP) applications. The extract, transform, load (ETL) step in populating data
warehouses is inherently a batch process in most implementations.
• Conversions
Batch processing may also used for converting computer files from one format to
another. For example a batch job may convert proprietary and legacy files to
common standard formats for end-user queries and display.
11. 11
BASIC ARCHITECTURE
ItemReader:
retrieve input data from datasource(file, database, queue, etc.)
ItemProcessor:
transform input data to output data
ItemWriter:
persist output data to data store
22. SUMMARY
Spring Batch provides infrastructure
that focus on business logic
POJO programming with DI
Light weight
easily embedded to existing
application
reuse existing libraries