Upload
nickgarrod
View
119
Download
3
Embed Size (px)
Citation preview
Page
© DATEV eG, all rights
reserved
CICS Java Real Life Projects
Session: ASZ-3983 - Juergen Sussner DATEV e.G.
Page
© DATEV eG, all rights
reserved
Agenda
About DATEV
Our way to using java in CICS
Some of our projects
Bussinesrule Service
JAVA (de)Compression
Interface for OAM
Project BOES
Stumbling blocks
Conclusion
Vision for the future
10.02.2015
2
Page
© DATEV eG, all rights
reserved
About DATEV
The cooperative DATEV eG, Nuremberg, is a software company and IT
service provider for tax consultants, auditors and lawyers as well as their
clients
Founded 1966
Ca. 6.700 employees, 800 Mio. € turnover
4 computer centers in Nuremberg with
IBM System z (EC12) mainframes,
Power 6 & 7 AIX systems,
Approx. 7000 Linux and
Windows Server
Info: www.datev.com
10.02.2015
3
Page
© DATEV eG, all rights
reserved
A short history A long time ago
10.02.2015
5
ISDN started
Task ISDN permission Check Engine
CICS Business Logic
Mainframe
Page
© DATEV eG, all rights
reserved
A short history A not so long time ago
10.02.2015
6
ISDN started
Task ISDN permission Check Engine
CICS Business Logic
Mainframe
Websphere AIX
Web
Application Business Rule Service (JAVA)
Page
© DATEV eG, all rights
reserved
What is this „Business Rule Service“?
10.02.2015
7
SOAP WebService for Access Control System
Computes permissions of a given user according to
User Credentials
User profile
Group memberships
Memberships in different contexts
Used as „central“ policy enforcement point
Creative Commons License
Page
© DATEV eG, all rights
reserved
A short history Close to now
10.02.2015
8
ISDN started
Task ISDN permission Check Engine
CICS Business Logic
Mainframe
Websphere AIX
Web
Application Business Rule Service (JAVA)
TCP/IP
Business Rule
Service (C)
Page
© DATEV eG, all rights
reserved
A short history The final complexity
10/02/2015
9
ISDN started
Task ISDN permission Check Engine
CICS Business Logic
Mainframe
Websphere AIX
Web
Application Business Rule Service (JAVA)
TCP/IP
Business Rule
Service (C)
Page
© DATEV eG, all rights
reserved
A short history The final complexity
10/02/2015
10
ISDN started
Task ISDN permission Check Engine
CICS Business Logic
Mainframe
Websphere AIX
Web
Application Business Rule Service (JAVA)
TCP/IP
Business Rule
Service (C)
Page
© DATEV eG, all rights
reserved
A short history The final complexity
10/02/2015
11
ISDN started
Task ISDN permission Check Engine
CICS Business Logic
Mainframe
Websphere AIX
Web
Application Business Rule Service (JAVA)
TCP/IP
Business Rule
Service (C)
Hard to maintain
Logic implemented twice
Performance issues
Many dependencies
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” A closer look
10/02/2015
12 Creative Commons License
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
13
Websphere /J2EE
Service
SOAP/ HTTP
JDBC Business-
Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
14
Websphere /J2EE
Service
WebService
Skeleton SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
15
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
16
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
JNDI
Service
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
17
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
POJO
DAO
Spring
based
DAO
JNDI
Service
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
18
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
POJO
DAO
Spring
based
DAO
JNDI
Service
JDBC
Type 4
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
19
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
POJO
DAO
Spring
based
DAO
JNDI
Service
JDBC
Type 4
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
20
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
POJO
DAO
Spring
based
DAO
JNDI
Service
JDBC
Type 4
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
21
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
POJO
DAO
Spring
based
DAO
JNDI
Service
JDBC
Type 4
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
22
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
POJO
DAO
Spring
based
DAO
JNDI
Service
JDBC
Type 4
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
23
Websphere /J2EE
Service
WebService
Skeleton
POJO
Service
POJO
DAO
Spring
based
DAO
JNDI
Service
JDBC
Type 4
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
24
Websphere /J2EE
Service
POJO
Service
POJO
DAO
Spring
based
DAO
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
25
Websphere /J2EE
Service
Java Record
Framework
& Wrapper
POJO
Service
POJO
DAO
Spring
based
DAO
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
26
Websphere /J2EE
Service
Java Record
Framework
& Wrapper
POJO
Service
POJO
DAO
Spring
based
DAO
Custom
JNDI
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project “Business Rule Service” Internal architecture
10/02/2015
27
Websphere /J2EE
Service
Java Record
Framework
& Wrapper
POJO
Service
POJO
DAO
Spring
based
DAO
Custom
JNDI
JDBC
Type 2
SOAP/ HTTP
JDBC
WSDL
Business- Rule DB
Page
© DATEV eG, all rights
reserved
The Project Business Rule Service Steps for migration
10/02/2015
28
WAS - J2EE CICS JAVA
Use DFHWS2LS and J2C
Records
Create Main Class to map
from Container to Java
Replace JDBC Type4 with
Type2 Replace JNDI
Profiling and tuning to identify potential for optimization
Page
© DATEV eG, all rights
reserved
The Project Business Rule Service Final architecture based on pooled JVM
10/02/2015
29
ISDN started
Task ISDN permission Check Engine
CICS Business Logic
Mainframe
Websphere AIX
Web
Application
TCP/IP
Business Rule Service (JAVA)
Page
© DATEV eG, all rights
reserved
The Project Business Rule Service Final architecture based on pooled JVM
10/02/2015
30
ISDN started
Task ISDN permission Check Engine
CICS Business Logic
Mainframe
Websphere AIX
Web
Application
TCP/IP
Business Rule Service (JAVA)
easier to maintain
single Point of
implementation
performance Benefit
Page
© DATEV eG, all rights
reserved
The Project Business Rule Service Benefits from migration to JVM server
10/02/2015
31
Two possible migration paths:
“Fully OSGI compliant” vs. „Single bundle“ approach
Load- and Performance Test:
Less CPU time needed (larger parts zIIP eligible)
Slightly better response times
Even J2EE developers do not always write thread safe code;-)
Long time of testing and QA
Page
© DATEV eG, all rights
reserved
The Project Business Rule Service Some charts from production
10/02/2015
32
Page
© DATEV eG, all rights
reserved
Some Statistics (03/2013)
10/02/2015
33 0
2000
4000
6000
8000
10000
12000
14000
16000
18000
05:3
0
05:4
6
06:0
2
06:1
8
06:3
4
06:5
0
07:0
6
07:2
2
07:3
8
07:5
4
08:1
0
08:2
6
08:4
2
08:5
8
09:1
4
09:3
0
09:4
6
10:0
2
10:1
8
10:3
4
10:5
0
11:0
6
11:2
2
11:3
8
11:5
4
12:1
0
12:2
6
12:4
2
12:5
8
13:1
4
13:3
0
13:4
6
14:0
2
14:1
8
14:3
4
14:5
0
15:0
6
15:2
2
15:3
8
15:5
4
16:1
0
16:2
6
16:4
2
16:5
8
17:1
4
17:3
0
17:4
6
CICS LINK
WebService
EXCI
Transactions per minute
2,7
0,4 0,6
Batch Job via EXCI
CICS Tasks via Link
Webservice Calls
Mio transactions per day
~ 3.700.000 transactions per day
Page
© DATEV eG, all rights
reserved
Some Statistics (02/2015)
10/02/2015
34
Transactions per minute
0
2000
4000
6000
8000
10000
12000
14000
16000
1800005:3
0
05:5
0
06:1
0
06:3
0
06:5
0
07:1
0
07:3
0
07:5
0
08:1
0
08:3
0
08:5
0
09:1
0
09:3
0
09:5
0
10:1
0
10:3
0
10:5
0
11:1
0
11:3
0
11:5
0
12:1
0
12:3
0
12:5
0
13:1
0
13:3
0
13:5
0
14:1
0
14:3
0
14:5
0
15:1
0
15:3
0
15:5
0
16:1
0
16:3
0
16:5
0
17:1
0
17:3
0
17:5
0
CICS Link
Webservice
EXCI
3,7
1,8
0,7
EXCI
Webservice
CICS Link
Mio transactions per day
~ 6.200.000 transactions per day
Page
© DATEV eG, all rights
reserved
Some Statistics (02/2015)
10/02/2015
35
Transactions per minute
0
2000
4000
6000
8000
10000
12000
14000
16000
1800005:3
0
05:5
0
06:1
0
06:3
0
06:5
0
07:1
0
07:3
0
07:5
0
08:1
0
08:3
0
08:5
0
09:1
0
09:3
0
09:5
0
10:1
0
10:3
0
10:5
0
11:1
0
11:3
0
11:5
0
12:1
0
12:3
0
12:5
0
13:1
0
13:3
0
13:5
0
14:1
0
14:3
0
14:5
0
15:1
0
15:3
0
15:5
0
16:1
0
16:3
0
16:5
0
17:1
0
17:3
0
17:5
0
CICS Link
Webservice
EXCI
3,7
1,8
0,7
EXCI
Webservice
CICS Link
Mio transactions per day
2013
3,7 Mio
2015
6,2 Mio
~ 6.200.000 transactions per day
Page
© DATEV eG, all rights
reserved
Infrastructure Scaling
10/02/2015
36
Based on JVM Servers
For Workload via EXCI / from WAS (5.5 Mio TX per day)
6 CICS 4.2 CICS-regions
max 20 Threads and 512 MB per JVM Server
Daily peak load is handled by not more than 5 JVM threads in parallel
Memlimit: 20 GB per CICS-region
For CICS local workload (0.7 Mio TX per day)
1 JVM Server per region
Creative Commons License
Page
© DATEV eG, all rights
reserved
The project (de)Compression
10/02/2015
37
Creative Commons License
Page
© DATEV eG, all rights
reserved
The project (de)Compression Motivation
Enable usage of compression in C or Cobol programs
Utilize JAVA compression capabilities
Provide a wide variety of compression algorithms
gzip
Multi-File archives
PKZIP
Compress VSAM entries in KSDS
Deflate / Inflate
…
Extensible for new algorithms 10/02/2015
38
Page
© DATEV eG, all rights
reserved
The project Compression Architecture
10/02/2015
39
JVM Server
Channel OPERATION
PARAMETER
DATA
Main
Method
GZIP
GUNZIP
ZIP
DEFLATE
…
Channel OPERATION
PARAMETER
DATA
Page
© DATEV eG, all rights
reserved
The project Compression Statistics
10/02/2015
40
0
500
1000
1500
2000
5:0
0
5:4
8
6:3
6
7:2
4
8:1
2
9:0
0
9:4
8
10:3
6
11:2
4
12:1
2
13:0
0
13:4
8
14:3
6
15:2
4
16:1
2
17:0
0
17:4
8
18:3
6
19:2
4
20:1
2
21:0
0
21:4
8
22:3
6
23:3
5
GZIP; 340
PKZIP; 295
GUNZIP; 162
GZIP
PKZIP
GUNZIP
1000 transactions per day
Transactions per minute
~ 800.000 transactions per day
Page
© DATEV eG, all rights
reserved
The Project BOES A data migration task
10/02/2015
41
Creative Commons License
Page
© DATEV eG, all rights
reserved
The Project BOES Initial Situation
Existing business code implementation
Used in dozens of J2EE Applications
Implemented via EJB and JPA
Should be reused in a zOS/CICS Project
10/02/2015
42
Websphere Application Server
J2EE Application
SOA Core
Page
© DATEV eG, all rights
reserved
The Project BOES The generative Approach
1. Implement service
description
2. Implement business code
3. Generate application code
4. Runtime takes care about
connectivity to service
endpoint. 10/02/2015
43
Service
Description
(DSL)
Business
Code
(Java)
Application
Code
Runtime
Framework
WAS
Application
CICS
Application
Gen
era
tor
EJB
JAX
WS
HT
TP
CIC
S L
ink
Page
© DATEV eG, all rights
reserved
The Project BOES Where we end up
10/02/2015
44
The same business code runs in CICS and in WAS
Can be used in BATCH
Foundation for many other projects
Page
© DATEV eG, all rights
reserved
The Project BOES Some highlights
10/02/2015
45
Generative approach
80%
of the code is generated.
A developer does not need
to know the platform he
implements for
Less error prone due to
strict framework
Continuous integration
Completely buildable via
Apache Maven
Each build is conducted in a
clean and consistent
environment and does
automatic checks for code
quality, known bugs, unit
tests, generation of
documentation, and many
more
Client generation
Automatically generated
clients are:
WAS:
- JAXWS
- Remote EJB
- Direct Java Call
CICS Link:
- Cobol Copy Book
- Assembler DSect
Page
© DATEV eG, all rights
reserved
The project „Interface for OAM“
10.02.2015
46
Creative Commons License
Page
© DATEV eG, all rights
reserved
The project „Interface for OAM“ Motivation
Provide a simple, easy to maintain and uniform interface for storing,
archiving and retrieving Files
Enable usage of IBM OAM for various clients
Batch jobs
CICS transactions
WebSphere applications via CTG
Windows Applicaitons
10/02/2015
47
Page
© DATEV eG, all rights
reserved
The project „Interface for OAM“ Motivation
Developed in a „Java only“ department
Calls an Assembler module via LINK, which utilizes OAM Assembler
Macros
Already used in WebSphere applications & batch jobs and more to come.
Currently maintained by CICS - Administration 10/02/2015
48
Page
© DATEV eG, all rights
reserved
Stumbling blocks
10/02/2015
49
The Porta Rosa is a Greek street dating from the 3rd to 4th century BC Creative Commons License
Page
© DATEV eG, all rights
reserved
Stumbling blocks Java agent and boot delegation
10/02/2015
50
CICS Region
Application
1
Application
3
Application
2
Monitoring
Agent
Scenario:
Usage of monitoring agents without
declaring it as an OSGI dependency !
org.osgi.framework.bootdelegation=<agent Package>
CICS 4.2
osgi.compatibility.bootdelegation=true
org.osgi.framework.bootdelegation=<agent Package>
CICS 5.2
Page
© DATEV eG, all rights
reserved
Stumbling blocks Deadlock when linking from Java to Java
10/02/2015
51
JVM Server
Threadlimit 10
Application
1
Application
2
Link
Message Queue Trigger
Carefully tune
threadlimits !
Page
© DATEV eG, all rights
reserved
Stumbling blocks Single connection vs. WAS nested transactions
10/02/2015
52
[ jcc][50053][12310][4.15.105] T2zOS exception:
[ jcc][T2zos]com.ibm.db2.jcc.t2zos.T2zosConnection.initialize:
Multiple Connections are disallowed in current pre-existing
attachment environment ERRORCODE=-4228,
SQLSTATE=null
WAS developers usually don‘t care much about the number of
physical connections they use !
In CICS they have to !
Often caused by using nested transactions
Page
© DATEV eG, all rights
reserved
Stumbling blocks ThreadLocal and the leaking memory
10/02/2015
53
Happens within a sample shipped with CICS
com.ibm.cics.samples.SJMergedStream
JVM Server
Task
1
Task
2
Task
n
Thread Data
Task1 <data>
Task2 <data>
… <data>
Task n <data>
JVM Memory
Each transaction gets a new JVM
thread
Memory is not always cleaned up
properly
JVM is leaking Memory untill
OutOfMemory
Page
© DATEV eG, all rights
reserved
Conclusion
10/02/2015
54
+ Most young developers at DATEV prefer Java instead of COBOL/C
+ Java in CICS and Batch opens the world of mainframe programming to
many J2EE developers
+ To minimize response times, it could make sense to move data-intensive
applications close to the data (DB2, VSAM).
+ The power and simplicity of JAVA can be quite easily leveraged by classic
CICS Programs
Many problems from the distributed world have been also ported
Page
© DATEV eG, all rights
reserved
Vision for the future Challenges
10/02/2015
56
Isolated Applications Application specific
tuning
Portable Applications
Page
© DATEV eG, all rights
reserved
Vision for the future The plan
10/02/2015
57
Applications are developed compliant to specific J2EE profiles (e.g. WEB
Profile, Full Profile, …)
Many individual WAS Liberty servers configured and tuned to application
needs
System operations can decide on which platform the application will run
Coequal runtime platforms based on WAS Liberty
CICS on zOS
AIX
Linux
Windows
….