SlideShare a Scribd company logo
Timothy C. Fanelli - Senior IT Specialist
23 September 2013

Three Key Concepts for
Understanding JSR-352:
Batch Applications for the
Java Platform

© 2013 IBM Corporation

Sunday, September 22, 13
Important Disclaimers
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.
WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION
CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED.
ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED
ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE
DIFFERENCES.
ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.
IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT
PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.
IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE
OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.
NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:
- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR
SUPPLIERS AND/OR LICENSORS
2

Sunday, September 22, 13

© 2013 IBM Corporation
About me
 Timothy C. Fanelli
 Senior IT Specialist, IBM - Mainframe
Workload Modernization
 Instructor of Software Engineering Clarkson University, Potsdam NY
 tim@timfanelli.com
 tfanelli@us.ibm.com, tfanelli@clarkson.edu
 Visit the IBM booth #5112 and meet other
IBM developers at JavaOne 2013
3

Sunday, September 22, 13

© 2013 IBM Corporation
Agenda
 Background
 Three Key Concepts
– Implementation
– Orchestration
– Execution
 An Example JSR 352 Application
 Advanced Topics
– Splits and Flows
– Partitioning
– Java EE
 Conclusion and Thoughts on What’s Next...

4

Sunday, September 22, 13

© 2013 IBM Corporation
Background

© 2013 IBM Corporation

Sunday, September 22, 13
Batch Processing
 One of the oldest processing paradigms
 Historically associated with mainframe computing
 Still incredibly relevant today, with fresh challenges in an OLTP driven world

6

Sunday, September 22, 13

© 2013 IBM Corporation
Batch Processing
 One of the oldest processing paradigms
 Historically associated with mainframe computing
 Still incredibly relevant today, with fresh challenges in an OLTP driven world

6

Sunday, September 22, 13

© 2013 IBM Corporation
Java for Batch Processing?
 Mainframe developers have shied away from Java
– Performance concerns over native languages
– Integration concerns for legacy data
– Disparate developer skill set between System Z and Java

7

Sunday, September 22, 13

© 2013 IBM Corporation
Java for Batch Processing?
 Mainframe developers have shied away from Java
– Performance concerns over native languages
– Integration concerns for legacy data
– Disparate developer skill set between System Z and Java
 Java and JavaEE have dominated the Online Transaction Processing world

7

Sunday, September 22, 13

© 2013 IBM Corporation
Java for Batch Processing?
 Mainframe developers have shied away from Java
– Performance concerns over native languages
– Integration concerns for legacy data
– Disparate developer skill set between System Z and Java
 Java and JavaEE have dominated the Online Transaction Processing world
 Time to bridge the two worlds together
– IBM Java for zOS, IBM WebSphere, and Spring Batch paved new paths
– Just-in-Time Compilation, Garbage Collection optimizations proved it out
– Adoption is wide-spread!

7

Sunday, September 22, 13

© 2013 IBM Corporation
Java for Batch Processing?
 Mainframe developers have shied away from Java
– Performance concerns over native languages
– Integration concerns for legacy data
– Disparate developer skill set between System Z and Java
 Java and JavaEE have dominated the Online Transaction Processing world
 Time to bridge the two worlds together
– IBM Java for zOS, IBM WebSphere, and Spring Batch paved new paths
– Just-in-Time Compilation, Garbage Collection optimizations proved it out
– Adoption is wide-spread!
 Only remaining challenge was the lack of a standard
– The need for JSR-352 was obvious

7

Sunday, September 22, 13

© 2013 IBM Corporation
JSR 352: Batch Applications for the Java Platform
 Expert working group formed 29 November 2011
– IBM*, VMWare, RedHat, Oracle, Credit Suisse, Independent participants
– Broad range of talent with deep batch experience

8

Sunday, September 22, 13

© 2013 IBM Corporation
JSR 352: Batch Applications for the Java Platform
 Expert working group formed 29 November 2011
– IBM*, VMWare, RedHat, Oracle, Credit Suisse, Independent participants
– Broad range of talent with deep batch experience
 Final Release 24 May 2013

8

Sunday, September 22, 13

© 2013 IBM Corporation
JSR 352: Batch Applications for the Java Platform
 Expert working group formed 29 November 2011
– IBM*, VMWare, RedHat, Oracle, Credit Suisse, Independent participants
– Broad range of talent with deep batch experience
 Final Release 24 May 2013
 Included in Java EE 7!

8

Sunday, September 22, 13

© 2013 IBM Corporation
Three Key Concepts...

© 2013 IBM Corporation

Sunday, September 22, 13
Three Key Concepts ...
 JSR 352 defines
– Implementation: A programming model for
implementing the artifacts
– Orchestration: A Job Specification Language,
which orchestrates the execution of a batch
artifacts within a job.
– Execution: A runtime environment for executing
batch application, according to a defined
lifecycle.

Orchestrate

Implement

Execute

10

Sunday, September 22, 13

© 2013 IBM Corporation
Three Key Concepts ...
 JSR 352 defines
– Implementation: A programming model for
implementing the artifacts
– Orchestration: A Job Specification Language,
which orchestrates the execution of a batch
artifacts within a job.
– Execution: A runtime environment for executing
batch application, according to a defined
lifecycle.

Orchestrate

Implement

Execute

 Note: “key” concepts, not “new” concepts!
– Roles and abstractions should be familiar to
SOA and JavaEE developers
10

Sunday, September 22, 13

© 2013 IBM Corporation
Anatomy of JSR352
 Those concepts define the anatomy of JSR 352: Batch
Applications for the Java Platform...

11

Sunday, September 22, 13

© 2013 IBM Corporation
Anatomy of JSR352
 Those concepts define the anatomy of JSR 352: Batch
Applications for the Java Platform...

Orchestrate

Implement

Execute

11

Sunday, September 22, 13

© 2013 IBM Corporation
Anatomy of JSR352
 Those concepts define the anatomy of JSR 352: Batch
Applications for the Java Platform...

Listeners
Contexts

Listeners

Partitioning

Batchlet

Orchestrate

Implement

Job
Operator

Job

Reader

Step

Processor

Chunk

Writer

Execute

Job Repository
Chunk
Chunk
Chunk
Listeners

11

Sunday, September 22, 13

© 2013 IBM Corporation
Implementation: The programming model
 Chunk and Batchlet provide models for implementing
a step.

Listeners
Contexts

Listeners

Partitioning

Batchlet
Reader
Processor

Chunk

Writer

Chunk
Chunk
Chunk
Listeners

12

Sunday, September 22, 13

© 2013 IBM Corporation
Implementation: The programming model
 Chunk and Batchlet provide models for implementing
a step.
 Contexts provide Job- and Step- level runtime
information, and provide interim data persistence.

Listeners
Contexts

Listeners

Partitioning

Batchlet
Reader
Processor

Chunk

Writer

Chunk
Chunk
Chunk
Listeners

12

Sunday, September 22, 13

© 2013 IBM Corporation
Implementation: The programming model
 Chunk and Batchlet provide models for implementing
a step.
 Contexts provide Job- and Step- level runtime
information, and provide interim data persistence.
 Listeners provide callback hooks to respond to
lifecycle events on batch artifacts.

Listeners
Contexts

Listeners

Partitioning

Batchlet
Reader
Processor

Chunk

Writer

Chunk
Chunk
Chunk
Listeners

12

Sunday, September 22, 13

