15
PL/SQL code fragments into Spring Batch configuration via Xtext 07.11.2014 Peter Sasse

PL/SQL code fragments into Spring Batch configuration … · PL/SQL code fragments into Spring Batch configuration via ... com/a/eclipselabs.org/p/plsql ... fragments into Spring

Embed Size (px)

Citation preview

PL/SQL code fragments into

Spring Batch configuration

via Xtext

07.11.2014

Peter Sasse

Objectives and Purpose

State the purpose of one proof of concept

What was the plan?

Demo

Look back

«Architecture of uncertainty»

Conclusion

07.11.2014 Peter Sasse

From issues to proof of concept

Poor performance due to

− Lack of parallel programming in PL/SQL code

− Data formatting on database server (network latency)

Poor maintainability because of

− Missing central source container (e.g. as SVN for Java)

07.11.2014 Peter Sasse

Database

server

Poor performance: Data formatting

DB

PL/SQL

Batch

server

text files

POJO

select LPAD('ID',8,'0')

from dual

Database

server

Poor performance: Data formatting

DB

PL/SQL

Batch

server

text files

POJO

Format: '000000ID'

So what was the plan? (I)

Requirement: Generation of Spring Batch configuration

For grouping Spring Batch jobs

Get overview of jobs and their dependent objects

Extract table names from PL/SQL code

create flowchart

07.11.2014 Peter Sasse

Month Day, YearLEGAL ENTITY, department or author (Click Insert | Header & Footer)

test_make_i

199

test_make_i

211

test_make_i

363

make_i199

make_i211

make_i363

make_dip_v

olumina

make_banki

ngpackages

make_check

up

prepare_KO

NTAKT$TM

1

prepare_KO

NTAKT$TM

2

make_vprod

ukte

make_kunde

nkontakte

make_dipmake_app_

made

make_ads_p

rozesse

prepare_part

nerinfo_v3$

prepare_i36

3$

print_i199print_i211 print_i363

So what was the plan? (II)

Extract exporting SELECT statements:

Go down the recursion

Built Abstract Syntax Tree (AST) as EMF model

Model-to-Text transformation:

Generate Spring Batch Job.cfg files with the use of Xtend

07.11.2014 Peter Sasse

One proof of concept (I)

Job.cfg

Xtext Ecore

EMF & Xtend

Oracle

PL/SQL

SQL

selects

Job.cfg

Spring

Batch

Data- &

Control

Flow diagram

One proof of concept (II)

Job.cfg

Xtext Ecore

EMF & Xtend

Oracle

PL/SQL

SQL

selects

Job.cfg

Spring

Batch

Data- &

Control

Flow diagram

Our first goal/milestone!

One proof of concept (III)

Job.cfg

Xtext Ecore

EMF & Xtend

Oracle

PL/SQL

SQL

selects

Job.cfg

Spring

Batch

Data- &

Control

Flow diagram

Our second & final goal/milestone!

Demo

Look back

We started with Xtext before it moved

− from openArchitectureware

− to the Eclipse Modeling Project

For us this project was great exercise, since 2010:

http://code.google.com/a/eclipselabs.org/p/plsql-editor/

We were uncertain, if for example memory consumption will explode

We knew about the impact, if Spring Batch configuration will change (=>

changes to Xpand files)

07.11.2014 Peter Sasse

Conclusion

“Uncertainty is an uncomfortable position, but certainty is an absurd one.”

(@2nd Annual PHP North West Conference: Kevlin Henney)

First know exactly the target (“know, where the finish line is”)

Uncertainty: Find out impacts (then no probability of occurrence) on your

“way”

Be part of early design rendering in code to reveal additional design

efforts

We will carry on

− Model-to-Model transformation (M2M): BMC Control-M model to Credit

Suisse AG Java batch model

− Eclipse Graphical Modeling Framework (GMF): Graphical Credit Suisse

AG Java batch model editor

07.11.2014 Peter Sasse

Q & A

Please let me answer you questions

Thank you for your time!

07.11.2014 Peter Sasse

Backup slides