In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article shares with you about the usefulness of the batch framework Spring Batch. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
What is batch processing?
In modern enterprise applications, in the face of complex business and massive data, in addition to all kinds of processing through the complex human-computer interface, there is also a kind of work that does not require human intervention, but only needs to read a large number of data on a regular basis. then complete the corresponding business processing and archive. This kind of work is called "batch processing"
Why use Spring Batch
As a sub-project of Spring, Spring Batch is an enterprise batch processing framework based on Spring. Through it, we can build a robust enterprise batch application. Spring Batch not only provides a unified read-write interface, rich task processing methods, flexible transaction management and concurrent processing, but also supports features such as logging, monitoring, task restart and skipping, which greatly simplifies batch application development and frees developers from the complex task configuration management process, so that they can pay more attention to the core business process.
We also need to know that Spring Batch is a batch application framework, not a scheduling framework. It only focuses on issues related to batch tasks, such as transactions, concurrency, monitoring, execution, etc., and does not provide corresponding scheduling functions. Therefore, if we want batch tasks to be executed on a regular basis, it can be implemented with mature scheduling frameworks such as Quartz.
The overall architecture of Spring Batch
It is divided into three layers: application layer, core layer and infrastructure layer. The application layer includes all batch tasks and user-developed code. The core layer includes the classes needed to run a task at run time, such as the implementation of JobLauncher,Job and Step. Both the application and core layers are above the infrastructure layer, which includes general-purpose readers (readers and writers) and services such as RetryTemplate.
Step execution process
Application scenario
Submit batch tasks regularly
Concurrent batch processing: executing tasks in parallel
Phased, enterprise message-driven processing
High concurrency batch task
Restart manually or regularly after failure
Process task dependencies sequentially (using workflow-driven batch plug-ins)
Partial processing: skip records (for example, on rollback)
Complete batch transactions: because there may be batches with small amounts of data or stored procedures / scripts exist
Thank you for reading! This is the end of this article on "what is the use of batch Framework Spring Batch?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.