Slide 1

Slide 1 text

A gentle introduction to Spring Batch Mahmoud Ben Hassine Mai 2018

Slide 2

Slide 2 text

About me ■ Principal Software Engineer @Pivotal ■ Spring Batch committer ■ 10+ years as a Software Engineer ■ Open source enthusiast ■ Chess junkie! Twitter: @b_e_n_a_s Github: @benas Lichess: @benas

Slide 3

Slide 3 text

What about you? ■ Any Spring Batch users? ■ Any Spring Boot users? ■ Any Spring Cloud Task/Stream users? ■ Any Spring Cloud Data Flow users?

Slide 4

Slide 4 text

Agenda ■ Introduction ■ Job development ■ Job administration ■ What’s next? ■ Q+A

Slide 5

Slide 5 text

Introduction

Slide 6

Slide 6 text

What is batch processing? “Batch processing … is defined as the processing of data without interaction or interruption.” Michael Minella, Pro Spring Batch 6

Slide 7

Slide 7 text

Batch domain language (1/2) 7

Slide 8

Slide 8 text

Batch domain language (2/2) 8

Slide 9

Slide 9 text

Batch domain model 9

Slide 10

Slide 10 text

Chunk-oriented processing 10

Slide 11

Slide 11 text

Core Features ■ Based on Spring Framework ■ Flexibility ■ Xml/Java config ■ Declarative I/O ■ Rich library of item readers/writers ■ Robustness ■ Repeat/Retry/Skip/Restart ■ Transaction management ■ Chunk-oriented processing ■ Scalability ■ Multi-threaded steps ■ Parallel steps ■ Remote chunking/partitioning 11

Slide 12

Slide 12 text

Use cases ■ ETL processing ■ Generation of statements/reports ■ Data analysis ■ Data science ■ Business intelligence 12

Slide 13

Slide 13 text

Spring Batch in production 13

Slide 14

Slide 14 text

History of Spring Batch v1.0
 Mar 28, 2008 v2.0
 Apr 11, 2009 v3.0
 May 22, 2014 v4.0
 Dec 1, 2017 - Builders for readers - Builders for writers - Java 8 - Spring Framework 5 - Initial APIs - Item-oriented processing - XML configuration - Java 1.4 - Spring Framework 2.5 - Step scope - Chunk-oriented processing - Remote chunking/partitioning - Java 5 - Spring Framework 3 v2.2
 Jun 05, 2013 - Java configuration - Spring Data support - Non-identifying Job params - AMQP support - SQLFire support - Job scope - JSR-352 support - SQLite support - Spring Batch Integration - Spring Boot support 14

Slide 15

Slide 15 text

Job development

Slide 16

Slide 16 text

Job development with Spring Boot + = Dev 16

Slide 17

Slide 17 text

Job administration

Slide 18

Slide 18 text

+ = Job administration with Spring Cloud Data Flow Ops 18

Slide 19

Slide 19 text

What’s next?

Slide 20

Slide 20 text

Roadmap ■ Spring Batch v4.1 (SpringOne 2018)* ■ Simplify remote chunking/partitioning configuration ■ Add JSON ItemReader/ItemWriter implementations ■ Add JSR-305 annotations to APIs ■ Spring Batch v4.0.2/v3.0.10 ■ Maintenance releases for v4.0.x/v3.0.x lines ■ v3.0.10 will be the last patch version for v3.0.x line ■ Contributions are welcome! * Those are goals not commitments! 20

Slide 21

Slide 21 text

Thank you! Slides: https://speakerdeck.com/benas/spring-batch-intro Code: https://github.com/benas/spring-batch-intro Spring Batch home: https://projects.spring.io/spring-batch/ Spring Cloud Data Flow home: https://cloud.spring.io/spring-cloud-dataflow/