Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Spring Batch introduction

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Spring Batch introduction

Overview of 

Spring Batch is a lightweight and complete batch processing framework designed to help enterprises build robust and efficient batch applications. Spring Batch is a sub-project of Spring, which uses the Java language and is based on the Spring framework, which makes it easier for developers or enterprises who have already used the Spring framework to access and utilize enterprise services.

Spring Batch provides a large number of reusable components, including logging, tracking, transactions, task job statistics, task restart, skipping, repetition, and resource management. For large data volume and high-performance batch tasks, Spring Batch also provides advanced features and features to support, such as partitioning and remote functions. In short, batch jobs with simple, complex and large amounts of data can be supported through Spring Batch.

Spring Batch is a batch application framework, not a scheduling framework, but it needs to work with the scheduling framework to build completed batch tasks. It only focuses on issues related to batch tasks, such as transactions, concurrency, monitoring, execution, etc., and does not provide corresponding scheduling functions. If you need to use scheduling frameworks, there are already many excellent enterprise scheduling frameworks (such as Quartz, Tivoli, Control-M, Cron, etc.) that can be used in commercial and open source software.

 scene

Periodic batch submission

Process a task in parallel

Message-driven application hierarchical processing

Massively parallel batch processing

Restart after manual or scheduling causes the task to fail

Sequential execution of dependent steps (using workflow-driven extensions)

Skip some records during processing

Batch transactions: used for scenarios with small batches or stored procedures / scripts

For example:

A system obtains data from the database, after processing, exports the files needed by system B, system B reads the files, and stores them in the database after business processing.

Between 12:00 and 2:00 every night.

 architecture

Spring Batch uses a three-tier architecture, with three layers of application, core and basic services.

Application layer: contains all batch jobs and manages programmer-defined code through the Spring framework. The application layer is a batch task written by the user.

Core layer: contains the core classes needed for Spring Batch startup and control, and the core layer contains the core classes necessary to perform and control tasks. Such as the implementation of JobLauncher, Job and Step.

Infrastructure layer: the application and core layers are based on a common layer of basic services. Basic services include general Reader,Writers, service processing. (RetryTemplate retry template, RepeatReader repeat template) can be used by the core layer of the application layer.

 advantage

Spring Batch was developed jointly by SpringSource and Accenture (Accenture). Accenture has a wealth of industry-level experience in batch architecture, contributing to previously dedicated batch architecture frameworks (these frameworks have been developed and used for decades and provide a great deal of reference experience for Spring Batch); SpringSource has a deep technical understanding and Spring framework programming model.

The Spring Batch framework enables developers of batch applications to focus on business processing by providing rich out-of-the-box components, high reliability and high scalability.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report