SlideShare uma empresa Scribd logo
1 de 48
Spring Batch for large
Enterprises operations
Ignasi Gonzalez
@ignasi15g
Let me do some initial questions
Which is the concept?
Batch Definition
Batch Usages
Correct Clean
GENERATE
Order
Agenda
• Batch at Java and Spring
• Usage of Spring Batch at a bank
• Usage of Spring Batch at an energy company
Batch Structure
JSR 352: Batch Applications
for the Java Platform
(May 24th, 2013)
Other Concepts
Batchlet
Chunk type Step
Batchlet type Step
Job Execution
JSR 352 & Spring Batch
JSR – 352
• Define an API.
• Provide an SDL (JSL)
• Provide a contract.
• Dependency injection is optional
Spring Batch
• Define an API.
• Provide an SDL. (JSL)
• Provide a contract.
• Provide implementation for Readers and
Writers.
• Provide specific batchlet
implementations.
• Provide JobRepository implementation.
• From Spring 3.0 support JSR-352.
Spring Batch Structure
http://docs.spring.io/spring-batch-old/1.1.x/spring-batch-docs/reference/html-single/index.html#d0e5652
Spring Batch Data Model
http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html
Spring Batch Data Model
http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html
BATCH_JOB_INSTANCE
Spring Batch Data Model
http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html
BATCH_JOB_EXECUTION
Spring Batch Data Model
http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html
BATCH_JOB_EXECUTION_PARAMS
Spring Batch Data Model
http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html
BATCH_STEP_EXECUTION
Spring Batch Data Model
http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html
BATCH_STEP_EXECUTION_CONTEXT
Spring Batch Data Model
http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html
BATCH_STEP_EXECUTION_CONTEXT
BATCH_JOB_INSTANCE
BATCH_JOB_EXECUTION
BATCH_JOB_EXECUTION_PARAMS
BATCH_STEP_EXECUTION
Main Benefits
• Integrated with full Spring framework supporting all Spring features such
as Dependency Injection, AOP & Testability.
• Well tested ItemReaders and ItemWriters covering vast options for I/O
(File, JDBC, NoSQL JMS).
• Management information of running and finished Batch processes,
including information about results.
• A collection of Tasklets (Spring Batchlets) for execution from shell scripts
to Hadoop processes.
• Framework flexibility to define complex steps configurations.
• Simplification of thread management and transactions management.
• Management of Batch lifecycle (Restartability, Run, Pause, Stop).
SPRING BATCH AT A BANK
BANK
• The bank is undergoing a process of migration of core applications from Host to a mid-level
system that uses a Spring-based architecture defined, developed and maintained by everis.
Time to
market
MIPS
reduction
Scalability
TestabilityCost
reduction
HOST MID-LEVEL SYSTEMS
Architecture
• Spring based architecture:
– Performs 7.000 transactions per second.
– Provides service to 30.000 users
– Architecture team composed by 30 software engineers.
INFR.
CORPORATE
CHANNEL
SERVICES
HOST
LOGIN
IDM
BATCH
BACKENDS
ONLINE
CHANNEL
CRYPTO
NEUTRAL
CHANNEL
OTHER
MEDIA
STORAGE
FINANCIAL
TERMINAL
ONLINE
BANKING
GROUP
COMPANIES
ATM
BATCH
Challenge
HOST
How to integrate Spring Batch in corporate tools?
SPRINGBATCH
Integration
Corporate scheduler
Integration
Corporate batch launcher
ClassPathXmlApplicationContext sbc = BatchApplicationContextUtils.createApplicationContext(properties);
JobLauncher launcher = (JobLauncher) sbc.getBean("jobLauncher");
Job job = (Job) sbc.getBean(this.jobId);
initBatchContext(jobParameters, appParams, jobParam, sbc);
public static ClassPathXmlApplicationContext createApplicationContext(Properties credentials)
throws IOException {
String[] contextFiles = new String[]{
"classpath*:batch/arch/internal/beans/-batch-arch*.xml",
"classpath*:batch/app/**/-batch-app*.xml"
};
ClassPathXmlApplicationContext sbc = new ClassPathXmlApplicationContext(contextFiles, false);
PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
ppc.setSystemPropertiesMode(PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_NEVER);
ppc.setIgnoreUnresolvablePlaceholders(true);
ppc.setProperties(credentials);
sbc.addBeanFactoryPostProcessor(ppc);
sbc.refresh();
return sbc;
}
protected void initBatchContext(JobParameters jobParams, String[] appParams, String[] jobParam,
ClassPathXmlApplicationContext xmlcontext) {
BatchContext.reset();
BatchContext bc = BatchContext.getInstance();
BatchParams bp = new BatchParams();
bp.setJobName(this.jobId);
bp.setInstanceId(jobParams.getString(BatchLauncher.ArchParamKey.INSTANCIA.toString()));
bp.setScheduleTimestamp(jobParams.getDate(BatchLauncher.ArchParamKey.SCHED_TS.toString()));
bp.setAppParams(Arrays.asList(appParams));
bp.setJobParam(Arrays.asList(jobParam));
bp.setJobentorno(jobParams.getString(BatchLauncher.ArchParamKey.ENTORNO.toString()));
bp.setJobappmvs(jobParams.getString(BatchLauncher.ArchParamKey.APPMVS.toString()));
bc.setBatchParameters(bp);
bc.setxmlContext(xmlcontext);
}
Results
Main areas with Batch processes:
• Markets
• IT
• Risk Management
• Digital Contents
• Banking services
• ATMs
• Online Banking
• Extranet
0
50000
100000
150000
200000
250000
ADCAEX
AGERIE
AMPAMP
ARTBKD
AUWATC
BCKARM
BCKPBC
BCKSDD
BKDAIR
BKDGBR
BKDPRP
CALBCK
COMCNF
ECCVAL
EPQEPQ
GESINS
IMPIMP
LVACUA
MUROGE
PERCAI
PUNBKD
SELCLI
SPCSPC
TRACEA
BSMTST
IDECLD
SISSEG
# executions per process
# executions per month
SPRING BATCH AT AN ENERGY COMPANY
ENERGY COMPANY
• Software factory composed by 4 different
providers.
• More than 300 developers.
• Migration from custom developed framework
to a Spring based architecture.
Architecture
Integración
JMS/MQ
WebServices
Documentum
Dazel/Papirus
Challenges
1. How to migrate current custom batch processes
on new Spring operational architecture?
1. How to ensure quality and correct Spring Batch
usage with a community of 300 developers
2. How to monitor and report batch activity
formed by more than 400 processes with 160
processes per day executions?
1. MIGRATION
Migration
PoC Objectives:
• Evaluate the effort required by the
development teams to migrate.
• Evaluate the performance.
• Evaluate the total execution time.
• Identify improvements over
migrated process.
Migration
• Obtained results:
 30% Reduction of the Execution time
 15% Reduction of the Memory consumption
 10% Reduction of the CPU consumption
 Process migration, including tests, has been performed in 8 Working Days without
