introduction in eventing in oracle soa suite 11g · • managing partner at vennster • oracle ace...

33
1 | x Introduction in Eventing in Oracle SOA Suite 11g Ronald van Luttikhuizen 20-November-2012 | DOAG 2012

Upload: others

Post on 17-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

1 | x

Introduction in Eventing

in Oracle SOA Suite 11g

Ronald van Luttikhuizen

20-November-2012 | DOAG 2012

Page 2: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

2 | x

Ronald van Luttikhuizen • Managing Partner at Vennster

• Oracle ACE Director for Fusion Middleware and SOA

• Author of different articles, co-author Oracle SOA Book 11g book

• Upcoming book SOA Made Simple

• Architect, consultant, trainer for Oracle, SOA, EDA, Java

• More than 10 years of software development and architecture

experience

• Contact: [email protected]

• Blog: blog.vennster.nl

• Twitter: rluttikhuizen

Page 3: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

3 | x

Agenda

1. What is Eventing and why use it ?

2. Oracle and Event-Driven Architecture

3. Messaging Patterns

4. Implementation & demo’s

5. Summary and Best Practices

Page 4: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

4 | x

What is an event ?

● An event is the occurrence of something relevant that usually

requires action. An event signals a change in state.

• Business: new customer, employee has moved, invoice paid

• Technology: server down, response time above threshold

● Producers and consumers

Page 5: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

5 | x

What is an event ?

● Contract

● Interface

● Implementation

Event

Header

Name, Type, Time, Producer, and so on

Body

Payload

1. Guaranteed delivery 2. Delta between occurrence and

delivery 3. Maximum # of messages 4. Message size

Page 6: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

6 | x

Why use events in SOA?

Case: Organization modeling notifications in processes

Mistake: Dependencies between processes modeled

directly in the processes itself

Explanation: Process flow sometimes is influenced by other

processes. This was modeled into every process: this

makes processes tightly coupled to each other and hard

to change. It resulted in deadlocks.

Page 7: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

7 | x

Case: Explanation

Page 8: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

8 | x

Case: Best Practice

Page 9: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

9 | x

Why eventing?

Complimentary ● Processes and services describe what should be

done, events about when something important occurs

Business ● Businesses are about events

• Better communication with business stakeholders

Technology ● Decoupling: no need to know consumers and

operations to invoke • Easier release management

• Different up-times

• Different rates of processing speed

Page 10: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

10 | x

Agenda

1. What is Eventing and why use it ?

2. Oracle and Event-Driven Architecture

3. Messaging Patterns

4. Implementation & demo’s

5. Summary and Best Practices

Page 11: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

11 | x

Oracle and Event-Driven Architecture (EDA)

Filter Correlate Enrich Combine sensors

BAM

business events

notable events

event streams

business events

metrics

BI

Page 12: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

12 | x

Agenda

1. What is Eventing and why use it ?

2. Event-Driven Architecture

3. Messaging Patterns

4. Implementation & demo’s

5. Summary and Best Practices

Page 13: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

13 | x

Messaging Patterns

● Queueing

● Publish-subscribe

● Fire-and-forget

● Event-stream processing

Queue Consumer Producer

Page 14: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

14 | x

Messaging Patterns

● Queueing

● Publish/subscribe

● Fire-and-forget

● Event-stream processing

Topic Consumer Producer

Consumer

Consumer

Page 15: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

15 | x

Messaging patterns

● Queueing

● Publish/subscribe

● Fire-and-forget

● Event-stream processing

??? Producer

Page 16: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

16 | x

Messaging Patterns

● Queueing

● Publish/subscribe

● Fire-and-forget

● Event-stream processing

Producer

Producer

Producer

Event Processing

Engine

Page 17: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

19 | x

Agenda

1. What is Eventing and why use it ?

2. Oracle and Event-Driven Architecture

3. Messaging patterns

4. Implementation & demo’s

5. Summary and Best Practices

Page 18: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

20 | x

Implementation or Channel

● Advanced Queueing (AQ)

● Java Message Service (JMS)

● Event Delivery Network (EDN)

● Monitoring Objects and Sensors

● Composite Sensors

Others:

● Oracle Event Processing (OEP)

● Oracle Technology Adapters: E-mail, File, Database Polling, Custom-Built

● 3rd party Message-Oriented Middleware (MOM)

● Social Media: Twitter, Facebook, LinkedIn, Google Talk

● Java Action Listeners

● AMQP implementations

and so on, and so on, …

Page 19: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

21 | x

Advanced Queuing (AQ)

Requirement

● Need for eventing platform that can be used to integrate processes and services implemented in SOA Suite and Oracle RDBMS-based applications

Solution

● Use Advanced Queueing (AQ) as eventing platform

Characteristics

● Implementation: Oracle Database

● Payload types: RAW, Oracle Object, JMS

● Integration: PL/SQL, AQ Resource Adapter

● Delivery: Single-consumer and Multi-consumer

● Configuration: Transactionality, Filtering, Correlation, Retries

Page 20: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

22 | x

Advanced Queuing (AQ)

CREATE USER JMSUSER IDENTIFIED BY JMSUSER;

