+ All Categories
Home > Documents > Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C...

Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C...

Date post: 21-Apr-2018
Category:
Upload: donga
View: 231 times
Download: 6 times
Share this document with a friend
34
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. | REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference Ronald van Luttikhuizen | eProseed November, 2015
Transcript
Page 1: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

REUSE IN ORACLE SOA SUITE 12CTemplates, libraries or services?

DOAG 2015 Conference

Ronald van Luttikhuizen | eProseed

November, 2015

Page 2: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

INTRODUCTION

• About us– Managing partner at eProseed

– Oracle Ace Director, working with Oracle tooling since 1998

– Author of SOA Made Simple

– Experience with Oracle SOA Suite since version 10g

• About eProseed– HQ in Luxemburg

– Local offices in several parts of the world

– Award winning Oracle partner

2

Page 3: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |3

Patterns, libraries and services

Project quick start: Maven

Composite templates to implement patterns

Using libraries in your composite

Runtime reuse

Three use cases

AGENDA

1

2

3

4

5

6

Page 4: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

• Pattern: general reusable solution to a commonlyoccurring problem

• E.g. building houses: roof, front door, windows

• Library: reuse of pre-fabricated functionalitythat solves a problem in a specific way

• E.g. garage door

4

• Service: something of value a provider does for a consumer

• E.g. guard the entrance in a gated community

PATTERNS, LIBRARIES AND SERVICES

Page 5: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

PATTERNS

• Patterns– Creational patterns (Factory)

– Structural patterns (Adapter, composite)

– Behavioral patterns (Mediator, publish-subscribe)

– Concurrency pattern (Scheduler)

– Can be enforced using a template

• Criticism– Use of patterns signals a missing feature in a programming language

– Incorrect use leads to increase in complexity

5

Page 6: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |6

Page 7: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

LIBRARIES

• Built in– Programming language libraries (java.util, java.math)

– Application server libraries (JPA)

• Manually added libraries– Third party libraries

– Open source (Apache libraries)

– Commercial (Oracle libraries)

– Your own domain specific libraries

7

Page 8: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

(MICRO)SERVICES

• Out-of-process components who communicate with a mechanism such as a web service request, or remote procedure call

• Architectural style

• See SOA Made Simple

• Microservice– http://martinfowler.com/articles/microservices.html

–Specific type of service

• Tolerant reader pattern

8

Page 9: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

• Reuse of a general idea

• Quick startdevelopment

• Consumer is responsible for QoS

• Can be re-applied

9

PATTERNS, LIBRARIES AND SERVICES

Pattern Library Service

• Design time reuse

• Deploy with your solution every time

• Shared responsibility for QoS

• Can be upgraded

• Runtime reuse

• Deploy once for all consumers

• Provider responsible for QoS

• Changes impact all consumers

Page 10: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

SOA SUITE 12C

• Patterns

– Built in patterns: mediator, scheduler, adapter, …

– Support to enforce patterns: templates

• Libraries: Templates and Spring component

• Services:

– Composites with service interface

– Adapters

– Web services, REST services

Support for patterns, libraries and services

10

Page 11: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |11

Patterns, libraries and services

Project quick start: Maven

Composite templates to implement patterns

Using libraries in your composite

Runtime reuse

Three use cases

AGENDA

1

2

3

4

5

6

Page 12: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

MAVEN

• Build automation tool from the Java world– How software is built– What dependencies there are

• Introduced in SOA Suite 12c

• Maven uses templates for generating predefined project structures*

12

*https://svgonugu.wordpress.com/2015/02/18/soa-12c-using-maven-for-soa-projects-deployment/

Page 13: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

MAVEN ARCHETYPE FOR SOA

mvn archetype:generate

-DarchetypeGroupId=com.oracle.soa.archetype

-DarchetypeArtifactId=oracle-soa-application

-DarchetypeVersion=12.1.3-0-0

-DgroupId=org.mycompany

-DartifactId=my-soa-app

-Dversion=1.0-SNAPSHOT

-DprojectName=my-project

13

Page 14: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |14

Page 15: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

MAVEN SUPPORT FOR SOA IN JDEVELOPER 12C

15

Page 16: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

MAVEN

• Update templates–Maintained and determined by Oracle (patches, patch sets, new versions

of SOA Suite)– Can’t reapply the (new) template to an existing project– Upgrade or migration needed when structure and build is not backwards

compliant

• Quality of service– Quality of the resulting application is independent of the use of the

template, with the exception of some naming convention and structure of the project

16

Page 17: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

DO’S AND DONT’S

• Do

– Use as template to generate default, base SOA project

– Use as build & deployment service for CI and deployment automation

• Don’t

– Don’t use custom SOA project template (e.g. stick to 11g layout in 12c)

– Avoid custom build and deployment service, stick to the standard

– Avoid project-specific template extensions where possible

– No replacement for specific-purpose tools such as deployment tool

17

Page 18: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |18

Patterns, libraries and services

Project quick start: Maven

Composite templates to implement patterns

Using libraries in your composite

Runtime reuse

Three use cases

AGENDA

1

2

3

4

5

6

Page 19: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

COMPOSITE TEMPLATES

• Three types in SOA Suite– SOA project, from the new project menu– Service component, shows up in the component menu– Custom BPEL scope activity, shows up in the activity palette