© 2013 IBM Corporation
Implementation: The programming model
 Chunk and Batchlet provide models for implementing
a step.
 Contexts provide Job- and Step- level runtime
information, and provide interim data persistence.
 Listeners provide callback hooks to respond to
lifecycle events on batch artifacts.

Listeners
Contexts

Listeners

Partitioning

Batchlet
Reader
Processor

Chunk

 Partitioning provides a mechanism imposing parallel
processing on jobs and steps

Writer

Chunk
Chunk
Chunk
Listeners

12

Sunday, September 22, 13

© 2013 IBM Corporation
Implementation: The programming model
Chunk vs Batchlet
Listeners
Contexts

Listeners

Partitioning

Batchlet
Reader
Processor

Chunk

Writer

Chunk
Chunk
Chunk
Listeners

13

Sunday, September 22, 13

© 2013 IBM Corporation
Implementation: The programming model
Chunk vs Batchlet
 Both are implementations of a step within a batch job
Listeners
Contexts

Listeners

Partitioning

Batchlet
Reader
Processor

Chunk

Writer

Chunk
Chunk
Chunk
Listeners

13

Sunday, September 22, 13

© 2013 IBM Corporation
Implementation: The programming model
Chunk vs Batchlet
 Both are implementations of a step within a batch job
 The chunk model
– Encapsulates a very common pattern: ETL
– Single “reader”, “processor” and “writer”
– Reader/Processor combination is invoked until
an entire “chunk” of data is processed
– Output “chunk” is written atomically

Listeners
Contexts

Listeners

Partitioning

Batchlet
Reader
Processor

Chunk

Writer

Chunk
Chunk
Chunk
Listeners

13

Sunday, September 22, 13

© 2013 IBM Corporation
Implementation: The programming model
Chunk vs Batchlet
 Both are implementations of a step within a batch job
 The chunk model
– Encapsulates a very common pattern: ETL
– Single “reader”, “processor” and “writer”
– Reader/Processor combination is invoked until
an entire “chunk” of data is processed
– Output “chunk” is written atomically
 Batchlet provides a “roll your own” step type
– Invoked and runs to completion, producing a
return code upon exit.

13

Sunday, September 22, 13

Listeners
Contexts

Listeners

Partitioning

Batchlet
Reader
Processor

Chunk

Writer

Chunk
Chunk
Chunk
Listeners

© 2013 IBM Corporation
Orchestration: The Job Specification Language (JSL)
 The JSL defines a batch job as an XML document
Job

14

Sunday, September 22, 13

Step

© 2013 IBM Corporation
Orchestration: The Job Specification Language (JSL)
 The JSL defines a batch job as an XML document
 Describes a step as an assemblage of batch artifacts

14

Sunday, September 22, 13

Job

Step

© 2013 IBM Corporation
Orchestration: The Job Specification Language (JSL)
 The JSL defines a batch job as an XML document
 Describes a step as an assemblage of batch artifacts

Job

Step

 Provides for the description of steps, step groupings,
and execution sequencing

14

Sunday, September 22, 13

© 2013 IBM Corporation
Execution: The JobOperator and Repository
 JobOperator is the runtime interface for job
management, including start, stop, restart and job
repository related commands

Job
Operator

Job Repository

15

Sunday, September 22, 13

© 2013 IBM Corporation
Execution: The JobOperator and Repository
 JobOperator is the runtime interface for job
management, including start, stop, restart and job
repository related commands
 The Job Repository holds information about
completed and executing jobs

15

Sunday, September 22, 13

Job
Operator

Job Repository

© 2013 IBM Corporation
Execution: The JobOperator and Repository
 JobOperator is the runtime interface for job
management, including start, stop, restart and job
repository related commands
 The Job Repository holds information about
completed and executing jobs

Job
Operator

Job Repository

 To start a batch job, get a JobOperator instance use
it to start a job described (described by JSL).

15

Sunday, September 22, 13

© 2013 IBM Corporation
Execution: JobInstance, JobExecution, and StepExecution

Job

Step

*
JobInstance

*
JobExecution

*

*

StepExecution
Job
Operator

16

Sunday, September 22, 13

Job Repository

© 2013 IBM Corporation
Execution: JobInstance, JobExecution, and StepExecution
 The state of a job is broken down into various parts,
and persisted in the repository
– Submitting a job creates a JobInstance, a
logical representation of a particular “run” of a
job.
– A JobExecution is a single attempt to run a
JobInstance. A restart attempt creates another
JobExecution
– Similarly, a StepExecution is a single attempt to
run a step within a job. It is created when a step
starts execution.
Job
Operator

16

Sunday, September 22, 13

Job

Step

*
JobInstance

*
JobExecution

*

*

StepExecution

Job Repository

© 2013 IBM Corporation
An Example JSR 352
Application

© 2013 IBM Corporation

Sunday, September 22, 13
The Application

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:
– Reads strings from an input file

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:
– Reads strings from an input file
– Performs some validation or transforms

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:
– Reads strings from an input file
– Performs some validation or transforms
– Writes validated or transformed string to an output file

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:
– Reads strings from an input file
– Performs some validation or transforms
– Writes validated or transformed string to an output file
‣ Key capabilities

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:
– Reads strings from an input file
– Performs some validation or transforms
– Writes validated or transformed string to an output file
‣ Key capabilities
– If something goes wrong, we don’t want to discard all the
prior work; and we want to pick up where we left off

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:
– Reads strings from an input file
– Performs some validation or transforms
– Writes validated or transformed string to an output file
‣ Key capabilities
– If something goes wrong, we don’t want to discard all the
prior work; and we want to pick up where we left off
– We want control over the transaction scoping so prevent
lock contention in high volume periods

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:
– Reads strings from an input file
– Performs some validation or transforms
– Writes validated or transformed string to an output file
‣ Key capabilities
– If something goes wrong, we don’t want to discard all the
prior work; and we want to pick up where we left off
– We want control over the transaction scoping so prevent
lock contention in high volume periods
– We want flexibility to “plug and play” where our records
come from

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Application
‣ A typical “batch hello world”:
– Reads strings from an input file
– Performs some validation or transforms
– Writes validated or transformed string to an output file
‣ Key capabilities
– If something goes wrong, we don’t want to discard all the
prior work; and we want to pick up where we left off
– We want control over the transaction scoping so prevent
lock contention in high volume periods
– We want flexibility to “plug and play” where our records
come from
– For unit testing, development testing, and QA testing records may come from a variety of sources

18

Sunday, September 22, 13

© 2013 IBM Corporation
The Design
‣ Let’s implement a string-transform in an extract-transform-load pattern

19

Sunday, September 22, 13

© 2013 IBM Corporation
The Design
‣ Let’s implement a string-transform in an extract-transform-load pattern
‣ We’ll use JSR352’s Chunk programming model

19

Sunday, September 22, 13

© 2013 IBM Corporation
The Design
‣ Let’s implement a string-transform in an extract-transform-load pattern
‣ We’ll use JSR352’s Chunk programming model
– Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces

19

Sunday, September 22, 13

© 2013 IBM Corporation
The Design
‣ Let’s implement a string-transform in an extract-transform-load pattern
‣ We’ll use JSR352’s Chunk programming model
– Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces
– Loosely coupled artifacts will be orchestrated into a single-step job later

19

Sunday, September 22, 13