GRANT CONNECT, RESOURCE, AQ_ADMINISTRATOR_ROLE, AQ_USER_ROLE to JMSUSER;

GRANT EXECUTE ON DBMS_AQADM TO JMSUSER;

GRANT EXECUTE ON DBMS_AQ TO JMSUSER;

DBMS_AQADM.CREATE_QUEUE_TABLE(

Queue_table => ‘JMSUSER.NEW_CUST_ADDRESS_QT’,

Queue_payload_type => ‘SYS.XMLTYPE’,

Sort_list => ‘PRIORITY, ENQ_TIME’,

Multiple_consumers => ‘TRUE’);

DBMS_AQADM.CREATE_QUEUE(

Queue_name => 'JMSUSER.NEW_CUST_ADDRESS_QUEUE',

Queue_table => 'JMSUSER.NEW_CUST_ADDRESS_QT',

Max_retries => 5,

Retention_time => 10512000,

Retry_delay => 5);

DBMS_AQADM.START_QUEUE(Queue_name => 'JMSUSER.NEW_CUST_ADDRESS_QUEUE');

Page 21: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

23 | x

Advanced Queuing (AQ)

Configuration in WebLogic

● Connection Pool and Data Source

● AQ Resource Adapter

Page 22: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

24 | x

Webshop Database

Demo Advanced Queuing (AQ)

1. New order request inserted in Webshop Database with trigger that publishes

event

2. Start of SOA Composite Order-to-Cash instance through AQ Adapter

3. Stopping SOA Composite and insert new order

SOA Composite Order-to-Cash

AQ Queue New Order

Event

Page 23: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

25 | x

Java Message Service (JMS)

Requirement

● Need for eventing platform that can be used to integrate processes and services implemented in SOA Suite and Java-based applications

Solution

● Use Java Message Service (JMS) provided by WebLogic Server as eventing platform

Characteristics

● Implementation: Application server such as WebLogic Server or 3rd party provider

● Persistency: In-memory and File-based

● Delivery: Queues and Topics

● Integration: Java, MDB, JMS Resource Adapter, JMS over AQ (hybrid)

● Configuration: Transactionality, Filtering, Correlation, Error Destination

Page 24: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

26 | x

Java Message Service (JMS)

Configuration in WebLogic

● JMS Servers and Modules

● JMS Resource Adapter

Page 25: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

27 | x

Demo Java Message Service (JMS)

1. SOA Composite Order-to-Cash publishes new billing event through JMS Topic

2. SOA Composite Billing generates invoice

3. Java CRM Application stores billing info with customer records

SOA Composite Order-to-Cash

JMS topic SOA Composite BillingService

Java CRM Application

Page 26: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

28 | x

Event Delivery Network (EDN)

Requirement

● Need for light-weight and declarative eventing platform that can be used within SOA Suite

Solution

● Use Event-Delivery Network (EDN) as eventing platform

Characteristics ● Introduced in SOA Suite 11g

● Implementation: Light-weight framework on top of AQ (EDN-DB) or JMS (EDN-JMS)

● Features: Basic eventing features

● Delivery: Publish/subscribe

● Integration: BPEL, Mediator, ADF BC, PL/SQL and Java API

● Usage and configuration: Technology-neutral and declarative, Event Definition Language (EDL) uses XML message types, Filtering

Page 27: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

29 | x

Event Delivery Network (EDN)

Configuration in JDeveloper

● Event Definition in EDL

● Publish or subscribe to EDN

Page 28: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

30 | x

Demo Event Delivery Network (EDN)

1. SOA Composite Order-to-Cash publishes dunning event through EDN; SOA

Composite DunningService is subscribed and started

2. Publication of payment event through EM

3. Event correlated to Order-to-Cash process

SOA Composite Order2Cash

SOA Composite DunningService EDN

Page 29: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

31 | x

Monitors & Sensors

Requirement

● Push relevant data from running process and service instances to monitoring tools such as BAM, EM, and other 3rd party tools with minimum impact

Solution

● Use Monitoring Objects to push data to BAM and other tools

● Use Composite Sensors to push data to Enterprise Manager

sensor data

BAM

EM

sensor data

Page 30: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

32 | x

Monitors & Sensors

● Composite Sensors to capture

relevant data for EM

● Monitoring Objects in BPEL to

notify other systems such as BAM

Page 31: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

33 | x

Agenda

1. What is Eventing and why use it ?

2. Oracle and Event-Driven Architecture

3. Messaging patterns

4. Implementation & demo’s

5. Summary and Best Practices

Page 32: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

34 | x

Summary & Best Practices

● SOA is not only about (synchronous) services and processes

(what); also events (when)

• Model events in your BPM and SOA projects

• Use events to notify running processes

• Expand service registry to include events

• Use events for additional decoupling between processes and services

● Not just queuing, also pub/sub and event stream processing

● Not a single best technology for implementation

Page 33: Introduction in Eventing in Oracle SOA Suite 11g · • Managing Partner at Vennster • Oracle ACE Director for Fusion Middleware and SOA • Author of different articles, co-author

35 | x

Thank you!

Ronald van Luttikhuizen

[email protected]