• SB templates– Create in JDeveloper– Pipeline template

19

Page 20: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

COMPOSITE TEMPLATES

• Update templates– SOA template updates don’t impact composites based on that template, only new

projects, composites or BPEL processes– OSB template update running services and new components

• Quality of service– High availability, performance, etc. are the responsibility of the implementer of the

template

20

Page 21: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

DO’S AND DON’TS

• Do–Use component and custom BPEL activity templates to reuse

functionality–Use project and service bus templates to enforce guidelines

• Don’t– Use it to duplicate a complete service– To create a custom framework in a one-off project

21

Page 22: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |22

Patterns, libraries and services

Project quick start: Maven

Composite templates to implement patterns

Using libraries in your composite

Runtime reuse

Three use cases

AGENDA

1

2

3

4

5

6

Page 23: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

LIBRARIES IN YOUR COMPOSITE

• Java libraries–Wrap in a SOA Suite specific component– Deploy with other Java code (web services or web applications)

23

Page 24: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

LIBRARIES

• Update libraries– Redeploy composite with library in Spring component– Embedded Custom Java library in BPEL* or XSLT requires server restart

• Quality of service– High availability, performance of the total composite is responsibility of the consumer

of the library– Library provider should provide tuning opportunities (eg log levels in Log4J) for the

component

*see https://docs.oracle.com/middleware/1213/soasuite/develop-soa/bpel-java-code.htm#SOASE507

24

Page 25: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

DO’S AND DON’TS

• Do– Use libraries for common functionality– Use libraries to prevent single point of access

• Don’t– Use Java libraries in BPEL activities– Use Java libraries in XSLT

25

Page 26: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |26

Templates, libraries or services

Project quick start: Maven

Composite templates to implement patterns

Using libraries in your composite

Runtime reuse

Three use cases

AGENDA

1

2

3

4

5

6

Page 27: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

RUNTIME REUSE

• SOA Suite to create/expose services and consume/invoke services• Optimization: BPEL subprocesses

– Self-contained reusable BPEL fragment– Reuse within SOA Composite– Standalone versus inline– Smaller footprint

27

Page 28: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

RUNTIME REUSE

• Update services– Impacts all consumers– Impact depends on interface

– No interface changes: bugfixes and minor changes– Interface changes: major change

• Quality of Service– Availability, correctness, etc. is responsibility of service provider

28

Page 29: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

DO’S AND DONT’S

• Do– Divide based on functionality, then based on technology (no big lasagna)– Specific functionality and specific interface; easy to use

• Don’t– Don’t create services to implement own framework functionality (routing, transformation, etc.), stick

to the standard components of SOA Suite– Avoid DoItAllService with any input and any output– Make every service reusable by default

29

Page 30: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |30

Templates, libraries or services

Project quick start: Maven

Composite templates to implement patterns

Using libraries in your composite

Runtime reuse

Three use cases

AGENDA

1

2

3

4

5

6

Page 31: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |31

PERMIT APPLICATION | TEMPLATE

Challenge

• Used by different customers

• Implementation of service tasks should adhere to predefined interface

• Backend can be any type of technology

• Backend can be any type of message format

• No reuse of code

Benefits

Solution

• SOA Project template

• Using predefined interface for BPMN process

• Flexible in the implementation of the service and adapters

• Template makes sure the interface is stable

• Save time and money creating the composite

• Flexible in terms

Page 32: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |32

MORTGAGE QUOTE APPLICATION | LIBRARY

Challenge

• Calculate “valid to date” for online mortgage quote

• Complex date/time calculations based on number of working days, locale, etc.

• Should be easy to understand and don’t result in “don’t dare to touch that XSLT”

Benefits

Solution

• Code in Java, package as JAR library

• (Re) use in both Java applications and SOA Composites using Spring component

• Code logic in a programming language (where it belongs) instead of BPEL or XSLT

• Avoid creating lots of fine-grained “services” that aren’t really services

Page 33: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |33

ROUTING OF MESSAGES | SERVICE

Challenge

• Route capacity messages from various utility companies to correct backend systems

• Replace legacy routing system in which routing, transformation and filtering was implemented in database

Benefits

Solution

• Create reusable services based on functionality

• Within the services use routing infra already provided by the platform (SOA Suite): Business Rules and Mediator

• Simpler solution using of strengths instead of battling them

• No reimplementation of logic already available in suite (you want to focus on adding value not building frameworks)

Page 34: Reuse in Oracle SOA Suite 12c - DOAG Deutsche ORACLE ... · REUSE IN ORACLE SOA SUITE 12C Templates, libraries or services? DOAG 2015 Conference ... –Experience with Oracle SOA

Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

• Reuse

– Pattern, library or service

– Depends on how specific the solution is

– Depends on how specific the problem is

– Responsibilities for QoS are different

• Libraries

– Code is reused

– Java libraries in Spring component

– SOA Suite Templates (component and custom activity)

– Shared responsibility for QoS

34

• Patterns

– Design is reused

– Maven template

– SOA Suite project template, SB Templates

– Consumer is responsible for QoS

• Services

– Runtime reuse

– Create in Java, SOA Suite or PL/SQL

– Publish on SB

– Provider is responsible for QoS

SUMMARY


Recommended