Real world batch implementations and frameworks.
These slides explores various ways in which batch processing can implemented with Java EE and other frameworks. It includes pro and cons of batch implementations with JCL, prepared statements, CDI, JSR 352 and embedded EJB containers. It helps to understand when to use JSR 352 and when not to, the benefits of using an embedded EJB container for batch processing, and the best practices to follow when designing batch processes.
Happy Java SE 8 was released! But for the Java EE?
This materials shows the current status of EE 6/7 with SE 8, and some limitation in current EE 7 app servers with 8.
This session materials is for the Japan Java Users Group (JJUG) CCC 2014 Spring session. #jjgc_ccc #ccc_r11
Consideration points for migrating from older pre-J2EE, J2EE 1.2-1.4, Java EE 5-6 to EE 7, and migration points especially for web front-end systems and back-ends. JSP to JSF, EJB to CDI with migration procedure details. Slide materials on Java Day Tokyo 2016.
Many enterprise systems build at 2000 - 2010 uses J2EE old specifications with Struts web framework. But nowadays J2EE improved as Java EE, with standard web framework JSF 2. With this slides you can learn how to migrate old-styled J2EE + Struts systems to sophisticated Java EE with JSF 2 specification. This slides was used in Java Day Tokyo 2014 C4 window, presented by the author. And some slides is specialized for Japanese enterprise systems, but the theme is very standard and for almost all J2EE users in the world.
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
JavaOne 2016
This session provides 50 best practices for Java EE 7, with examples. The best practices covered focus primarily on JPA, CDI, JAX-WS, and JAX-RS. In addition, topics involving testing and deployment are covered. This presentation points out where best practices have changed, common misconceptions, and antipatterns that should be avoided. This is a fast-paced presentation with many code samples.
Happy Java SE 8 was released! But for the Java EE?
This materials shows the current status of EE 6/7 with SE 8, and some limitation in current EE 7 app servers with 8.
This session materials is for the Japan Java Users Group (JJUG) CCC 2014 Spring session. #jjgc_ccc #ccc_r11
Consideration points for migrating from older pre-J2EE, J2EE 1.2-1.4, Java EE 5-6 to EE 7, and migration points especially for web front-end systems and back-ends. JSP to JSF, EJB to CDI with migration procedure details. Slide materials on Java Day Tokyo 2016.
Many enterprise systems build at 2000 - 2010 uses J2EE old specifications with Struts web framework. But nowadays J2EE improved as Java EE, with standard web framework JSF 2. With this slides you can learn how to migrate old-styled J2EE + Struts systems to sophisticated Java EE with JSF 2 specification. This slides was used in Java Day Tokyo 2014 C4 window, presented by the author. And some slides is specialized for Japanese enterprise systems, but the theme is very standard and for almost all J2EE users in the world.
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
JavaOne 2016
This session provides 50 best practices for Java EE 7, with examples. The best practices covered focus primarily on JPA, CDI, JAX-WS, and JAX-RS. In addition, topics involving testing and deployment are covered. This presentation points out where best practices have changed, common misconceptions, and antipatterns that should be avoided. This is a fast-paced presentation with many code samples.
With a strong focus on annotations, minimalist configuration, simple deployment, intelligent defaults and Java centric type-safety, Java EE is one of the most productive full-stack development platforms around today. This very code centric workshop is a quick tour of the Java EE platform as it stands today. If you haven't seen Java EE for a while and want to catch up, this session is definitely for you.
We will start with the basic principals of what Java EE is and what it is not, overview the platform at a high level and then dive into each key API like JSF, CDI, EJB 3, JPA, JAX-RS, WebSocket and JMS using examples and demos. This is your chance to look at Java EE 7 in the context of a realistic application named Cargo Tracker, available with an MIT license at http://cargotracker.java.net.
We will also briefly take a look at the emerging horizons of Java EE 8.
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)Fred Rowe
Presentation about the newly released JSR236 spec that Anthony Lai (Oracle) and Fred Rowe (IBM) did for session CON7948 at JavaOne SF 2013.
JSR 236 is part of EE7 platform and defines extensions to the SE concurrency APIs to allow them to be used in an app server environment.
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
This presentation takes you on a JSF tour with the help of Java EE 7, together with PrimeFaces and the NetBeans IDE. The tour begins with an introduction of PrimeFaces and its features, such as UI components and themes. Focusing on Java EE 7, it examines HTML5-friendly templates, resource libraries contracts, Faces Flow, EL operators, and lambda magic. Throughout, you will be shown how to apply the principles and concepts learned, via working examples in the NetBeans IDE. The presentation is brought to you “from the horse's mouth”—that is, by PrimeFaces and NetBeans IDE engineers.
This presentation outlines a number of the new features in Java 7, and some specific technologies delivered as part of IBM SDK for Java version 7.
Originally presented in Bangalore, India 2011
In this session, we take a look at a handful of the features that will be part of the upcoming Java EE 8 release, as well as a few of the existing features that can be utilized in Java EE 7 today. Each of the features are presented via a recipe in the "Problem", "Solution", and "How it Works" format.
In this talk I give an overview of IBM's efforts to create a VM-agnostic toolkit of runtime components from the mature J9 Java Virtual Machine (JVM). I provide a summary of the motivations behind this project, talk about some important proof points with CPython and Ruby MRI, describe the motivations behind an open community for this technology, and discuss the many challenges with creating a runtime agnostic Just In Time compiler from the Testarossa Java JIT.
With a strong focus on annotations, minimalist configuration, simple deployment, intelligent defaults and Java centric type-safety, Java EE is one of the most productive full-stack development platforms around today. This very code centric workshop is a quick tour of the Java EE platform as it stands today. If you haven't seen Java EE for a while and want to catch up, this session is definitely for you.
We will start with the basic principals of what Java EE is and what it is not, overview the platform at a high level and then dive into each key API like JSF, CDI, EJB 3, JPA, JAX-RS, WebSocket and JMS using examples and demos. This is your chance to look at Java EE 7 in the context of a realistic application named Cargo Tracker, available with an MIT license at http://cargotracker.java.net.
We will also briefly take a look at the emerging horizons of Java EE 8.
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)Fred Rowe
Presentation about the newly released JSR236 spec that Anthony Lai (Oracle) and Fred Rowe (IBM) did for session CON7948 at JavaOne SF 2013.
JSR 236 is part of EE7 platform and defines extensions to the SE concurrency APIs to allow them to be used in an app server environment.
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
This presentation takes you on a JSF tour with the help of Java EE 7, together with PrimeFaces and the NetBeans IDE. The tour begins with an introduction of PrimeFaces and its features, such as UI components and themes. Focusing on Java EE 7, it examines HTML5-friendly templates, resource libraries contracts, Faces Flow, EL operators, and lambda magic. Throughout, you will be shown how to apply the principles and concepts learned, via working examples in the NetBeans IDE. The presentation is brought to you “from the horse's mouth”—that is, by PrimeFaces and NetBeans IDE engineers.
This presentation outlines a number of the new features in Java 7, and some specific technologies delivered as part of IBM SDK for Java version 7.
Originally presented in Bangalore, India 2011
In this session, we take a look at a handful of the features that will be part of the upcoming Java EE 8 release, as well as a few of the existing features that can be utilized in Java EE 7 today. Each of the features are presented via a recipe in the "Problem", "Solution", and "How it Works" format.
In this talk I give an overview of IBM's efforts to create a VM-agnostic toolkit of runtime components from the mature J9 Java Virtual Machine (JVM). I provide a summary of the motivations behind this project, talk about some important proof points with CPython and Ruby MRI, describe the motivations behind an open community for this technology, and discuss the many challenges with creating a runtime agnostic Just In Time compiler from the Testarossa Java JIT.
Moving to Java EE 6 and CDI and away from the clutterDan Allen
Java EE 6 standards and technologies, such as JSR 299 - Contexts & Dependency Injection, significantly reduce complexity, increase developer productivity and insure your freedom from vendor lock-in.
This Red Hat webinar explains how Java EE 6 can be even simpler than using proprietary legacy frameworks, and take much less time.
CDI and Seam 3: an Exciting New Landscape for Java EE DevelopmentSaltmarch Media
CDI (Contexts and Dependency Injection) for Java, aka JSR-299 has given us a new playing field for developing Java EE applications, by providing a standardised dependency injection framework and contextual component model. The CDI specification defines a feature for "portable extensions", which allow framework developers to extend the default behaviour of the Java EE container. By providing a number of useful portable extensions, Seam 3 increases developer productivity by solving the problems common to many enterprise projects. In this talk we will look at a number of features that Seam provides, dealing with transactions and persistence, security, internationalisation, bean validation and tooling, and how you can use them to improve your productivity in the real-world to develop rich internet applications. We'll also look at some of the cool upcoming features of Seam such as social network integration, and more.
Designing Java EE Applications in the Age of CDIMichel Graciano
Even though CDI has been available since the end of 2009, most people still do not realize its full power and the possibilities it brings. Attend this session to understand which CDI features make it excel in comparison with other dependency-injection-based solutions and see how they can be used to design flexible applications and frameworks that will stand the test of time.
What we can expect from Java 9 by Ivan KrylovJ On The Beach
Java 9 is currently scheduled to become generally available in less then 1 year. Perhaps now is a good time to have a closer look at language proposals and API changes in Java 9. There are over 70 proposals targeted to Java 9, we will have a looks at some key ones, starting with java modularity. We will look at some breaking changes and ways to develop both short and long term solutions for adoption of new upcoming version of Java.
Recorded on 2010-04-30 at the Northern Virginia Software Symposium, a stop on the NFJS 2010 tour, this talk introduces JSR-299: Contexts and Dependency Injection for the Java EE platform (CDI), the new Java standard for dependency injection and contextual lifecycle management. It also covers Weld, the JSR-299 reference implementation, and explains how CDI will be used as the foundation for the next version of Seam (Seam 3).
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...Hirofumi Iwasaki
Financial companies need Java EE to power its business today. Rakuten Card, one of the largest credit card companies in Japan, adopted Java EE 6 for its online systems rearchitecture. You can learn why we choose Java EE, and our experiences and lessons we learned. This is the first disclosing of a large credit card company in Japan sharing their story.
How to start such a big project? Why we choose it, how we selected the in house development policies, educated ourselves, and developed the additional libraries? How to launch within only six months? What is the key factor driving them as 24/7 critical real financial systems successfully? How to migrate to EE 7 in the future? We’ll answer these questions and any that you may have.
This version is the exclusive session for JJUG CCC Fall 2014 in Japan, binding both JavaOne and OOW 2014 sessions.
This slides give you an overview of the technical challgens that Java EE application servers have faced to reinvent themselves. From monolithic to jigsaw puzzles, app servers are not the burden developpers use to use anymore
Happy Java 8 release! But for Java EE 7? Is the SE 8 works for EE 7? this slide shows the current situation of applying SE 8 to EE 7. This is the revised version of "JJUG CCC 2014 Spring" session, for the "Java 8 workshop at Fukuoka".
The Java Memory Model describes how threads in the Java programming language interact through memory. Together with the description of single-threaded execution of code, the memory model provides the semantics of the Java programming language.
It is crucial for a programmer to know how, according to Java Language Specification, write correctly synchronized, race free programs.
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
Sharing 4 years of experience about node.js - A google chrome V8 engine javascript based web server technology. This slide covers about wide range of knowledge about node.js learned from 4 years of production, experiment, test & failures
4년 동안 node.js 서버 프로그래밍을 경험한 내용을 간략하게 정리해 보았습니다. node.js 를 접하시는 분들에게 도움이 되었으면 합니다.
Presentation on how Meetup tackles web performance. Given on:
- Nov 17th, 2009 for the NY Web Performance Group (http://www.meetup.com/Web-Performance-NY/)
- Jan 26th, 2010 for NYC Tech Talks Meetup Group (http://www.meetup.com/NYC-Tech-Talks/)
Best Practices for performance evaluation and diagnosis of Java Applications ...IndicThreads
Session Presented at 5th IndicThreads.com Conference On Java held on 10-11 December 2010 in Pune, India
WEB: http://J10.IndicThreads.com
------------
Enterprise applications typically comprise of multi layered stacks including the application modules, application servers, the Java Virtual Machine and the underlying Operating System. Consequently the performance of these applications are a factor of these different layers. In the eventuality of a performance problem, it is often difficult to determine the starting point for diagnosis. The Java Virtual Machine is the ‘engine’ for most of the applications. It is responsible broadly for efficient execution and memory management of applications. End users have difficulty attributing the effect of the JVM on the performance of the application. This is because usually JVM is viewed as a ‘black box’.
This talk provides an insight into the key subsystems of the JVM by looking under the hood of a high performance JVM. It ventures onto talk about approaches and techniques for analyzing performance issues. It concludes by introducing the audience to a tool called the “Health Center” which is useful for evaluating and comprehending the JVM behavior of a running application in an unobtrusive, lightweight manner.
Takeaways for the Audience A better understanding of key JVM components, approaches and techniques to diagnose performance issues and performance evaluation using the Health Center
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...timfanelli
In this presentation, Tim Fanelli provides an introduction to JSR352 programming, and builds a simple application utilizing the JSR 352 chunk processing model.
The sample program presented may be downloaded here:
https://www.dropbox.com/s/55fsjt4ylny95hc/MySampleBatch.jar
Or, email Tim Fanelli - the contact information is on slide 3!
Executing hundreds or thousands of process instances per second? Yes, it's possible. This webinar is about best practices for high-load situations, and how to scale Camunda BPM horizontally.
The next release of the Java Standard Edition is scheduled for the beginning of 2010. In this session we'll review the latest feature list of what's in and what's out of the next version of the JDK.
An update on the latest news around JavaFX including the 1.2 release and the general availability of JavaFX Mobile for Windows Mobile devices.
Testing Persistent Storage Performance in Kubernetes with SherlockScyllaDB
Getting to understand your Kubernetes storage capabilities is important in order to run a proper cluster in production. In this session I will demonstrate how to use Sherlock, an open source platform written to test persistent NVMe/TCP storage in Kubernetes, either via synthetic workload or via variety of databases, all easily done and summarized to give you an estimate of what your IOPS, Latency and Throughput your storage can provide to the Kubernetes cluster.
Presentation & discussion around low-level graphics APIs. This was a quickly made presentation that I put together for a discussion with Intel and fellow ISVs, thought it could be worth sharing
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
3. 3
“Batch”
Batch processing is the execution of a series of
programs ("jobs") on a computer without manual
intervention.
Jobs are set up so they can be run to completion
without human interaction. All input parameters are
predefined through scripts, command-line arguments,
control files, or job control language. This is in contrast
to "online" or interactive programs which prompt the
user for such input. A program takes a set of data
files as input, processes the data, and produces a
set of output data files.
- From Wikipedia
4. 4
Batch vs Real-time
Batch
Real-time
Short Running
(nanosecond
- second)
Long Running
(minutes
- hours)
JSF
EJB
etc.
JBatch (JSR 352)
EJB
POJO
etc.
Sometimes
“job net” or
“job stream”
reconfiguration
required
Fixed at
deploy
Immediately
Per sec,
minutes,
hours, days,
weeks,
months, etc.
5. 5
Batch vs Real-time Details
Trigger UI support Availability Input data Transaction
time
Transaction
cycle
Batch Scheduler Optional Normal Small -
Large
Minutes,
hours,
days,
weeks…
Bulk
(chunk)
operation
Real-time On
demand
Sometimes
UI needed
High Small ns, ms, s Per item
6. 6
Batch app categories
• Records or
values are
retrieved from
files
File
driven
• Rows or
values are
retrieved from
file
Database
driven
• Messages are
retrieved from
a message
queue
Message
driven
Combination
7. 7
Batch procedure
Stream
Job A
Input A
Process A
Output A
Job B
Input B
Process B
Output B
Job C
Input C
Process C
Output C …
“Job Net” or “Job Stream”,
comes from JCL era. (JCL itself doesn’t provide it)
Card
/Step
9. 9
Simple History of Batch Processing in Enterprise
1950 1960 1970 1980 1990 2000 2010
JCL
J2EE
MS-DOS
Bat
UNIX
Sh
Mainframe
COBOL Java
JSR 352
Java EE
Win NT
Bat
Bash
C
CP/M
Sub Power
Shell
FORTLAN
BASIC
VB C#
PL/I
Hadoop
15. 15
1. POJO Batch with PreparedStatement object
✦ Create connection and SQL statements with placeholders.
✦ Set auto-commit to false using setAutoCommit().
✦ Create PrepareStatement object using either prepareStatement() methods.
✦ Add as many as SQL statements you like into batch using addBatch() method
on created statement object.
✦ Execute SQL statements using executeBatch() method on created statement
object with commit() in every chunk times for changes.
16. 16
1. Batch with PreparedStatement object
Connection conn = DriverManager.getConnection(“jdbc:~~~~~~~”);
conn.setAutoCommit(false);
String query = "INSERT INTO User(id, first, last, age) "
+ "VALUES(?, ?, ?, ?)";
PreparedStatemen pstmt = conn.prepareStatement(query);
for(int i = 0; i < userList.size(); i++) {
User usr = userList.get(i);
pstmt.setInt(1, usr.getId());
pstmt.setString(2, usr.getFirst());
pstmt.setString(3, usr.getLast());
pstmt.setInt(4, usr.getAge());
pstmt.addBatch();
if(i % 20 == 0) {
stmt.executeBatch();
conn.commit();
}
}
conn.commit(); ....
ü Most effecient for
batch SQL statements.
ü All manual operations.
17. 17
1. Benefits of Prepared Statements
Execution
Planning & Optimization of
data retrieval path
Compilation of SQL query
Parsing of SQL query
Execution
Create
PreparedStatement
ü Prevents SQL
Injection
ü Dynamic
queries
ü Faster
ü Object oriented
x FORWARD_O
NLY result set
x IN clause
limitation
18. 18
2. Custom framework via servlets
Customizability, full-controlPros
Tied to container or framework
Sometimes poor transaction management
Poor job control and monitoring
No standard
Cons
19. 19
3. Batch using EJB or CDI
Java EE App Server
@Stateless
/ @Dependent
EJB / CDI BatchEJB
@Remote
or REST
client
Remote
Call
Database
Input
Output
Job
Scheduler
Remote
trigger
Other
System
Process
MQ
@Stateless
/ @Dependent
EJB / CDI
Use EJB Timer
@Schedule to
auto-trigger
20. 20
3. Why EJB / CDI?
EJB
/CDI
Client
1. Remote Invocation
EJB
/CDI
2. Automatic Transaction Management
Database
(BEGIN)
(COMMIT)
EJB
only
EJB EJB
EJBInstance
Pool
Activate
3. Instance Pooling for Faster Operation
RMI-IIOP (EJB only)
SOAP
REST
Web Socket
EJB
only
Client
4. Security Management
21. 21
3. EJB / CDI Pros
ª Easiest to implement
ª Batch with PreparedStatement in EJB works well in JEE6 for database
batch operations
ª Container managed transaction (CMT) or @Transactional on CDI:
automatic transaction system.
ª EJB has integrated security management
ª EJB has instance pooling: faster business logic execution
22. 22
3. EJB / CDI cons
ª EJB pools are not sized correctly for batch by default
ª Set hard limits for number of batches running at a time
ª CMT / CDI @Transactional is sometimes not efficient for bulk operations;
need to combine custom scoping with “REUIRES_NEW” in transaction type.
ª EJB passivation; they go passive at wrong intervals (on stateful session
bean)
ª JPA Entity Manager and Entities are not efficient for batch operation
ª Memory constraints on session beans: need to be tweaked for larger jobs
ª Abnormal end of batch might shutdown JVM
ª When terminated immediately, app server also gets killed.
23. 23
4. Batch using EJB / CDI on Embedded container
Embedded EJB
Container
@Stateless / @Dependent
EJB / CDI Batch
Database
Input
Output
Job
Scheduler
Remote
trigger
Other
System
Process
MQ
Self
boot
24. 24
4. How ?
pom.xml (case of GlassFish)
<dependency>
<groupId>org.glassfish.main.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
EJB / CDI
@Stateless / @Dependent @Transactional
public class SampleClass {
public String hello(String message) {
return "Hello " + message;
}
}
25. 25
4. How (Part 2)
JUnit Test Case
public class SampleClassTest {
private static EJBContainer ejbContainer;
private static Context ctx;
@BeforeClass
public static void setUpClass() throws Exception {
ejbContainer = EJBContainer.createEJBContainer();
ctx = ejbContainer.getContext();
}
@AfterClass
public static void tearDownClass() throws Exception {
ejbContainer.close();
}
@Test
public void hello() throws NamingException {
SampleClass sample = (SampleClass)
ctx.lookup("java:global/classes/SampleClass");
assertNotNull(sample); assertNotNull(sample.hello("World”););
assertTrue(hello.endsWith(expected));
}
}
26. 26
4. Should I use embedded container ?
✦ Quick to start (~10s)
✦ Efficient for batch implementations
✦ Embedded container uses lesser disk space and main memory
✦ Allows maximum reusability of enterprise components
✘ Inbound RMI-IIOP calls are not supported (on EJB)
✘ Message-Driven Bean (MDB) are not supported.
✘ Cannot be clustered for high availability
Pros
Cons
28. 28
5. Programming model
ª Chunk and Batchlet models
ª Chunk: Reader Processor writer
ª Batchlets: DYOT step, Invoke and return code upon completion, stoppable
ª Contexts: For runtime info and interim data persistence
ª Callback hooks (listeners) for lifecycle events
ª Parallel processing on jobs and steps
ª Flow: one or more steps executed sequentially
ª Split: Collection of concurrently executed flows
ª Partitioning – each step runs on multiple instances with unique properties
35. 35
5. Spring batch
ª API for building batch components integrated with Spring framework
ª Implementations for Readers and Writers
ª A SDL (JSL) for configuring batch components
ª Tasklets (Spring batchlet): collections of custom batch steps/tasks
ª Flexibility to define complex steps
ª Job repository implementation
ª Batch processes lifecycle management made a bit more easier
37. 37
Appendix: Apache Hadoop
Apache Hadoop is a scalable storage and batch data processing system.
ª Map Reduce programming model
ª Hassle free parallel job processing
ª Reliable: All blocks are replicated 3 times
ª Databases: built in tools to dump or extract data
ª Fault tolerance through software, self-healing and auto-retry
ª Best for unstructured data (log files, media, documents, graphs)
38. 38
Appendix: Hadoop’s not for
ª Not for small or real-time data; >1TB is min.
ª Procedure oriented: writing code is painful and error prone. YAGNI
ª Potential stability and security issues
ª Joins of multiple datasets are tricky and slow
ª Cluster management is hard
ª Still single master which requires care and may limit scaling
ª Does not allow for stateful multiple-step processing of records
40. 40
Key points to consider
ª Business logic
ª Transaction management
ª Exception handling
ª File processing
ª Job control/monitor (retry/restart policies)
ª Memory consumed by job
ª Number of processes
41. 41
Best practices
ª Always poll in batches
ª Processor: thread-safe, stateless
ª Throttling policy when using queues
ª Storing results
ª in memory is risky
44. 44
Conclusion: Script vs Java
Shell Script Based
(Bash, PowerShell, etc.)
Java Based
(Java EE, POJO, etc.)
Pros § Super quick to write one
§ Easy testing
§ Power of Java APIs or Java EE APIs
§ Platform independent
§ Accuracy of error handling
§ Container transaction management (Java EE)
§ Operational management(Java EE)
Cons § Lesser scope of implementation
§ No transaction management
§ Poor error handling
§ Poor operation management
§ Sometimes takes more time to make
§ Sometimes difficult to test
45. 45
Conclusion
POJO Custom
Framework
EJB / CDI EJB / CDI +
Embedded
Container
JSR 352
Pros § Quick to write
§ Java
§ easy testing
§ Depends on
each product
§ Super power of
Java EE
§ Standardized
§ Super power of
Java EE
§ Standardized
§ Easy testing
§ Can stop
forcefully
§ Super power of
Java EE
§ Standardized
§ Easy testing
§ Auto chunk,
parallel
operations
Cons § No standard
§ no transaction
management
§ less operation
management
§ No standard
§ Depends on
each product
§ Difficultto test
§ Cannotstop
forcefully
§ No auto chunk
or parallel
operations
§ No auto chunk
or parallel
operations
§ New !
§ Cannotstop
immediately in
case of chunks
Java EE 7
Java EE 6