© 2013 IBM Corporation
The Design
‣ Let’s implement a string-transform in an extract-transform-load pattern
‣ We’ll use JSR352’s Chunk programming model
– Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces
– Loosely coupled artifacts will be orchestrated into a single-step job later
– “Free” checkpoint/restart capability

19

Sunday, September 22, 13

© 2013 IBM Corporation
The Design
‣ Let’s implement a string-transform in an extract-transform-load pattern
‣ We’ll use JSR352’s Chunk programming model
– Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces
– Loosely coupled artifacts will be orchestrated into a single-step job later
– “Free” checkpoint/restart capability
– Transaction scoping imposed externally in the job descriptor

19

Sunday, September 22, 13

© 2013 IBM Corporation
The Design
‣ Let’s implement a string-transform in an extract-transform-load pattern
‣ We’ll use JSR352’s Chunk programming model
– Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces
– Loosely coupled artifacts will be orchestrated into a single-step job later
– “Free” checkpoint/restart capability
– Transaction scoping imposed externally in the job descriptor
‣ Job will be executed as a Java SE command line batch application

19

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

20

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

‣ An ItemReader encapsulates the data
access and deserialization of a record.

20

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

‣ An ItemReader encapsulates the data
access and deserialization of a record.
‣ No restriction on data access paradigm: use
DAO patterns, JDBC, JPA, Hibernate,
Spring Data, etc!

20

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

‣ An ItemReader encapsulates the data
access and deserialization of a record.
‣ No restriction on data access paradigm: use
DAO patterns, JDBC, JPA, Hibernate,
Spring Data, etc!
‣ Checkpoint/Restart data provided as
Serializable argument to “open” and from
“checkpointInfo” methods.
20

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

21

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

 An ItemWriter is the output counterpart to
ItemReader

21

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

 An ItemWriter is the output counterpart to
ItemReader
 Primary difference is that writeItems
accepts a “chunk” of output objects (as a
list) to serialize.

21

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

 An ItemWriter is the output counterpart to
ItemReader
 Primary difference is that writeItems
accepts a “chunk” of output objects (as a
list) to serialize.
 Again, no restriction on data access
paradigm!

21

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

22

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

 An ItemProcessor encapsulates the
business logic applied to each record

22

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

 An ItemProcessor encapsulates the
business logic applied to each record
 “main” here demonstrates the invocation of
a batch job, using the JobOperator

22

Sunday, September 22, 13

© 2013 IBM Corporation
The Code
Implement

 An ItemProcessor encapsulates the
business logic applied to each record
 “main” here demonstrates the invocation of
a batch job, using the JobOperator
 Would typically not be in the processor
implementation

22

Sunday, September 22, 13

© 2013 IBM Corporation
The Batch Descriptor and Job Specification
Orchestrate

23

Sunday, September 22, 13

© 2013 IBM Corporation
The Batch Descriptor and Job Specification
Orchestrate

 batch.xml defines and names
the batch artifacts in this
application archive

23

Sunday, September 22, 13

© 2013 IBM Corporation
The Batch Descriptor and Job Specification
Orchestrate

 batch.xml defines and names
the batch artifacts in this
application archive
 sample.xml is an example Job
Specification Language
document for SampleBatchApp

23

Sunday, September 22, 13

© 2013 IBM Corporation
The Execution
Execute

24

Sunday, September 22, 13

© 2013 IBM Corporation
The Execution
Execute

 Package the application as a standard JAR or WAR
for deployment in JavaSE or EE environments
– batch.xml goes in META-INF or WEB-INF/
classes/META-INF
– JSL may go in META-INF/batch-jobs, or
submitted from an external source (up to the
provider!)

24

Sunday, September 22, 13

© 2013 IBM Corporation
The Execution
Execute

25

Sunday, September 22, 13

© 2013 IBM Corporation
The Execution
 See it live?

25

Sunday, September 22, 13

Execute

© 2013 IBM Corporation
Advanced Topics

© 2013 IBM Corporation

Sunday, September 22, 13
Job Management - Restart, Stop, Abandon
Execute

27

Sunday, September 22, 13

© 2013 IBM Corporation
Job Management - Restart, Stop, Abandon
 Had something gone wrong, what then?
– The “main” program shown was too simple... only
“started” the job

27

Sunday, September 22, 13

Execute

© 2013 IBM Corporation
Job Management - Restart, Stop, Abandon
 Had something gone wrong, what then?
– The “main” program shown was too simple... only
“started” the job

Execute

 JobOperator exposes APIs for a variety of job
management tasks: start, stop, abandon, restart
– Would have had to take advantage of these for
advanced job management capabilities.

27

Sunday, September 22, 13

© 2013 IBM Corporation
Job Management - Restart, Stop, Abandon
 Had something gone wrong, what then?
– The “main” program shown was too simple... only
“started” the job

Execute

 JobOperator exposes APIs for a variety of job
management tasks: start, stop, abandon, restart
– Would have had to take advantage of these for
advanced job management capabilities.
 The door is left open for more advanced batch job
management systems to be built!
– Integration into existing enterprise schedulers?
– New Java EE batch scheduling standard?
– Plenty of options, but currently left to the provider
to implement
27

Sunday, September 22, 13

© 2013 IBM Corporation
Java EE Integration
Execute

28

Sunday, September 22, 13

© 2013 IBM Corporation
Java EE Integration
 JSR-352: Java Batch is included in Java EE 7

28

Sunday, September 22, 13

Execute

© 2013 IBM Corporation
Java EE Integration
 JSR-352: Java Batch is included in Java EE 7

Execute

 Provides EE clustering, security, resource
management, etc to Java Batch applications

28

Sunday, September 22, 13

© 2013 IBM Corporation
Java EE Integration
 JSR-352: Java Batch is included in Java EE 7

Execute

 Provides EE clustering, security, resource
management, etc to Java Batch applications
 Performance benefits to dispatching into longrunning, reusable container
– JIT compilation through the first couple runs
– Eliminates overhead of starting / stopping JVM

28

Sunday, September 22, 13

© 2013 IBM Corporation
Parallel Job Processing
Orchestrate

29

Sunday, September 22, 13

© 2013 IBM Corporation
Parallel Job Processing
 Splits and Flows provide a mechanism for executing
job steps concurrently at the orchestration layer

29

Sunday, September 22, 13

Orchestrate

© 2013 IBM Corporation
Parallel Job Processing
 Splits and Flows provide a mechanism for executing
job steps concurrently at the orchestration layer

Orchestrate

 A flow is a sequence of one or more steps which
execute sequentially, but as a single unit.

29

Sunday, September 22, 13

© 2013 IBM Corporation
Parallel Job Processing
 Splits and Flows provide a mechanism for executing
job steps concurrently at the orchestration layer

Orchestrate

 A flow is a sequence of one or more steps which
execute sequentially, but as a single unit.
 A Split is a collection of flows that may execute
concurrently
– A split may only contain “flows”; a step is not
implicitly a flow

29

Sunday, September 22, 13

© 2013 IBM Corporation
Parallel Job Processing
 Splits and Flows provide a mechanism for executing
job steps concurrently at the orchestration layer

Orchestrate

 A flow is a sequence of one or more steps which
execute sequentially, but as a single unit.
 A Split is a collection of flows that may execute
concurrently
– A split may only contain “flows”; a step is not
implicitly a flow
 This is done entirely in the JSL descriptor
– Imposed on the batch application with no code
changes!

