Spring Batch 文档翻译

13 篇文章 0 订阅

Sptring Batch简介(翻译)
Spring Batch 文档

1 Spring Batch 介绍

1.1背景

Many applications within the enterprise domain require bulk processing to perform business operations in mission critical environments. These business operations include automated, complex processing of large volumes of information that is most efficiently processed without user interaction.

在企业领域中,存在大量应用需要批处理程序执行业务操作在关键任务环境中。
业务操作指无需用户接入的情况下高效的的,自动的,复杂的处理大量信息。

These operations typically include time based events (e.g. month-end calculations, notices or correspondence), periodic application of complex business rules processed repetitively across very large data sets (e.g. Insurance benefit determination or rate adjustments), or the integration of information that is received from internal and external systems that typically requires formatting, validation and processing in a transactional manner into the system of record. Batch processing is used to process billions of transactions every day for enterprises.

业务操作通常包括:基于时间的事件(例如:每月底的计算,提醒或通知).
企业每天使用批处理程序处理海量事务。

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 是一个轻量级的,完善的批处理系统,为企业系统中至关重要的周期性操作开发健壮的批处理应用。

Spring Batch builds upon the productivity, POJO-based development approach, and general ease of use capabilities people have come to know from the Spring Framework, while making it easy for developers to access and leverage more advance enterprise services when necessary. Spring Batch is not a scheduling framework. There are many good enterprise schedulers available in both the commercial and open source spaces such as Quartz, Tivoli, Control-M, etc. It is intended to work in conjunction with a scheduler, not replace a scheduler.

Spring batch 不是一个调度框架,存在很多好的商业和开源的企业调度器,例如: Quartz,Tivoli, Control-M等。

1.2使用场景

A typical batch program generally reads a large number of records from a database, file, or queue, processes the data in some fashion, and then writes back data in a modified form. Spring Batch automates this basic batch iteration, providing the capability to process similar transactions as a set, typically in an offline environment without any user interaction. Batch jobs are part of most IT projects and Spring Batch is the only open source framework that provides a robust, enterprise-scale solution.

大部分IT项目都包含批处理作业功能, Spring Batch 是唯一能够提供健壮的,企业级的开源解决方案的开源框架。

Business Scenarios(业务场景)

  • Commit batch process periodically(周期性提交批处理)
  • Concurrent batch processing: parallel processing of a job(并行调度作业)
  • Staged, enterprise message-driven processing(分级的企业消息驱动处理)

  • Massively parallel batch processing(大量的并行批处理)

  • Manual or scheduled restart after failure(执行失败后手动或按安排的重启)
  • Sequential processing of dependent steps (with extensions to workflow-driven batches)(存在依赖步骤的顺序处理)
  • Partial processing: skip records (e.g. on rollback)(分拆处理)
  • Whole-batch transaction: for cases with a small batch size or existing stored procedures/scripts( 整体批处理 事务)

Technical Objectives(技术目标)

  • Batch developers use the Spring programming model: concentrate on business logic; let the framework take care of infrastructure.
    (使用Spring 编程模型,聚焦商业逻辑,由框架处理基础设施)
  • Clear separation of concerns between the infrastructure, the batch execution environment, and the batch application.
    (在基础设施,批处理执行环境和批处理应用之间存在清晰地区分)
  • Provide common, core execution services as interfaces that all projects can implement.(提供通用的,核心执行接口是所有项目均可使用)

  • Provide simple and default implementations of the core execution interfaces that can be used ‘out of the box’
    (通过为核心执行接口提供默认的简单实现,实现开箱即用)

  • Easy to configure, customize, and extend services, by leveraging the spring framework in all layers.
    (基于spring 框架,易于配置,定制和扩展服务)
  • All existing core services should be easy to replace or extend, without any impact to the infrastructure layer.()

  • Provide a simple deployment model, with the architecture JARs completely separate from the application, built using Maven.
    (提供简单部署模型,框架的jar与应用程序完全分离,使用Maven 构建)

2 Spring Batch 3.0 新特性

  • JSR-352 支持(新的 java 语言规范,为java 语言提供批处理能力,spring batch 3.0 完全支持这个规范)

  • 升级支持Spring 4和Java8

  • Promote Spring Batch Integration to Spring Boot(spring batch 完成整合到 spring boot 中)

  • JobScope 支持(3.0 中 job 支持作用域定义)

  • SQLite Support (SQLite 支持)

3 Batch 领域语言

To any experienced batch architect, the overall concepts of batch processing used in Spring Batch should be familiar and comfortable. There are “Jobs” and “Steps” and developer supplied processing units called ItemReaders and ItemWriters. However, because of the Spring patterns, operations, templates, callbacks, and idioms, there are opportunities for the following:


  • significant improvement in adherence to a clear separation of concerns
  • clearly delineated architectural layers and services provided as interfaces
    (清晰定义架构层次和服务提供接口)

  • simple and default implementations that allow for quick adoption and ease of use out-of-the-box(默认和简单实现允许快速的采用和易于开箱即用)

  • significantly enhanced extensibility(显著的增强扩展性)

4 配置并运行一个作业

5 配置 一个步骤

6 ItemReaders 和 ItemWriters

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值