Batch Processing Patterns

1. Chunk-Oriented

This is a pattern that is divided into an ItemReader that receives input one record at a time from a DB or file, an ItemProcessor that processes the business logic one record at a time, and an ItemWriter that outputs the result.

chapter1 chunked oriented
Figure 1. Multi-record processing method (Chunk-Oriented)
  • The general form of a single Step consists of an ItemReader, ItemProcessor, and ItemWriter.

  • Within one transaction, data is read once and then written in units of the specified commit-interval (chunk).

  • For example, if the commit interval is set to 100, based on the input data, the ItemReader and ItemProcessor process 100 records of data, and then the chunk passed to the ItemWriter is written to the DB or file, after which the corresponding transaction is committed.

2. Tasklet

This is a pattern used in batches that perform simple DB CRUD operations or must be committed/rolled back at once.

chapter1 tasklet
Figure 2. Tasklet
  • This is a Step type used when implementing simple tasks (such as executing a single DB CRUD statement) or business logic composed of one transaction, and it is implemented using the Tasklet interface, which has the execute() method.

  • Unlike chunk-oriented processing, which performs transaction processing in chunk units within a Step in a batch Job, it has a structure in which only a single transaction is performed when the Step is executed, and it can be used when processing input data with commit/rollback at once.

SWLab Bankware Global
  • 전체
  • BXM
  • BXCM
  • BXCP
  • BXI
제품 선택 시 더 정확한 매뉴얼 가이드를 제공해드립니다.

Copyright© Bankwareglobal All Rights Reserved.