29

Sunday, September 22, 13

© 2013 IBM Corporation
Parallel Job Processing
Implement

30

Sunday, September 22, 13

© 2013 IBM Corporation
Parallel Job Processing
 Step-level parallelism can be achieved programmatically using
step partitioning

30

Sunday, September 22, 13

Implement

© 2013 IBM Corporation
Parallel Job Processing
 Step-level parallelism can be achieved programmatically using
step partitioning

Implement

 A partitioned step runs as multiple instances with distinct
property sets

30

Sunday, September 22, 13

© 2013 IBM Corporation
Parallel Job Processing
 Step-level parallelism can be achieved programmatically using
step partitioning

Implement

 A partitioned step runs as multiple instances with distinct
property sets
 PartitionMapper defines the number of partitions, and property
values for each partition
– Can be a fixed set of partitions in JSL
– Can be dynamic using a PartitionMapper implementation

30

Sunday, September 22, 13

© 2013 IBM Corporation
Parallel Job Processing

31

Sunday, September 22, 13

© 2013 IBM Corporation
Wrap up...

© 2013 IBM Corporation

Sunday, September 22, 13
Batch Processing
 The oldest “new thing” in Java
 JSR 352 applies the modern thinking and abstraction of Java EE and SOA and applies it to
sequential batch processing
 The standardized programming model provides application developers vendor portability
 Inclusion in Java EE 7 ensures wide spread availability

33

Sunday, September 22, 13

© 2013 IBM Corporation
Questions?
Find this presentation and more!
http://ibm.co/JavaOne2013

© 2013 IBM Corporation

Sunday, September 22, 13

More Related Content

What's hot

JavaOne2013: Secure Engineering Practices for Java
JavaOne2013: Secure Engineering Practices for JavaJavaOne2013: Secure Engineering Practices for Java
JavaOne2013: Secure Engineering Practices for Java
Chris Bailey
 
JavaOne 2013 CON7370: Java Interprocess Communication Challenges in Low-Laten...
JavaOne 2013 CON7370: Java Interprocess Communication Challenges in Low-Laten...JavaOne 2013 CON7370: Java Interprocess Communication Challenges in Low-Laten...
JavaOne 2013 CON7370: Java Interprocess Communication Challenges in Low-Laten...
0xdaryl
 
What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?
Tim Ellison
 
Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013
MattKilner
 
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
Rakuten Group, Inc.
 
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
Stephan H. Wissel
 
AD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even EasierAD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even Easier
pdhannan
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark Performance
Tim Ellison
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
Eugene Bogaart
 
Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?
Fred Rowe
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
Ryan Cuprak
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
Tejasvi Rastogi
 
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsImpact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java Tools
Chris Bailey
 
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
Chris Bailey
 
JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great Match
Reza Rahman
 
Image Converter
Image ConverterImage Converter
Image Converter
Navin Kumar
 
JavaOne 2015: From Java Code to Machine Code
JavaOne 2015: From Java Code to Machine CodeJavaOne 2015: From Java Code to Machine Code
JavaOne 2015: From Java Code to Machine Code
Chris Bailey
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview Questions
Syed Shahul
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
Hirofumi Iwasaki
 

What's hot (20)

JavaOne2013: Secure Engineering Practices for Java
JavaOne2013: Secure Engineering Practices for JavaJavaOne2013: Secure Engineering Practices for Java
JavaOne2013: Secure Engineering Practices for Java
 
JavaOne 2013 CON7370: Java Interprocess Communication Challenges in Low-Laten...
JavaOne 2013 CON7370: Java Interprocess Communication Challenges in Low-Laten...JavaOne 2013 CON7370: Java Interprocess Communication Challenges in Low-Laten...
JavaOne 2013 CON7370: Java Interprocess Communication Challenges in Low-Laten...
 
What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?
 
Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013
 
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
 
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
 
AD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even EasierAD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even Easier
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark Performance
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
 
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsImpact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java Tools
 
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Healt...
 
JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great Match
 
Image Converter
Image ConverterImage Converter
Image Converter
 
JavaOne 2015: From Java Code to Machine Code
JavaOne 2015: From Java Code to Machine CodeJavaOne 2015: From Java Code to Machine Code
JavaOne 2015: From Java Code to Machine Code
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview Questions
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
 

Viewers also liked

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
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
Mohanraj Thirumoorthy
 
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
nick_garrod
 
Spring Batch Performance Tuning
Spring Batch Performance TuningSpring Batch Performance Tuning
Spring Batch Performance Tuning
Gunnar Hillert
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch Processing
Chris Adkin
 
Design & Develop Batch Applications in Java/JEE
Design & Develop Batch Applications in Java/JEEDesign & Develop Batch Applications in Java/JEE
Design & Develop Batch Applications in Java/JEE
Naresh Chintalcheru
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
timfanelli
 
JPA 2.1 performance tuning tips
JPA 2.1 performance tuning tipsJPA 2.1 performance tuning tips
JPA 2.1 performance tuning tips
osa_ora
 
Spring batch for large enterprises operations
Spring batch for large enterprises operations Spring batch for large enterprises operations
Spring batch for large enterprises operations
Ignasi González
 
Java EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real WorldJava EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real World
Roberto Cortez
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
Rohit Kelapure
 

