32
1 How PL/SQL Applications Can Participate in a Service-Oriented Architecture Aino Andriessen AMIS

How PL/SQL Applications Can Participate in a Service-Oriented Architecture

  • Upload
    lavey

  • View
    20

  • Download
    5

Embed Size (px)

DESCRIPTION

How PL/SQL Applications Can Participate in a Service-Oriented Architecture. Aino Andriessen AMIS. ?. PL/SQL. SOA Party. IBM. j2ee. wsdl. messaging. soap. php. .NET. XML. webservices. SOA. design connectivity. Service Design. Focus on function - PowerPoint PPT Presentation

Citation preview

Page 1: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

1

How PL/SQL Applications Can Participate in a Service-Oriented Architecture

Aino Andriessen

AMIS

Page 2: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

2

?

SOA PartyPL/SQL

Page 3: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

3

SOA

design connectivity

Page 4: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

4

Service Design

Focus on function a service is not a technical solution

Component vs. service

Page 5: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

5

Examples

zipcode check / address check notification service converter

xx -> xml currency

CD information lookup

Page 6: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

6

Connectivity

any technology standards

XML http soap ws-... ...

synchronous vs. a-synchronous a service is not necessarily a webservice Loosely-coupled

Page 7: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

7

The position of the database

Traditionally, the database could be considered as an isolated entity, only available to its application(s).

Forms

db

VB webapp

internet intranet

Page 8: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

8

The position of the database - 2

Nowadays, the (Oracle) database is able to function on its own and to deliver applications / services without the need

of an application server to connect directly to other applications / services use on standard internet technology synchronous and a-synchronous

db

internet intranet

appB

Page 9: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

9

PL/SQL applications can function as a service provider and as a service consumer.

Page 10: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

10

Database access (provider)

Oracle Database

JDBC

SQL*NET

ODBCWEBDAV

FTP

HTTP

XMLDB webserver

Page 11: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

11

Access the outside world (consumer)

Oracle Database

files

host

Database linkHTTP

External procedure

mail

Page 12: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

12

This sheet has been left blank on purpose

Page 13: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

13

Webservices

According to the W3C a Web service is a software system designed to support interoperable machine-to-machine interaction over a network

(in general) synchronous Request - Response mechanism

Page 14: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

14

Web service protocol stack

Service transport http, smtp, ftp, ...

XML messaging soap, rest, xml-rpc, ...

Service description wsdl

Service discovery uddi

Page 15: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

15

SOAP example

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>...</soap:Header>

<soap:Body>

<getProductDetails xmlns="http://warehouse.example.com/ws">

<productID>827635</productID>

</getProductDetails>

</soap:Body>

</soap:Envelope>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<getProductDetailsResponse xmlns="http://warehouse.example.com/ws">

<getProductDetailsResult>

<productName>Toptimate 3-Piece Set</productName>

<productID>827635</productID>

<description>3-Piece luggage set. Black Polyester.</description>

<price>96.50</price>

<inStock>true</inStock>

</getProductDetailsResult>

</getProductDetailsResponse>

</soap:Body>

</soap:Envelope>

Page 16: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

16

PL/SQL as a Webservice consumer

PL/SQL

Webservice

utl_http / utl_dbws

http

Java stored procedure

Webservice

http

PL/SQL wrapper

Page 17: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

17

Demo

utl_http

Webservice

utl_dbws

wsdl

ws_odtug_service_client.pkb

Page 18: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

18

Webservice producer

PL/SQL

consumer

http

XMLDB webserver

mod_plsql

PL/SQL

consumer

http

Application ServerWebapp

Page 19: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

19

Demo

ws_server.conferences

Browser

http

XMLDB webserver

/ws

DBMS_EPG.create_dad (

dad_name => 'ws',

path => '/ws/*');

ws_server.pkb

Page 20: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

20

Page 21: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

21

Messaging

a-synchronous transportlayer - MOM

Tibco, IBM MQ, JMS, AQ, ...

some standarization JMS interface SOAP message format

Page 22: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

22

Messaging concepts

queue / topic enqueue - dequeue point - to - point publish - subscribe

producer queue consumerenqueue dequeue

producerqueue / topic

consumerpublish

consumer

subscribe

Page 23: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

23

Oracle Streams Advanced Queuing (AQ)

queue queue table (or memory) exception queue queue view payload subscriber propagation

Page 24: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

24

AQ

API : dbms_aqadm dbms_aq ! Never, ever perform direct dml on queue tables

payload = message type: object

• oracle objects, xmltype, collections

varchar2 raw

Page 25: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

25

Access

PL/SQL java / JMS / jdbc

oracle.jms, javax.jms VB

Oracle objects for OLE

OCI Internet Oracle Messaging Gateway

Page 26: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

26

AQ Internet access

You can access Oracle Streams AQ over the Internet by using Simple Object Access Protocol (SOAP). Internet Data Access Presentation (IDAP) defines

the XML message structure for the body of the SOAP request.

Page 27: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

27

Oracle Messaging Gateway

Messaging Gateway enables communication between applications based on non-Oracle messaging systems and Oracle Streams AQ.

Page 28: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

28

AQ implementation

Oracle products interconnect ...

ESB / integration products Mule Oracle ESB iWay BEA ...

Page 29: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

29

Demo

B.Developer

A.Conference Registration

reg

istr

atio

n_i

n

1

2

reg

con

firm

atio

n_ou

t

3

4

JDBC

B.Developer

A.Conference Registration

regi

stra

tion_

in

1

2

regc

onfir

mat

ion_

out

3

4

make_registrationreceive_confirmation

receive_registrationsend_confirmation

Mule - ESB

Developer2

A.Conference Registration

reg

istr

atio

n_in

1

2

reg

con

firm

atio

n_ou

t

3

Mule - ESB

Developer2

4

Command Line Command Line

do_enqueue.prc

do_dequeue.fncDeveloper.java

aq_send.xml

aq_receive.xml

Developer2.java

Page 30: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

30

Conclusion

PL/SQL can interact directly with the world outside the database, using standard 'internet' technology, either directly or via Oracle messaging (AQ).

Page 31: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

31

!

SOA Party

Page 32: How PL/SQL Applications Can Participate in a Service-Oriented Architecture

32

Questions & Answers

[email protected]

AMIS weblog : http://technology.amis.nl/blog/