previous Spring Batch experience.
 Reduction of the proprietary code.
 Maintainability on batch processes (Query + DAO + Processor + Config writer).
• Where do we obtain performance benefits?
– Using JDBCPagingItemReader, we eliminate a reading lock at the beginning of the
original process.
– Using ApacheCommonsDBCP as a Datasource implementation for Reader, we optimize
the process as the old architecture component had performance issues.
– Using FlatFileItemWriter to generate CSV output file, the results are improved
compared to the ones previously obtained
2. QUALITY
Quality
Quality
LOCAL TEST ACCEPTANCE
TRAINING PRODUCTION
PRE
PRODUCTION
PERFORMANCE
Productive environmentsTactic environments
Development
environments
Monitoring
QA environments
Dynamic Code AnalysisReporting & Bugtracking Static code analysis Performance testing
& profiling
Continuous Integration Static Data Model Analysis
OLTP
3. MONITOR AND CONTROL
Monitor and control
01:00 AM
02:00 AM
03:00 AM
Planed
04:00 AM
05:00 AM
06:00 AM
01:00 AM
02:00 AM
03:00 AM
Happens
04:00 AM
05:00 AM
06:00 AM
Monitor and Control
Monitor and Control
Monitor and Control
Monitor and Control
Monitor and Control
Needs
Monitor and Control
Batch Executions
• No global and complete reporting tool around Batch processes.
• Difficulties on schedule modifications because huge number of processes (432) and high
number of executions (160 per day).
• No alert mechanism if planned Batch doesn’t start (Planned vs Executed).
Batch Plannifications
Monitor and Control
44
Batch Executions
Logs
Planificación Batch
• Daily global information.
• Visual control of executions vs planification
• Historical Data..
Conclusions
• Structure Batch following standards and best practices.
• Well tested and optimized components.
• Possibilities to exploit horizontal scalability framework offer.
• Integration with the rest of the Spring framework (Spring Integration / Spring XD).
• Reusability of business logic developed in online applications.
• Consider the complexity of integrating Spring Batch with existing enterprise tools.
• Migration process from current batches must be normalized to SpringBatch
characteristics.
• Ensure invariability of the process after migration using appropriate testing tools.
• Ensure correctness of framework usage using checkstyle tools.
• Design batch having in mind advanced framework capacities (chunking, parallelism).
• Measure processes execution ensuring correctness during all process life
Benefits
Advises
Spring Batch for large
Enterprises operations
Ignasi Gonzalez
@ignasi15g

