This session introduces SOA and the new Oracle SOA Suite 11g to the realm of database professionals from which it sometimes seems so far removed. What are the key SOA concepts and objectives? What is at the heart of Oracle SOA Suite 11g: composite applications, BPEL PM, and the mediator. The session shows how SOA services can be leveraged from the database, from triggers, PL/SQL units, or even SQL and how the database can publish events to the event delivery network. It covers how the SOA infrastructure can access the database, primarily using Oracle Database and Oracle Advanced Queueing adapter and how database developers can help in doing so efficiently. It ends with hints for applying SOA concepts to "normal" database development.
Scanning the Internet for External Cloud Exposures via SSL Certs
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
1. IntroducingSOA and Oracle SOA Suite 11g to Oracle Database Professionals WebLogic Server 11g Oracle Open World 2009 Monday, 12th October Lucas Jellema AMIS, The Netherlands SOA Suite 11g
2. Agenda Introducing SOA – what, why, how Quick overview of SOA Suite 11g Leveraging the SOA Suite from the database Accessing the database from the SOA Suite Applying SOA principles to database development Wrap up
6. Types of decoupling Functional Interface - Encapsulation of implementation Design by Contract, Implement by Design Technical No proprietary technology, protocol, message format Standards based (XML, HTTP, RSS, WSDL…) Temporal Asynchronous communication (separate response) Development Separate teams working in parallel based on mutually agreed interface definitions
7. Objectives Business Agility (Faster) responses to market demands Creating new business from existing resources IT Flexibility Optimize locally without impact ‘globally’ Prepare for future developments Lower costs Through reuse, better integration, decoupling
8. Objectives (longer term) Higher Quality and Faster (traceable) Process execution Automated data exchange cross boundaries Workflow and task orientation integrated, cross department, in a controlled way based on sound understanding of the business processes Business Event driven interaction Manage risks and fear
9. Common Characteristics in SOA Cross Boundaries Cross Technology - .Net, Uniface, Java, Tibco Cross Channel – Back Office, Web, PDA, API Cross User Group – Internal, Agents, Self Service Cross Domain – Multiple departments & systems Cross Enterprise – Interact with external partners Data synchronization or consolidation Management whim Vision From Database angle: providing services
10. What is a service? Standards based callable, reusable functionality according to an interaction contract In terms of functionality (WSDL – compare Package Specification) What are the input parameters What are the output parameters (if any) What are the exceptions How (when, where) is the response delivered Implementation is hidden!
11. What is a service (2)? In terms of operational QoS (Quality of Service) define in a Service Level Agreement (SLA) Availability Stability & Release schedule Response Time Peak load capacity Price Reliability, Confidentiality Address, protocol
12. Services in various shapes Library (dll, jar) Java Class (public methods) or an EJB (interface) URL RSS feed Portlet (UI Service) SOAP WebService Database View or Package Specification …. If it exposes a clear, standardized interface
13. Example of a service call? Browser makes sendshttp request to a URL Text based message with headers and body
14. What is a service call? Server returns a response Another text based message with headers and body
15. Calling a Web Service Send an XML document to a URL via HTTP Request message contains headers and body Service (server) returns another XML document Response message contains headers and body Response can be a fault (a WebService exception) Headers are used for meta-data Sender (identity, address), Return address Encryption, digitally signed, Type of content, type of compression
16. The SOA Suite 11g The engine that runs applications that implement the WebServices Inside the WebLogic Server application server WebLogic Server 11g WebServices SOA Suite 11g
17. SOA Suite 11g Composite Applications SOA Composite Applications consist of special components that process XML messages: Decision Logic (go left or right, discount is X) Human Workflow (end user must act) BPEL (service orchestration) Mediator (filter, transform and route messages)
18. SOA Suite 11g – calling out to external service and adapters SOA Composite Applications can call out to external WebServices and Adapters Adapters connect to various technologies Database (SQL & PL/SQL) Advanced Queuing File & FTP JMS, MQ Series, EBSTCP/IP Sockets Adapters can triggerapplication execution
19. Leveraging SOA Suite 11g from the database The database can call out to the SOA Suite 11g With UTL_HTTP or Stored Java (2-way, synchronous) Through Advanced Queuing or Database Adapter polling (one way) WebLogic Server 11g SOA Suite 11g AQ AQ
20. Call the “getOilPrice Service” We need to know the oil price for some calculations… But that price is not constant, we need the current price We do not want the exact market price, we have our own contracts Let’s define a constant in a package Oh, well, let’s call a WebService – Yahoo? Ah, the Purchasing department publishes a WebService for such data
21. PurchasingPrices available via SOAP PurchasingPrices Service is available as a (SOAP based) WebService (implemented using BPEL) Service and WSDL are available (URLs are known)
22. PurchasingPrices available via SOAP SOAP call over HTTP can be made from PL/SQL Using UTL_HTTP Assemble SOAP message Envelope Payload Name of product Make HTTP Post request Process Response Retrieve and Return the product price “re-Publish” service as PL/SQL function WebLogic Server 11g SOA Suite 11g
24. The database can ask the middle tier for other services as well Get information from (or to) services on the intranet or internet (‘please get us the NBA scores ’) Publish/Send information to the internet (RSS, email, chat) Can tell the middle tier Interesting events and data changes Trigger cache refresh! Alert about (im)pending issues,attempted rule violations, … The outcome of batch calculcations WebLogic Server 11g SOA Suite 11g Web App AQ
25. Happy Chatting – IM from the Database WebLogic Server 11g Service Service Database can call a middletier service using utl_http Passing in the destinationand the message content This Service sends it onwards to the Google Talk Server CHAT_MGR
27. Publish Services from the Database Describe Services in WSDL and XSL Specify operations, input and output parameters Describe complex data structures ofparameters Publish Database-based Services Plain URL services through PL/SQL packages based on MOD_PLSQL, XML DB or DBMS_EPG Full blown SOAP WebServices 11g Native WebService (publish PL/SQL package), use UTL_DBWS, JPublisher for Java proxy class in AppServer Leverage SOA Suite to expose Database functionality Through the database adapter in SOA Suite/WLS
28. Oracle DB 11g NativeWebServices Publish a PL/SQL Package as externally available WebService WSDL is auto-generated SOAP calls over http and https are supported
29. SOA: Loading file contents into table SOA application can contain services that read from or write to the database Database is passive – undergoing SQL or PL/SQL Polling can also be against database
32. Key SOA concepts and lessons Functional interface, hiding implementation details Package specification Simple View API (possibly with IOT) – with complex joins, analytical functions, advanced SQL and PL/SQL integration Reusable, standardized services as flexible building blocks Aggregate and Combine into more valuable reusables Governance: security, management of services, SLAs Allow for configuration without development or deployment effort Decoupling in every aspect!
33. Coupling & Decoupling in Oracle RDBMS Decoupling Coupling Package Specification Views (+ Instead of Trigger) Triggers in general DBMS_JOB Advanced Queuing Publish (intranet) XML & WebService %TYPE instead of hardcoded data type Centrally managed “parameter service” instead of local constants instead of hard coded values Use generic (SOA) services Database Link SYSDATE and USER Application performing SQL against tables SQL all over the place Access database from DMZ or even outside firewall Publish WebService or Web Application on Internet Too frequent use of dbms_output.put_line Copy and paste of code Poorly documented code Use of exotic features
37. Decoupling from Table to ESB+ http WEBDAV FTP WSRP coupled http WS/SOAP WS* WS* WS* complex
38. Increasingly decoupled More hiding of the implementation More Formal Interface Contract Less (proprietary) technology & more standards for interacting Less exposure of (legacy) data model More support for asynchronous interaction More reuse potential Pervasive throughout enterprise More suitable for external consumption
39. Comes at a cost… More run time overhead Additional tiers XML serialization and deserialization More infrastructure Burden of Administration License Costs Hardware Broader skills palette – more stuff to master Harder to get started
40. Summary SOA is about decoupling, integration & reuse SOA Suite 11g runs service implementations That can access database and other technologies through adapters – either inbound or outbound Database can access services from utl_http Or AQ, Database polling or File polling SOA Suite hooks into database via SQL, PL/SQL, AQ or even XML DB file protocols Many SOA concepts can be applied without the SOA Suite, using standard DB features
41. Resources Presentation and demos are on our blog http://technology.amis.nl/blog Contact me at: lucas.jellema@amis.nl