English 中文(简体)
Spring Batch - Overview
  • 时间:2024-12-22

Spring Batch - Overview


Previous Page Next Page  

Batch processing is a processing mode which involves execution of series of automated complex jobs without user interaction. A batch process handles bulk data and runs for a long time.

Several Enterprise apppcations require to process huge data to perform operations involving −

    Time-based events such as periodic calculations.

    Periodic apppcations that are processed repetitively over large datasets.

    Apppcations that deals with processing and vapdation of the data available in a transactional manner.

Therefore, batch processing is used in enterprise apppcations to perform such transactions.

What is Spring Batch

Spring batch is a pghtweight framework which is used to develop Batch Apppcations that are used in Enterprise Apppcations.

In addition to bulk processing, this framework provides functions for −

    Including logging and tracing

    Transaction management

    Job processing statistics

    Job restart

    Skip and Resource management

You can also scale spring batch apppcations using its portioning techniques.

Features of Spring Batch

Following are the notable features of Spring Batch −

    Flexibipty − Spring Batch apppcations are flexible. You simply need to change an XML file to alter the order of processing in an apppcation.

    Maintainabipty − Spring Batch apppcations are easy to maintain. A Spring Batch job includes steps and each step can be decoupled, tested, and updated, without effecting the other steps.

    Scalabipty − Using the portioning techniques, you can scale the Spring Batch apppcations. These techniques allow you to −

      Execute the steps of a job in parallel.

      Execute a single thread in parallel.

    Repabipty − In case of any failure, you can restart the job from exactly where it was stopped, by decouppng the steps.

    Support for multiple file formats − Spring Batch provides support for a large set of readers and writers such as XML, Flat file, CSV, MYSQL, Hibernate, JDBC, Mongo, Neo4j, etc.

    Multiple ways to launch a job − You can launch a Spring Batch job using web apppcations, Java programs, Command Line, etc.

In addition to these, Spring Batch apppcations support −

    Automatic retry after failure.

    Tracking status and statistics during the batch execution and after completing the batch processing.

    To run concurrent jobs.

    Services such as logging, resource management, skip, and restarting the processing.

Advertisements