Mais conteúdo relacionado

Mais procurados

Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 
Spring framework Introduction
Spring framework IntroductionSpring framework Introduction
Spring framework IntroductionAnuj Singh Rajput
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux IntroductionNikolaus Graf
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot IntroductionJeevesh Pandey
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCFunnelll
 
Spring Caches with Protocol Buffers
Spring Caches with Protocol BuffersSpring Caches with Protocol Buffers
Spring Caches with Protocol BuffersVMware Tanzu
 
Formation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataFormation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataLhouceine OUHAMZA
 
Introduction to JSX
Introduction to JSXIntroduction to JSX
Introduction to JSXMicah Wood
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlArjun Thakur
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkHùng Nguyễn Huy
 
Reactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project ReactorReactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project ReactorKnoldus Inc.
 

Mais procurados (20)

Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring framework Introduction
Spring framework IntroductionSpring framework Introduction
Spring framework Introduction
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Testing in airflow
Testing in airflowTesting in airflow
Testing in airflow
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux Introduction
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
 
Spring Caches with Protocol Buffers
Spring Caches with Protocol BuffersSpring Caches with Protocol Buffers
Spring Caches with Protocol Buffers
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Formation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataFormation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-data
 
Introduction to JSX
Introduction to JSXIntroduction to JSX
Introduction to JSX
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Ngrx slides
Ngrx slidesNgrx slides
Ngrx slides
 
Workshop 21: React Router
Workshop 21: React RouterWorkshop 21: React Router
Workshop 21: React Router
 
Reactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project ReactorReactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project Reactor
 

Destaque

Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Raffael Schmid
 
Spring Batch Workshop (advanced)
Spring Batch Workshop (advanced)Spring Batch Workshop (advanced)
Spring Batch Workshop (advanced)lyonjug
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the ScenesJoshua Long
 
Ruote: A Ruby workflow engine
Ruote:  A Ruby workflow engineRuote:  A Ruby workflow engine
Ruote: A Ruby workflow engineWes Gamble
 
Messaging for Web and Mobile with Apache ActiveMQ
Messaging for Web and Mobile with Apache ActiveMQMessaging for Web and Mobile with Apache ActiveMQ
Messaging for Web and Mobile with Apache ActiveMQdejanb
 
Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Raffael Schmid
 
