Spring Batch in Action
eBook - ePub

Spring Batch in Action

Arnaud Cogoluegnes, Thierry Templier, Olivier Bazoud

Condividi libro
  1. 504 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Spring Batch in Action

Arnaud Cogoluegnes, Thierry Templier, Olivier Bazoud

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Summary Spring Batch in Action is an in-depth guide to writing batch applications using Spring Batch. Written for developers who have basic knowledge of Java and the Spring lightweight container, the book provides both a best-practices approach to writing batch jobs and comprehensive coverage of the Spring Batch framework.
About the Technology
Even though running batch jobs is a common task, there's no standard way to write them. Spring Batch is a framework for writing batch applications in Java. It includes reusable components and a solid runtime environment, so you don't have to start a new project from scratch. And it uses Spring's familiar programming model to simplify configuration and implementation, so it'll be comfortably familiar to most Java developers.
About the Book
Spring Batch in Action is a thorough, in-depth guide to writing efficient batch applications. Starting with the basics, it discusses the best practices of batch jobs along with details of the Spring Batch framework. You'll learn by working through dozens of practical, reusable examples in key areas like monitoring, tuning, enterprise integration, and automated testing.No prior batch programming experience is required. Basic knowledge of Java and Spring is assumed. Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.
What's Inside

  • Batch programming from the ground up
  • Implementing data components
  • Handling errors during batch processing
  • Automating tedious tasks

Table of Contents

PART 1 BACKGROUND

  • Introducing Spring Batch
  • Spring Batch concepts
  • PART 2 CORE SPRING BATCH
  • Batch configuration
  • Running batch jobs
  • Reading data
  • Writing data
  • Processing data
  • Implementing bulletproof jobs
  • Transaction management
  • PART 3 ADVANCED SPRING BATCH
  • Controlling execution
  • Enterprise integration
  • Monitoring jobs
  • Scaling and parallel processing
  • Testing batch applications

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Spring Batch in Action è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Spring Batch in Action di Arnaud Cogoluegnes, Thierry Templier, Olivier Bazoud in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Open Source Programming. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Editore
Manning
Anno
2011
ISBN
9781638352532

Part 1. Background

What is Spring Batch? What is it good for? Is it the right tool for you? You’ll find the answers to these questions in the next two chapters. Of course, you won’t be a Spring Batch expert by the end of this first part, but you’ll have a good foundation and understanding of all the features in Spring Batch.
Chapter 1 provides an overview of batch applications and Spring Batch. To follow the In Action tradition, we also show you how to implement a real-world batch job with Spring Batch. This introduction not only covers how Spring Batch handles the classical read-process-write pattern for large amounts of data but also shows you the techniques used to make a job more robust, like skipping invalid lines in a flat file.
Chapter 2 clearly defines the domain language used in batch applications and explains how Spring Batch captures the essence of batch applications. What are a job, a step, and a job execution? Chapter 2 covers all of this and introduces how Spring Batch tracks the execution of jobs to enable monitoring and restart on failure.

Chapter 1. Introducing Spring Batch

This chapter covers
  • Understanding batch applications in today’s architectures
  • Describing Spring Batch’s main features
  • Efficiently reading and writing data
  • Implementing processing inside a job with Spring Batch
  • Testing a Spring Batch job
Batch applications are a challenge to write, and that’s why Spring Batch was created: to make them easier to write but also faster, more robust, and reliable. What are batch applications? Batch applications process large amounts of data without human intervention. You’d opt to use batch applications to compute data for generating monthly financial statements, calculating statistics, and indexing files. You’re about to discover more about batch applications in this chapter. You’ll see why their requirements—large volumes of data, performance, and robustness—make them a challenge to implement correctly and efficiently. Once you understand the big picture, you’ll be ready to meet Spring Batch and its main features: helping to efficiently process data with various types of technologies—databases, files, and queues. We also honor the In Action series by implementing a real-world Spring Batch job. By the end of this first chapter, you’ll have an overview of what Spring Batch does, and you’ll be ready to implement your first job with Spring Batch. Let’s get started with batch applications!

1.1. What are batch applications?

The most common scenario for a batch application is exporting data to files from one system and processing them in another. Imagine you want to exchange data between two systems: you export data as files from system A and then import the data into a database on system B. Figure 1.1 illustrates this example.
Figure 1.1. A typical batch application: system A exports data to flat files, and system B uses a batch process to read the files into a database.
A batch application processes data automatically, so it must be robust and reliable because there is no human interaction to recover from an error. The greater the volume of data a batch application must process, the longer it takes to complete. This means you must also consider performance in your batch application because it’s often restricted to execute within a specific time window. Based on this description, the requirements of a batch application are as follows:
  • Large data volume— Batch applications must be able to handle large volumes of data to import, export, or compute.
  • Automation— Batch applications must run without user interaction except for serious problem resolution.
  • Robustness— Batch applications must handle invalid data without crashing or aborting prematurely.
  • Reliability— Batch applications must keep track of what goes wrong and when (logging, notification).
  • Performance— Batch applications must perform well to finish processing in a dedicated time window or to avoid disturbing any other applications running simultaneously.
How batch applications fit in today’s software architectures
Performing computations and exchanging data between applications are good examples of batch applications. But are these types of processes relevant today? Computation-based processes are obviously relevant: every day, large and complex calculations take place to index billions of documents, using cutting-edge algorithms like MapReduce. For data exchange, message-based solutions are also popular, having the advantage over batch applications of being (close to) real time. Although messaging is a powerful design pattern, it imposes its own particular set of requirements in terms of application design and implementation.
Clearly, messaging isn’t a silver bullet, and you should apply it thoughtfully. Note that batch jobs and messaging aren’t mutually exclusive solutions: you can use messaging to exchange data and still need batch applications to process the data with the same reliability and robustness requirements as the rest of your application stack. Even in our event- and notification-driven world, batch applications are still relevant!
How does Spring Batch fit in the landscape of batch applications? The next section introduces the Spring Batch framework and its main features. You’ll see how Spring Batch helps meet the requirements of batch applications by providing ready-to-use components and processing large amounts of data in an efficient manner.

1.2. Meet Spring Batch

The goal of the Spring Batch project is to provide an open source batch-oriented framework that effectively addresses the most common needs of batch applications. The Spring Batch project was born in 2007 out of the collaboration of Accenture and SpringSou...

Indice dei contenuti