Viewers also liked (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.
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
 
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
 
Spring Batch Performance Tuning
Spring Batch Performance TuningSpring Batch Performance Tuning
Spring Batch Performance Tuning
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch Processing
 
Design & Develop Batch Applications in Java/JEE
Design & Develop Batch Applications in Java/JEEDesign & Develop Batch Applications in Java/JEE
Design & Develop Batch Applications in Java/JEE
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
 
JPA 2.1 performance tuning tips
JPA 2.1 performance tuning tipsJPA 2.1 performance tuning tips
JPA 2.1 performance tuning tips
 
Spring batch for large enterprises operations
Spring batch for large enterprises operations Spring batch for large enterprises operations
Spring batch for large enterprises operations
 
Java EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real WorldJava EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real World
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
 

Similar to Three key concepts for java batch

Sivaprasanth Rentala_Kedar profile
Sivaprasanth Rentala_Kedar profileSivaprasanth Rentala_Kedar profile
Sivaprasanth Rentala_Kedar profile
sivaprasanth rentala
 
JPA Performance Myths -- JavaOne 2013
JPA Performance Myths -- JavaOne 2013JPA Performance Myths -- JavaOne 2013
JPA Performance Myths -- JavaOne 2013
richardgcurtis
 
1.INTRODUCTION TO JAVA_2022 MB.ppt .
1.INTRODUCTION TO JAVA_2022 MB.ppt      .1.INTRODUCTION TO JAVA_2022 MB.ppt      .
1.INTRODUCTION TO JAVA_2022 MB.ppt .
happycocoman
 
Java on zSystems zOS
Java on zSystems zOSJava on zSystems zOS
Java on zSystems zOS
Tim Ellison
 
Real World Java Compatibility
Real World Java CompatibilityReal World Java Compatibility
Real World Java Compatibility
Tim Ellison
 
IBM Z for the Digital Enterprise - DevOps for Z
IBM Z for the Digital Enterprise - DevOps for Z IBM Z for the Digital Enterprise - DevOps for Z
IBM Z for the Digital Enterprise - DevOps for Z
DevOps for Enterprise Systems
 
Dev ops for z
Dev ops for z Dev ops for z
Dev ops for z
bamadhu
 
Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...
IBM UrbanCode Products
 
Good Design is Good Business: Business Design with RSA and SA
Good Design is Good Business: Business Design with RSA and SAGood Design is Good Business: Business Design with RSA and SA
Good Design is Good Business: Business Design with RSA and SA
Roger Snook
 
JDXA, The KISS ORM for Android
JDXA, The KISS ORM for AndroidJDXA, The KISS ORM for Android
JDXA, The KISS ORM for Android
Damodar Periwal
 
Programming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionappsProgramming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionapps
Berry Clemens
 
J2EE Performance And Scalability Bp
J2EE Performance And Scalability BpJ2EE Performance And Scalability Bp
J2EE Performance And Scalability Bp
Chris Adkin
 
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEd presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
Edward Burns
 
Improving Software Delivery with DevOps & Software Defined Environments
Improving Software Delivery with DevOps & Software Defined EnvironmentsImproving Software Delivery with DevOps & Software Defined Environments
Improving Software Delivery with DevOps & Software Defined Environments
Michael Elder
 
J9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMJ9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVM
DanHeidinga
 
Ch01 SE
Ch01 SECh01 SE
Ch01 SE
mahirazainab
 
Software engineering principles in system software design
Software engineering principles in system software designSoftware engineering principles in system software design
Software engineering principles in system software design
Tech_MX
 
B2 whats new with oracle exalogic worlds best foundation for applications
B2   whats new with oracle exalogic worlds best foundation for applicationsB2   whats new with oracle exalogic worlds best foundation for applications
B2 whats new with oracle exalogic worlds best foundation for applications
Dr. Wilfred Lin (Ph.D.)
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
kanchanmahajan23
 
Assignment 3 TCSS 143 Programming Assignment 3 .docx
Assignment 3  TCSS 143 Programming Assignment 3  .docxAssignment 3  TCSS 143 Programming Assignment 3  .docx
Assignment 3 TCSS 143 Programming Assignment 3 .docx
ursabrooks36447
 

Similar to Three key concepts for java batch (20)

Sivaprasanth Rentala_Kedar profile
Sivaprasanth Rentala_Kedar profileSivaprasanth Rentala_Kedar profile
Sivaprasanth Rentala_Kedar profile
 
JPA Performance Myths -- JavaOne 2013
JPA Performance Myths -- JavaOne 2013JPA Performance Myths -- JavaOne 2013
JPA Performance Myths -- JavaOne 2013
 
1.INTRODUCTION TO JAVA_2022 MB.ppt .
1.INTRODUCTION TO JAVA_2022 MB.ppt      .1.INTRODUCTION TO JAVA_2022 MB.ppt      .
1.INTRODUCTION TO JAVA_2022 MB.ppt .
 
Java on zSystems zOS
Java on zSystems zOSJava on zSystems zOS
Java on zSystems zOS
 
Real World Java Compatibility
Real World Java CompatibilityReal World Java Compatibility
Real World Java Compatibility
 
IBM Z for the Digital Enterprise - DevOps for Z
IBM Z for the Digital Enterprise - DevOps for Z IBM Z for the Digital Enterprise - DevOps for Z
IBM Z for the Digital Enterprise - DevOps for Z
 
Dev ops for z
Dev ops for z Dev ops for z
Dev ops for z
 
Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...
 
Good Design is Good Business: Business Design with RSA and SA
Good Design is Good Business: Business Design with RSA and SAGood Design is Good Business: Business Design with RSA and SA
Good Design is Good Business: Business Design with RSA and SA
 
JDXA, The KISS ORM for Android
JDXA, The KISS ORM for AndroidJDXA, The KISS ORM for Android
JDXA, The KISS ORM for Android
 
Programming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionappsProgramming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionapps
 
J2EE Performance And Scalability Bp
J2EE Performance And Scalability BpJ2EE Performance And Scalability Bp
J2EE Performance And Scalability Bp
 
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEd presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
 
Improving Software Delivery with DevOps & Software Defined Environments
Improving Software Delivery with DevOps & Software Defined EnvironmentsImproving Software Delivery with DevOps & Software Defined Environments
Improving Software Delivery with DevOps & Software Defined Environments
 
J9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMJ9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVM
 
Ch01 SE
Ch01 SECh01 SE
Ch01 SE
 
Software engineering principles in system software design
Software engineering principles in system software designSoftware engineering principles in system software design
Software engineering principles in system software design
 
B2 whats new with oracle exalogic worlds best foundation for applications
B2   whats new with oracle exalogic worlds best foundation for applicationsB2   whats new with oracle exalogic worlds best foundation for applications
B2 whats new with oracle exalogic worlds best foundation for applications
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
 
Assignment 3 TCSS 143 Programming Assignment 3 .docx
Assignment 3  TCSS 143 Programming Assignment 3  .docxAssignment 3  TCSS 143 Programming Assignment 3  .docx
Assignment 3 TCSS 143 Programming Assignment 3 .docx
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 

Three key concepts for java batch

  • 1. Timothy C. Fanelli - Senior IT Specialist 23 September 2013 Three Key Concepts for Understanding JSR-352: Batch Applications for the Java Platform © 2013 IBM Corporation Sunday, September 22, 13
  • 2. Important Disclaimers THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES. ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: - CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS 2 Sunday, September 22, 13 © 2013 IBM Corporation
  • 3. About me  Timothy C. Fanelli  Senior IT Specialist, IBM - Mainframe Workload Modernization  Instructor of Software Engineering Clarkson University, Potsdam NY  tim@timfanelli.com  tfanelli@us.ibm.com, tfanelli@clarkson.edu  Visit the IBM booth #5112 and meet other IBM developers at JavaOne 2013 3 Sunday, September 22, 13 © 2013 IBM Corporation
  • 4. Agenda  Background  Three Key Concepts – Implementation – Orchestration – Execution  An Example JSR 352 Application  Advanced Topics – Splits and Flows – Partitioning – Java EE  Conclusion and Thoughts on What’s Next... 4 Sunday, September 22, 13 © 2013 IBM Corporation
  • 5. Background © 2013 IBM Corporation Sunday, September 22, 13
  • 6. Batch Processing  One of the oldest processing paradigms  Historically associated with mainframe computing  Still incredibly relevant today, with fresh challenges in an OLTP driven world 6 Sunday, September 22, 13 © 2013 IBM Corporation
  • 7. Batch Processing  One of the oldest processing paradigms  Historically associated with mainframe computing  Still incredibly relevant today, with fresh challenges in an OLTP driven world 6 Sunday, September 22, 13 © 2013 IBM Corporation
  • 8. Java for Batch Processing?  Mainframe developers have shied away from Java – Performance concerns over native languages – Integration concerns for legacy data – Disparate developer skill set between System Z and Java 7 Sunday, September 22, 13 © 2013 IBM Corporation
  • 9. Java for Batch Processing?  Mainframe developers have shied away from Java – Performance concerns over native languages – Integration concerns for legacy data – Disparate developer skill set between System Z and Java  Java and JavaEE have dominated the Online Transaction Processing world 7 Sunday, September 22, 13 © 2013 IBM Corporation
  • 10. Java for Batch Processing?  Mainframe developers have shied away from Java – Performance concerns over native languages – Integration concerns for legacy data – Disparate developer skill set between System Z and Java  Java and JavaEE have dominated the Online Transaction Processing world  Time to bridge the two worlds together – IBM Java for zOS, IBM WebSphere, and Spring Batch paved new paths – Just-in-Time Compilation, Garbage Collection optimizations proved it out – Adoption is wide-spread! 7 Sunday, September 22, 13 © 2013 IBM Corporation
  • 11. Java for Batch Processing?  Mainframe developers have shied away from Java – Performance concerns over native languages – Integration concerns for legacy data – Disparate developer skill set between System Z and Java  Java and JavaEE have dominated the Online Transaction Processing world  Time to bridge the two worlds together – IBM Java for zOS, IBM WebSphere, and Spring Batch paved new paths – Just-in-Time Compilation, Garbage Collection optimizations proved it out – Adoption is wide-spread!  Only remaining challenge was the lack of a standard – The need for JSR-352 was obvious 7 Sunday, September 22, 13 © 2013 IBM Corporation
  • 12. JSR 352: Batch Applications for the Java Platform  Expert working group formed 29 November 2011 – IBM*, VMWare, RedHat, Oracle, Credit Suisse, Independent participants – Broad range of talent with deep batch experience 8 Sunday, September 22, 13 © 2013 IBM Corporation
  • 13. JSR 352: Batch Applications for the Java Platform  Expert working group formed 29 November 2011 – IBM*, VMWare, RedHat, Oracle, Credit Suisse, Independent participants – Broad range of talent with deep batch experience  Final Release 24 May 2013 8 Sunday, September 22, 13 © 2013 IBM Corporation
  • 14. JSR 352: Batch Applications for the Java Platform  Expert working group formed 29 November 2011 – IBM*, VMWare, RedHat, Oracle, Credit Suisse, Independent participants – Broad range of talent with deep batch experience  Final Release 24 May 2013  Included in Java EE 7! 8 Sunday, September 22, 13 © 2013 IBM Corporation
  • 15. Three Key Concepts... © 2013 IBM Corporation Sunday, September 22, 13
  • 16. Three Key Concepts ...  JSR 352 defines – Implementation: A programming model for implementing the artifacts – Orchestration: A Job Specification Language, which orchestrates the execution of a batch artifacts within a job. – Execution: A runtime environment for executing batch application, according to a defined lifecycle. Orchestrate Implement Execute 10 Sunday, September 22, 13 © 2013 IBM Corporation
  • 17. Three Key Concepts ...  JSR 352 defines – Implementation: A programming model for implementing the artifacts – Orchestration: A Job Specification Language, which orchestrates the execution of a batch artifacts within a job. – Execution: A runtime environment for executing batch application, according to a defined lifecycle. Orchestrate Implement Execute  Note: “key” concepts, not “new” concepts! – Roles and abstractions should be familiar to SOA and JavaEE developers 10 Sunday, September 22, 13 © 2013 IBM Corporation
  • 18. Anatomy of JSR352  Those concepts define the anatomy of JSR 352: Batch Applications for the Java Platform... 11 Sunday, September 22, 13 © 2013 IBM Corporation
  • 19. Anatomy of JSR352  Those concepts define the anatomy of JSR 352: Batch Applications for the Java Platform... Orchestrate Implement Execute 11 Sunday, September 22, 13 © 2013 IBM Corporation
  • 20. Anatomy of JSR352  Those concepts define the anatomy of JSR 352: Batch Applications for the Java Platform... Listeners Contexts Listeners Partitioning Batchlet Orchestrate Implement Job Operator Job Reader Step Processor Chunk Writer Execute Job Repository Chunk Chunk Chunk Listeners 11 Sunday, September 22, 13 © 2013 IBM Corporation
  • 21. Implementation: The programming model  Chunk and Batchlet provide models for implementing a step. Listeners Contexts Listeners Partitioning Batchlet Reader Processor Chunk Writer Chunk Chunk Chunk Listeners 12 Sunday, September 22, 13 © 2013 IBM Corporation
  • 22. Implementation: The programming model  Chunk and Batchlet provide models for implementing a step.  Contexts provide Job- and Step- level runtime information, and provide interim data persistence. Listeners Contexts Listeners Partitioning Batchlet Reader Processor Chunk Writer Chunk Chunk Chunk Listeners 12 Sunday, September 22, 13 © 2013 IBM Corporation
  • 23. Implementation: The programming model  Chunk and Batchlet provide models for implementing a step.  Contexts provide Job- and Step- level runtime information, and provide interim data persistence.  Listeners provide callback hooks to respond to lifecycle events on batch artifacts. Listeners Contexts Listeners Partitioning Batchlet Reader Processor Chunk Writer Chunk Chunk Chunk Listeners 12 Sunday, September 22, 13 © 2013 IBM Corporation
  • 24. Implementation: The programming model  Chunk and Batchlet provide models for implementing a step.  Contexts provide Job- and Step- level runtime information, and provide interim data persistence.  Listeners provide callback hooks to respond to lifecycle events on batch artifacts. Listeners Contexts Listeners Partitioning Batchlet Reader Processor Chunk  Partitioning provides a mechanism imposing parallel processing on jobs and steps Writer Chunk Chunk Chunk Listeners 12 Sunday, September 22, 13 © 2013 IBM Corporation
  • 25. Implementation: The programming model Chunk vs Batchlet Listeners Contexts Listeners Partitioning Batchlet Reader Processor Chunk Writer Chunk Chunk Chunk Listeners 13 Sunday, September 22, 13 © 2013 IBM Corporation
  • 26. Implementation: The programming model Chunk vs Batchlet  Both are implementations of a step within a batch job Listeners Contexts Listeners Partitioning Batchlet Reader Processor Chunk Writer Chunk Chunk Chunk Listeners 13 Sunday, September 22, 13 © 2013 IBM Corporation
  • 27. Implementation: The programming model Chunk vs Batchlet  Both are implementations of a step within a batch job  The chunk model – Encapsulates a very common pattern: ETL – Single “reader”, “processor” and “writer” – Reader/Processor combination is invoked until an entire “chunk” of data is processed – Output “chunk” is written atomically Listeners Contexts Listeners Partitioning Batchlet Reader Processor Chunk Writer Chunk Chunk Chunk Listeners 13 Sunday, September 22, 13 © 2013 IBM Corporation
  • 28. Implementation: The programming model Chunk vs Batchlet  Both are implementations of a step within a batch job  The chunk model – Encapsulates a very common pattern: ETL – Single “reader”, “processor” and “writer” – Reader/Processor combination is invoked until an entire “chunk” of data is processed – Output “chunk” is written atomically  Batchlet provides a “roll your own” step type – Invoked and runs to completion, producing a return code upon exit. 13 Sunday, September 22, 13 Listeners Contexts Listeners Partitioning Batchlet Reader Processor Chunk Writer Chunk Chunk Chunk Listeners © 2013 IBM Corporation
  • 29. Orchestration: The Job Specification Language (JSL)  The JSL defines a batch job as an XML document Job 14 Sunday, September 22, 13 Step © 2013 IBM Corporation
  • 30. Orchestration: The Job Specification Language (JSL)  The JSL defines a batch job as an XML document  Describes a step as an assemblage of batch artifacts 14 Sunday, September 22, 13 Job Step © 2013 IBM Corporation
  • 31. Orchestration: The Job Specification Language (JSL)  The JSL defines a batch job as an XML document  Describes a step as an assemblage of batch artifacts Job Step  Provides for the description of steps, step groupings, and execution sequencing 14 Sunday, September 22, 13 © 2013 IBM Corporation
  • 32. Execution: The JobOperator and Repository  JobOperator is the runtime interface for job management, including start, stop, restart and job repository related commands Job Operator Job Repository 15 Sunday, September 22, 13 © 2013 IBM Corporation
  • 33. Execution: The JobOperator and Repository  JobOperator is the runtime interface for job management, including start, stop, restart and job repository related commands  The Job Repository holds information about completed and executing jobs 15 Sunday, September 22, 13 Job Operator Job Repository © 2013 IBM Corporation
  • 34. Execution: The JobOperator and Repository  JobOperator is the runtime interface for job management, including start, stop, restart and job repository related commands  The Job Repository holds information about completed and executing jobs Job Operator Job Repository  To start a batch job, get a JobOperator instance use it to start a job described (described by JSL). 15 Sunday, September 22, 13 © 2013 IBM Corporation
  • 35. Execution: JobInstance, JobExecution, and StepExecution Job Step * JobInstance * JobExecution * * StepExecution Job Operator 16 Sunday, September 22, 13 Job Repository © 2013 IBM Corporation
  • 36. Execution: JobInstance, JobExecution, and StepExecution  The state of a job is broken down into various parts, and persisted in the repository – Submitting a job creates a JobInstance, a logical representation of a particular “run” of a job. – A JobExecution is a single attempt to run a JobInstance. A restart attempt creates another JobExecution – Similarly, a StepExecution is a single attempt to run a step within a job. It is created when a step starts execution. Job Operator 16 Sunday, September 22, 13 Job Step * JobInstance * JobExecution * * StepExecution Job Repository © 2013 IBM Corporation
  • 37. An Example JSR 352 Application © 2013 IBM Corporation Sunday, September 22, 13
  • 38. The Application 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 39. The Application ‣ A typical “batch hello world”: 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 40. The Application ‣ A typical “batch hello world”: – Reads strings from an input file 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 41. The Application ‣ A typical “batch hello world”: – Reads strings from an input file – Performs some validation or transforms 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 42. The Application ‣ A typical “batch hello world”: – Reads strings from an input file – Performs some validation or transforms – Writes validated or transformed string to an output file 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 43. The Application ‣ A typical “batch hello world”: – Reads strings from an input file – Performs some validation or transforms – Writes validated or transformed string to an output file ‣ Key capabilities 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 44. The Application ‣ A typical “batch hello world”: – Reads strings from an input file – Performs some validation or transforms – Writes validated or transformed string to an output file ‣ Key capabilities – If something goes wrong, we don’t want to discard all the prior work; and we want to pick up where we left off 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 45. The Application ‣ A typical “batch hello world”: – Reads strings from an input file – Performs some validation or transforms – Writes validated or transformed string to an output file ‣ Key capabilities – If something goes wrong, we don’t want to discard all the prior work; and we want to pick up where we left off – We want control over the transaction scoping so prevent lock contention in high volume periods 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 46. The Application ‣ A typical “batch hello world”: – Reads strings from an input file – Performs some validation or transforms – Writes validated or transformed string to an output file ‣ Key capabilities – If something goes wrong, we don’t want to discard all the prior work; and we want to pick up where we left off – We want control over the transaction scoping so prevent lock contention in high volume periods – We want flexibility to “plug and play” where our records come from 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 47. The Application ‣ A typical “batch hello world”: – Reads strings from an input file – Performs some validation or transforms – Writes validated or transformed string to an output file ‣ Key capabilities – If something goes wrong, we don’t want to discard all the prior work; and we want to pick up where we left off – We want control over the transaction scoping so prevent lock contention in high volume periods – We want flexibility to “plug and play” where our records come from – For unit testing, development testing, and QA testing records may come from a variety of sources 18 Sunday, September 22, 13 © 2013 IBM Corporation
  • 48. The Design ‣ Let’s implement a string-transform in an extract-transform-load pattern 19 Sunday, September 22, 13 © 2013 IBM Corporation
  • 49. The Design ‣ Let’s implement a string-transform in an extract-transform-load pattern ‣ We’ll use JSR352’s Chunk programming model 19 Sunday, September 22, 13 © 2013 IBM Corporation
  • 50. The Design ‣ Let’s implement a string-transform in an extract-transform-load pattern ‣ We’ll use JSR352’s Chunk programming model – Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces 19 Sunday, September 22, 13 © 2013 IBM Corporation
  • 51. The Design ‣ Let’s implement a string-transform in an extract-transform-load pattern ‣ We’ll use JSR352’s Chunk programming model – Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces – Loosely coupled artifacts will be orchestrated into a single-step job later 19 Sunday, September 22, 13 © 2013 IBM Corporation
  • 52. The Design ‣ Let’s implement a string-transform in an extract-transform-load pattern ‣ We’ll use JSR352’s Chunk programming model – Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces – Loosely coupled artifacts will be orchestrated into a single-step job later – “Free” checkpoint/restart capability 19 Sunday, September 22, 13 © 2013 IBM Corporation
  • 53. The Design ‣ Let’s implement a string-transform in an extract-transform-load pattern ‣ We’ll use JSR352’s Chunk programming model – Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces – Loosely coupled artifacts will be orchestrated into a single-step job later – “Free” checkpoint/restart capability – Transaction scoping imposed externally in the job descriptor 19 Sunday, September 22, 13 © 2013 IBM Corporation
  • 54. The Design ‣ Let’s implement a string-transform in an extract-transform-load pattern ‣ We’ll use JSR352’s Chunk programming model – Encapsulates the ETL pattern components as Reader, Processor, and Writer interfaces – Loosely coupled artifacts will be orchestrated into a single-step job later – “Free” checkpoint/restart capability – Transaction scoping imposed externally in the job descriptor ‣ Job will be executed as a Java SE command line batch application 19 Sunday, September 22, 13 © 2013 IBM Corporation
  • 55. The Code Implement 20 Sunday, September 22, 13 © 2013 IBM Corporation
  • 56. The Code Implement ‣ An ItemReader encapsulates the data access and deserialization of a record. 20 Sunday, September 22, 13 © 2013 IBM Corporation
  • 57. The Code Implement ‣ An ItemReader encapsulates the data access and deserialization of a record. ‣ No restriction on data access paradigm: use DAO patterns, JDBC, JPA, Hibernate, Spring Data, etc! 20 Sunday, September 22, 13 © 2013 IBM Corporation
  • 58. The Code Implement ‣ An ItemReader encapsulates the data access and deserialization of a record. ‣ No restriction on data access paradigm: use DAO patterns, JDBC, JPA, Hibernate, Spring Data, etc! ‣ Checkpoint/Restart data provided as Serializable argument to “open” and from “checkpointInfo” methods. 20 Sunday, September 22, 13 © 2013 IBM Corporation
  • 59. The Code Implement 21 Sunday, September 22, 13 © 2013 IBM Corporation
  • 60. The Code Implement  An ItemWriter is the output counterpart to ItemReader 21 Sunday, September 22, 13 © 2013 IBM Corporation
  • 61. The Code Implement  An ItemWriter is the output counterpart to ItemReader  Primary difference is that writeItems accepts a “chunk” of output objects (as a list) to serialize. 21 Sunday, September 22, 13 © 2013 IBM Corporation
  • 62. The Code Implement  An ItemWriter is the output counterpart to ItemReader  Primary difference is that writeItems accepts a “chunk” of output objects (as a list) to serialize.  Again, no restriction on data access paradigm! 21 Sunday, September 22, 13 © 2013 IBM Corporation
  • 63. The Code Implement 22 Sunday, September 22, 13 © 2013 IBM Corporation
  • 64. The Code Implement  An ItemProcessor encapsulates the business logic applied to each record 22 Sunday, September 22, 13 © 2013 IBM Corporation
  • 65. The Code Implement  An ItemProcessor encapsulates the business logic applied to each record  “main” here demonstrates the invocation of a batch job, using the JobOperator 22 Sunday, September 22, 13 © 2013 IBM Corporation
  • 66. The Code Implement  An ItemProcessor encapsulates the business logic applied to each record  “main” here demonstrates the invocation of a batch job, using the JobOperator  Would typically not be in the processor implementation 22 Sunday, September 22, 13 © 2013 IBM Corporation
  • 67. The Batch Descriptor and Job Specification Orchestrate 23 Sunday, September 22, 13 © 2013 IBM Corporation
  • 68. The Batch Descriptor and Job Specification Orchestrate  batch.xml defines and names the batch artifacts in this application archive 23 Sunday, September 22, 13 © 2013 IBM Corporation
  • 69. The Batch Descriptor and Job Specification Orchestrate  batch.xml defines and names the batch artifacts in this application archive  sample.xml is an example Job Specification Language document for SampleBatchApp 23 Sunday, September 22, 13 © 2013 IBM Corporation
  • 70. The Execution Execute 24 Sunday, September 22, 13 © 2013 IBM Corporation
  • 71. The Execution Execute  Package the application as a standard JAR or WAR for deployment in JavaSE or EE environments – batch.xml goes in META-INF or WEB-INF/ classes/META-INF – JSL may go in META-INF/batch-jobs, or submitted from an external source (up to the provider!) 24 Sunday, September 22, 13 © 2013 IBM Corporation
  • 72. The Execution Execute 25 Sunday, September 22, 13 © 2013 IBM Corporation
  • 73. The Execution  See it live? 25 Sunday, September 22, 13 Execute © 2013 IBM Corporation
  • 74. Advanced Topics © 2013 IBM Corporation Sunday, September 22, 13
  • 75. Job Management - Restart, Stop, Abandon Execute 27 Sunday, September 22, 13 © 2013 IBM Corporation
  • 76. Job Management - Restart, Stop, Abandon  Had something gone wrong, what then? – The “main” program shown was too simple... only “started” the job 27 Sunday, September 22, 13 Execute © 2013 IBM Corporation
  • 77. Job Management - Restart, Stop, Abandon  Had something gone wrong, what then? – The “main” program shown was too simple... only “started” the job Execute  JobOperator exposes APIs for a variety of job management tasks: start, stop, abandon, restart – Would have had to take advantage of these for advanced job management capabilities. 27 Sunday, September 22, 13 © 2013 IBM Corporation
  • 78. Job Management - Restart, Stop, Abandon  Had something gone wrong, what then? – The “main” program shown was too simple... only “started” the job Execute  JobOperator exposes APIs for a variety of job management tasks: start, stop, abandon, restart – Would have had to take advantage of these for advanced job management capabilities.  The door is left open for more advanced batch job management systems to be built! – Integration into existing enterprise schedulers? – New Java EE batch scheduling standard? – Plenty of options, but currently left to the provider to implement 27 Sunday, September 22, 13 © 2013 IBM Corporation
  • 79. Java EE Integration Execute 28 Sunday, September 22, 13 © 2013 IBM Corporation
  • 80. Java EE Integration  JSR-352: Java Batch is included in Java EE 7 28 Sunday, September 22, 13 Execute © 2013 IBM Corporation
  • 81. Java EE Integration  JSR-352: Java Batch is included in Java EE 7 Execute  Provides EE clustering, security, resource management, etc to Java Batch applications 28 Sunday, September 22, 13 © 2013 IBM Corporation
  • 82. Java EE Integration  JSR-352: Java Batch is included in Java EE 7 Execute  Provides EE clustering, security, resource management, etc to Java Batch applications  Performance benefits to dispatching into longrunning, reusable container – JIT compilation through the first couple runs – Eliminates overhead of starting / stopping JVM 28 Sunday, September 22, 13 © 2013 IBM Corporation
  • 83. Parallel Job Processing Orchestrate 29 Sunday, September 22, 13 © 2013 IBM Corporation
  • 84. Parallel Job Processing  Splits and Flows provide a mechanism for executing job steps concurrently at the orchestration layer 29 Sunday, September 22, 13 Orchestrate © 2013 IBM Corporation
  • 85. Parallel Job Processing  Splits and Flows provide a mechanism for executing job steps concurrently at the orchestration layer Orchestrate  A flow is a sequence of one or more steps which execute sequentially, but as a single unit. 29 Sunday, September 22, 13 © 2013 IBM Corporation
  • 86. Parallel Job Processing  Splits and Flows provide a mechanism for executing job steps concurrently at the orchestration layer Orchestrate  A flow is a sequence of one or more steps which execute sequentially, but as a single unit.  A Split is a collection of flows that may execute concurrently – A split may only contain “flows”; a step is not implicitly a flow 29 Sunday, September 22, 13 © 2013 IBM Corporation
  • 87. Parallel Job Processing  Splits and Flows provide a mechanism for executing job steps concurrently at the orchestration layer Orchestrate  A flow is a sequence of one or more steps which execute sequentially, but as a single unit.  A Split is a collection of flows that may execute concurrently – A split may only contain “flows”; a step is not implicitly a flow  This is done entirely in the JSL descriptor – Imposed on the batch application with no code changes! 29 Sunday, September 22, 13 © 2013 IBM Corporation
  • 88. Parallel Job Processing Implement 30 Sunday, September 22, 13 © 2013 IBM Corporation
  • 89. Parallel Job Processing  Step-level parallelism can be achieved programmatically using step partitioning 30 Sunday, September 22, 13 Implement © 2013 IBM Corporation
  • 90. Parallel Job Processing  Step-level parallelism can be achieved programmatically using step partitioning Implement  A partitioned step runs as multiple instances with distinct property sets 30 Sunday, September 22, 13 © 2013 IBM Corporation
  • 91. Parallel Job Processing  Step-level parallelism can be achieved programmatically using step partitioning Implement  A partitioned step runs as multiple instances with distinct property sets  PartitionMapper defines the number of partitions, and property values for each partition – Can be a fixed set of partitions in JSL – Can be dynamic using a PartitionMapper implementation 30 Sunday, September 22, 13 © 2013 IBM Corporation
  • 92. Parallel Job Processing 31 Sunday, September 22, 13 © 2013 IBM Corporation
  • 93. Wrap up... © 2013 IBM Corporation Sunday, September 22, 13
  • 94. Batch Processing  The oldest “new thing” in Java  JSR 352 applies the modern thinking and abstraction of Java EE and SOA and applies it to sequential batch processing  The standardized programming model provides application developers vendor portability  Inclusion in Java EE 7 ensures wide spread availability 33 Sunday, September 22, 13 © 2013 IBM Corporation
  • 95. Questions? Find this presentation and more! http://ibm.co/JavaOne2013 © 2013 IBM Corporation Sunday, September 22, 13