how pl/sql applications can participate in a service-oriented architecture
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 PresentationTRANSCRIPT
1
How PL/SQL Applications Can Participate in a Service-Oriented Architecture
Aino Andriessen
AMIS
2
?
SOA PartyPL/SQL
3
SOA
design connectivity
4
Service Design
Focus on function a service is not a technical solution
Component vs. service
5
Examples
zipcode check / address check notification service converter
xx -> xml currency
CD information lookup
6
Connectivity
any technology standards
XML http soap ws-... ...
synchronous vs. a-synchronous a service is not necessarily a webservice Loosely-coupled
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
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
9
PL/SQL applications can function as a service provider and as a service consumer.
10
Database access (provider)
Oracle Database
JDBC
SQL*NET
ODBCWEBDAV
FTP
HTTP
XMLDB webserver
11
Access the outside world (consumer)
Oracle Database
files
host
Database linkHTTP
External procedure
12
This sheet has been left blank on purpose
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
14
Web service protocol stack
Service transport http, smtp, ftp, ...
XML messaging soap, rest, xml-rpc, ...
Service description wsdl
Service discovery uddi
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>
16
PL/SQL as a Webservice consumer
PL/SQL
Webservice
utl_http / utl_dbws
http
Java stored procedure
Webservice
http
PL/SQL wrapper
17
Demo
utl_http
Webservice
utl_dbws
wsdl
ws_odtug_service_client.pkb
18
Webservice producer
PL/SQL
consumer
http
XMLDB webserver
mod_plsql
PL/SQL
consumer
http
Application ServerWebapp
19
Demo
ws_server.conferences
Browser
http
XMLDB webserver
/ws
DBMS_EPG.create_dad (
dad_name => 'ws',
path => '/ws/*');
ws_server.pkb
20
21
Messaging
a-synchronous transportlayer - MOM
Tibco, IBM MQ, JMS, AQ, ...
some standarization JMS interface SOAP message format
22
Messaging concepts
queue / topic enqueue - dequeue point - to - point publish - subscribe
producer queue consumerenqueue dequeue
producerqueue / topic
consumerpublish
consumer
subscribe
23
Oracle Streams Advanced Queuing (AQ)
queue queue table (or memory) exception queue queue view payload subscriber propagation
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
25
Access
PL/SQL java / JMS / jdbc
oracle.jms, javax.jms VB
Oracle objects for OLE
OCI Internet Oracle Messaging Gateway
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.
27
Oracle Messaging Gateway
Messaging Gateway enables communication between applications based on non-Oracle messaging systems and Oracle Streams AQ.
28
AQ implementation
Oracle products interconnect ...
ESB / integration products Mule Oracle ESB iWay BEA ...
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
30
Conclusion
PL/SQL can interact directly with the world outside the database, using standard 'internet' technology, either directly or via Oracle messaging (AQ).
31
!
SOA Party