Enterprise Integration and Batch Processing on Cloud Foundry
Enterprise Integration and Batch Processing on Cloud FoundryEnterprise Integration and Batch Processing on Cloud Foundry
Enterprise Integration and Batch Processing on Cloud FoundryJoshua Long
 
Parallel batch processing with spring batch slideshare
Parallel batch processing with spring batch   slideshareParallel batch processing with spring batch   slideshare
Parallel batch processing with spring batch slideshareMorten Andersen-Gott
 
Test strategies for data processing pipelines
Test strategies for data processing pipelinesTest strategies for data processing pipelines
Test strategies for data processing pipelinesLars Albertsson
 
Spark For Faster Batch Processing
Spark For Faster Batch ProcessingSpark For Faster Batch Processing
Spark For Faster Batch ProcessingEdureka!
 

Destaque (11)

Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.
 
Spring Batch Workshop (advanced)
Spring Batch Workshop (advanced)Spring Batch Workshop (advanced)
Spring Batch Workshop (advanced)
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the Scenes
 
Ruote: A Ruby workflow engine
Ruote:  A Ruby workflow engineRuote:  A Ruby workflow engine
Ruote: A Ruby workflow engine
 
Messaging for Web and Mobile with Apache ActiveMQ
Messaging for Web and Mobile with Apache ActiveMQMessaging for Web and Mobile with Apache ActiveMQ
Messaging for Web and Mobile with Apache ActiveMQ
 
Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.
 
Enterprise Integration and Batch Processing on Cloud Foundry
Enterprise Integration and Batch Processing on Cloud FoundryEnterprise Integration and Batch Processing on Cloud Foundry
Enterprise Integration and Batch Processing on Cloud Foundry
 
Parallel batch processing with spring batch slideshare
Parallel batch processing with spring batch   slideshareParallel batch processing with spring batch   slideshare
Parallel batch processing with spring batch slideshare
 
Test strategies for data processing pipelines
Test strategies for data processing pipelinesTest strategies for data processing pipelines
Test strategies for data processing pipelines
 
Spark For Faster Batch Processing
Spark For Faster Batch ProcessingSpark For Faster Batch Processing
Spark For Faster Batch Processing
 
11 software testing_strategy
11 software testing_strategy11 software testing_strategy
11 software testing_strategy
 

Semelhante a Spring batch for large enterprises operations

Performance eng prakash.sahu
Performance eng prakash.sahuPerformance eng prakash.sahu
Performance eng prakash.sahuDr. Prakash Sahu
 
## Introducing a reactive Scala-Akka based system in a Java centric company
## Introducing a reactive Scala-Akka based system in a Java centric company## Introducing a reactive Scala-Akka based system in a Java centric company
## Introducing a reactive Scala-Akka based system in a Java centric companyMilan Aleksić
 
Gain Proficiency in Batch Processing with Spring Batch
Gain Proficiency in Batch Processing with Spring BatchGain Proficiency in Batch Processing with Spring Batch
Gain Proficiency in Batch Processing with Spring BatchInexture Solutions
 
Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Databricks
 
File Processing - Batch Process Execution
File Processing - Batch Process ExecutionFile Processing - Batch Process Execution
File Processing - Batch Process ExecutionAbimael Desales López
 
File Processing - Process Execution Solution
File Processing - Process Execution SolutionFile Processing - Process Execution Solution
File Processing - Process Execution SolutionAbimael Desales López
 
Webinar september 2013
Webinar september 2013Webinar september 2013
Webinar september 2013Marc Gille
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance GainsVMware Tanzu
 
Bag it Tag It Put it : Project Tracking One Click away
Bag it Tag It Put it : Project Tracking One Click away Bag it Tag It Put it : Project Tracking One Click away
Bag it Tag It Put it : Project Tracking One Click away Abhishek Bakshi
 
JBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 IntroductionJBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 IntroductionMauricio (Salaboy) Salatino
 
Spring boot
Spring bootSpring boot
Spring bootsdeeg
 
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cSQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cRachelBarker26
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB
 
Make streaming processing towards ANSI SQL
Make streaming processing towards ANSI SQLMake streaming processing towards ANSI SQL
Make streaming processing towards ANSI SQLDataWorks Summit
 

Semelhante a Spring batch for large enterprises operations (20)

Performance eng prakash.sahu
Performance eng prakash.sahuPerformance eng prakash.sahu
Performance eng prakash.sahu
 
## Introducing a reactive Scala-Akka based system in a Java centric company
## Introducing a reactive Scala-Akka based system in a Java centric company## Introducing a reactive Scala-Akka based system in a Java centric company
## Introducing a reactive Scala-Akka based system in a Java centric company
 
Gain Proficiency in Batch Processing with Spring Batch
Gain Proficiency in Batch Processing with Spring BatchGain Proficiency in Batch Processing with Spring Batch
Gain Proficiency in Batch Processing with Spring Batch
 
Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...
 
File Processing - Batch Process Execution
File Processing - Batch Process ExecutionFile Processing - Batch Process Execution
File Processing - Batch Process Execution
 
File Processing - Process Execution Solution
File Processing - Process Execution SolutionFile Processing - Process Execution Solution
File Processing - Process Execution Solution
 
Webinar september 2013
Webinar september 2013Webinar september 2013
Webinar september 2013
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance Gains
 
Bag it Tag It Put it : Project Tracking One Click away
Bag it Tag It Put it : Project Tracking One Click away Bag it Tag It Put it : Project Tracking One Click away
Bag it Tag It Put it : Project Tracking One Click away
 
JBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 IntroductionJBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 Introduction
 
Spring insight what just happened
Spring insight   what just happenedSpring insight   what just happened
Spring insight what just happened
 
Benchmarking PyCon AU 2011 v0
Benchmarking PyCon AU 2011 v0Benchmarking PyCon AU 2011 v0
Benchmarking PyCon AU 2011 v0
 
Spring boot
Spring bootSpring boot
Spring boot
 
Proposal with sdlc
Proposal with sdlcProposal with sdlc
Proposal with sdlc
 
QSpiders - Installation and Brief Dose of Load Runner
QSpiders - Installation and Brief Dose of Load RunnerQSpiders - Installation and Brief Dose of Load Runner
QSpiders - Installation and Brief Dose of Load Runner
 
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cSQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19c
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
Make streaming processing towards ANSI SQL
Make streaming processing towards ANSI SQLMake streaming processing towards ANSI SQL
Make streaming processing towards ANSI SQL
 

Último

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Último (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

Spring batch for large enterprises operations

  • 1. Spring Batch for large Enterprises operations Ignasi Gonzalez @ignasi15g
  • 2. Let me do some initial questions
  • 3. Which is the concept?
  • 6. Agenda • Batch at Java and Spring • Usage of Spring Batch at a bank • Usage of Spring Batch at an energy company
  • 7. Batch Structure JSR 352: Batch Applications for the Java Platform (May 24th, 2013)
  • 8. Other Concepts Batchlet Chunk type Step Batchlet type Step Job Execution
  • 9. JSR 352 & Spring Batch JSR – 352 • Define an API. • Provide an SDL (JSL) • Provide a contract. • Dependency injection is optional Spring Batch • Define an API. • Provide an SDL. (JSL) • Provide a contract. • Provide implementation for Readers and Writers. • Provide specific batchlet implementations. • Provide JobRepository implementation. • From Spring 3.0 support JSR-352.
  • 11. Spring Batch Data Model http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html
  • 12. Spring Batch Data Model http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html BATCH_JOB_INSTANCE
  • 13. Spring Batch Data Model http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html BATCH_JOB_EXECUTION
  • 14. Spring Batch Data Model http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html BATCH_JOB_EXECUTION_PARAMS
  • 15. Spring Batch Data Model http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html BATCH_STEP_EXECUTION
  • 16. Spring Batch Data Model http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html BATCH_STEP_EXECUTION_CONTEXT
  • 17. Spring Batch Data Model http://docs.spring.io/spring-batch/trunk/reference/html/metaDataSchema.html BATCH_STEP_EXECUTION_CONTEXT BATCH_JOB_INSTANCE BATCH_JOB_EXECUTION BATCH_JOB_EXECUTION_PARAMS BATCH_STEP_EXECUTION
  • 18. Main Benefits • Integrated with full Spring framework supporting all Spring features such as Dependency Injection, AOP & Testability. • Well tested ItemReaders and ItemWriters covering vast options for I/O (File, JDBC, NoSQL JMS). • Management information of running and finished Batch processes, including information about results. • A collection of Tasklets (Spring Batchlets) for execution from shell scripts to Hadoop processes. • Framework flexibility to define complex steps configurations. • Simplification of thread management and transactions management. • Management of Batch lifecycle (Restartability, Run, Pause, Stop).
  • 19. SPRING BATCH AT A BANK
  • 20. BANK • The bank is undergoing a process of migration of core applications from Host to a mid-level system that uses a Spring-based architecture defined, developed and maintained by everis. Time to market MIPS reduction Scalability TestabilityCost reduction HOST MID-LEVEL SYSTEMS
  • 21. Architecture • Spring based architecture: – Performs 7.000 transactions per second. – Provides service to 30.000 users – Architecture team composed by 30 software engineers. INFR. CORPORATE CHANNEL SERVICES HOST LOGIN IDM BATCH BACKENDS ONLINE CHANNEL CRYPTO NEUTRAL CHANNEL OTHER MEDIA STORAGE FINANCIAL TERMINAL ONLINE BANKING GROUP COMPANIES ATM BATCH
  • 22. Challenge HOST How to integrate Spring Batch in corporate tools? SPRINGBATCH
  • 24. Integration Corporate batch launcher ClassPathXmlApplicationContext sbc = BatchApplicationContextUtils.createApplicationContext(properties); JobLauncher launcher = (JobLauncher) sbc.getBean("jobLauncher"); Job job = (Job) sbc.getBean(this.jobId); initBatchContext(jobParameters, appParams, jobParam, sbc); public static ClassPathXmlApplicationContext createApplicationContext(Properties credentials) throws IOException { String[] contextFiles = new String[]{ "classpath*:batch/arch/internal/beans/-batch-arch*.xml", "classpath*:batch/app/**/-batch-app*.xml" }; ClassPathXmlApplicationContext sbc = new ClassPathXmlApplicationContext(contextFiles, false); PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer(); ppc.setSystemPropertiesMode(PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_NEVER); ppc.setIgnoreUnresolvablePlaceholders(true); ppc.setProperties(credentials); sbc.addBeanFactoryPostProcessor(ppc); sbc.refresh(); return sbc; } protected void initBatchContext(JobParameters jobParams, String[] appParams, String[] jobParam, ClassPathXmlApplicationContext xmlcontext) { BatchContext.reset(); BatchContext bc = BatchContext.getInstance(); BatchParams bp = new BatchParams(); bp.setJobName(this.jobId); bp.setInstanceId(jobParams.getString(BatchLauncher.ArchParamKey.INSTANCIA.toString())); bp.setScheduleTimestamp(jobParams.getDate(BatchLauncher.ArchParamKey.SCHED_TS.toString())); bp.setAppParams(Arrays.asList(appParams)); bp.setJobParam(Arrays.asList(jobParam)); bp.setJobentorno(jobParams.getString(BatchLauncher.ArchParamKey.ENTORNO.toString())); bp.setJobappmvs(jobParams.getString(BatchLauncher.ArchParamKey.APPMVS.toString())); bc.setBatchParameters(bp); bc.setxmlContext(xmlcontext); }
  • 25. Results Main areas with Batch processes: • Markets • IT • Risk Management • Digital Contents • Banking services • ATMs • Online Banking • Extranet 0 50000 100000 150000 200000 250000 ADCAEX AGERIE AMPAMP ARTBKD AUWATC BCKARM BCKPBC BCKSDD BKDAIR BKDGBR BKDPRP CALBCK COMCNF ECCVAL EPQEPQ GESINS IMPIMP LVACUA MUROGE PERCAI PUNBKD SELCLI SPCSPC TRACEA BSMTST IDECLD SISSEG # executions per process # executions per month
  • 26. SPRING BATCH AT AN ENERGY COMPANY
  • 27. ENERGY COMPANY • Software factory composed by 4 different providers. • More than 300 developers. • Migration from custom developed framework to a Spring based architecture.
  • 29. Challenges 1. How to migrate current custom batch processes on new Spring operational architecture? 1. How to ensure quality and correct Spring Batch usage with a community of 300 developers 2. How to monitor and report batch activity formed by more than 400 processes with 160 processes per day executions?
  • 31. Migration PoC Objectives: • Evaluate the effort required by the development teams to migrate. • Evaluate the performance. • Evaluate the total execution time. • Identify improvements over migrated process.
  • 32. Migration • Obtained results:  30% Reduction of the Execution time  15% Reduction of the Memory consumption  10% Reduction of the CPU consumption  Process migration, including tests, has been performed in 8 Working Days without previous Spring Batch experience.  Reduction of the proprietary code.  Maintainability on batch processes (Query + DAO + Processor + Config writer). • Where do we obtain performance benefits? – Using JDBCPagingItemReader, we eliminate a reading lock at the beginning of the original process. – Using ApacheCommonsDBCP as a Datasource implementation for Reader, we optimize the process as the old architecture component had performance issues. – Using FlatFileItemWriter to generate CSV output file, the results are improved compared to the ones previously obtained
  • 35. Quality LOCAL TEST ACCEPTANCE TRAINING PRODUCTION PRE PRODUCTION PERFORMANCE Productive environmentsTactic environments Development environments Monitoring QA environments Dynamic Code AnalysisReporting & Bugtracking Static code analysis Performance testing & profiling Continuous Integration Static Data Model Analysis OLTP
  • 36. 3. MONITOR AND CONTROL
  • 37. Monitor and control 01:00 AM 02:00 AM 03:00 AM Planed 04:00 AM 05:00 AM 06:00 AM 01:00 AM 02:00 AM 03:00 AM Happens 04:00 AM 05:00 AM 06:00 AM
  • 43. Needs Monitor and Control Batch Executions • No global and complete reporting tool around Batch processes. • Difficulties on schedule modifications because huge number of processes (432) and high number of executions (160 per day). • No alert mechanism if planned Batch doesn’t start (Planned vs Executed). Batch Plannifications
  • 44. Monitor and Control 44 Batch Executions Logs Planificación Batch • Daily global information. • Visual control of executions vs planification • Historical Data..
  • 45. Conclusions • Structure Batch following standards and best practices. • Well tested and optimized components. • Possibilities to exploit horizontal scalability framework offer. • Integration with the rest of the Spring framework (Spring Integration / Spring XD). • Reusability of business logic developed in online applications. • Consider the complexity of integrating Spring Batch with existing enterprise tools. • Migration process from current batches must be normalized to SpringBatch characteristics. • Ensure invariability of the process after migration using appropriate testing tools. • Ensure correctness of framework usage using checkstyle tools. • Design batch having in mind advanced framework capacities (chunking, parallelism). • Measure processes execution ensuring correctness during all process life Benefits Advises
  • 46.
  • 47.
  • 48. Spring Batch for large Enterprises operations Ignasi Gonzalez @ignasi15g