May ESB Deep Dive v2 - JBoss
Transcript of May ESB Deep Dive v2 - JBoss
Questions: [email protected]
JBossESB Deep Dive Webinar May 16
• Describe and demonstrate as many of the ESB 4.2 capabilities as possible in one hour.
• Please try to hold your questions until the end. Th e Q&A portion of this presentation will be conducted via the Elluminate chat window AFTER the completion of the formal presentation.
• We can repeat this session as needed, as available – our first scheduled repeat is May 22 nd 11:00 AM Eastern
• ESB 4.2 MR2 is available for download: http://labs.jboss.com/jbossesb/
• Join our email list for future ESB announcements:https://lists.jboss.org/mailman/listinfo/esb-announ ce
• The PDF of the slides will be available to attendee s after the session.
Questions: [email protected]
A Real World Scenario
SourceSystem
ASCII
File System
ASCII
File System
ASCII FTPFTP
FTPGET
MSG MQMQ
JMSListener
JDBC/ODBCSelectUpdate
SQLSQL
DataData SocketSocket
TCP/IPSocket
Questions: [email protected]
Receiving
System N
ASCII
File System
Receiving
System N
ASCII
FTP
Receiving
System N
JMS
The ESB Solution
ASCII
File System
SourceSystem
ReceivingSystem 1
ReceivingSystem 2
ASCII
File System
ReceivingSystem 3
XML
JMS
XML
SOAP
JBoss ESB
Questions: [email protected]
Enterprise Service Bus
* Transformation includes:Message Normalization,Validation, Enrichment,
Rules-based and XSLT transforms
ServiceRegistry
JBoss ESB
EventStore
Transformation Routing
Infrastructure Services
Security Management
Orchestration&
CompositionEngine
BPELjPDL
ProcessStore
Notification
Pluggable Architecturefor integrating infrastructure services
Web Services
EJB3
POJOs
Java EE 5
Business ServiceComponents
BusinessData
JCA
RDBMSLegacyCOTS
Business Servicesruns within a container or standalone
Service Data Object
Service Component Architecture
HTTP(S)
FTP
File
JMS
SOAPExcel
Browser
PortalSeam
ASCIIXML
Binary
Transports
Web
SQL
Event Listeners and Actions provide transport and transport mediation
Socket
Hibernate
Questions: [email protected]
ESBs Across The Enterprise
HTTP/S
FTP
File
JMS
SOAP
Portal
Seam
ServiceRegistry
JBoss ESB
EventStore
JSR 181 POJOs
EJB3
POJO
BusinessServiceTransformation Routing Security
BusinessData
Management
CompositionEngine
BPELjPDL
Scripting
JCA
WebProcess
Store
Notification
FTP
File
SOAP
ServiceRegistry
JBoss ESB
EventStore
Routing Security
CompositionEngine
BPEL ProcessStoreNotification
File
SOAP
ServiceRegistry
ES
B
CompositionEngine
BPELProcess
Store
Invoicing/Order Entry
Web Order EntryAccounting
SharedDistributedRegistry
Plus Lightweight ESBArchitecture
Questions: [email protected]
Service Federation
Registry& Messaging
Transformation Services Cluster
Rules Services Cluster
Order Validation
Credit Check
Process Store
Customer Inquiry
Customer Update
Accounting
Order Services
Routing Services
Customer Services
* JVM
Order Validation
Credit Check
Shipping Calc
Inventory Check
Inventory Update
Warehouse Services
Shipping Calc
Inventory Check
Inventory Update
Shipping Calc
Inventory Check
Inventory Update
Customer Inquiry
Customer Update
Accounting
Questions: [email protected]
Enterprise Service Bus
* Transformation includes:Message Normalization,Validation, Enrichment,
Rules-based and XSLT transforms
ServiceRegistry
JBoss ESB
EventStore
Transformation Routing
Infrastructure Services
Security Management
Orchestration&
CompositionEngine
BPELjPDL
ProcessStore
Notification
Pluggable Architecturefor integrating infrastructure services
HTTP(S)
FTP
File
JMS
SOAPExcel
Browser
PortalSeam
ASCIIXML
Binary
Transports
Web
SQL
Event Listeners and Actions provide transport and transport mediation
Socket
Web Services
EJB3
POJOs
Java EE 5
Business ServiceComponents
BusinessData
JCA
RDBMSLegacyCOTS
Business Servicesruns within a container or standalone
Service Data Object
Service Component Architecture
Hibernate
Q6 2006 Mid 2007 FuturePartners
Questions: [email protected]
The Modern Silo
DB
App
Web Pages: Struts, JSF, Tapestry
DAO/JPA/SLSB/Spring BeanHibernate
Query/Stored Procedure
Browser
Questions: [email protected]
Intermediate those Silos
DB
App DAO/JPA/SLSB/Spring BeanHibernate
Query/Stored Procedure
Service 1 Service 2 Service 3
Browser Rich B2B Legacy
Mediation
Service 4 Service 5 Service 6Mediation
Questions: [email protected]
JBossESB 4.2 provides
• Message delivery– JMS (JBossMQ, JBoss Messaging, ActiveMQ, MQSeries, Oracle AQ)– (S)FTP, SOAP, HTTP, email, database, shared file system
• Action chaining/pipeline – For custom service enablement & mediation
• Transformation– XSLT, Java, Groovy, StringTemplate
• Content-based routing– JBoss Rules, XPath DSL– Recipient List/Static Routing is also supported
• Orchestration – BPM, Intelligent routing, EIPs and hot deployment
• Registry– JAX-R based– UDDI support out-of-the-box (Scout and jUDDI)
• Message Store• Gateways• Extensive examples and documentation• And more…
Questions: [email protected]
JBoss ESB 4.2 Roadmap
• JMX Microkernel• Federated Clustering• WS-*
– SOAP 1.2
– WSDL 1.1
– 181 Annotated POJO Endpoints
– EJB 2.1 and EJB 3.0 Endpoints
– JAXB 2.0
• BPEL 2.0
• Advanced Splitter/Aggregator• Content Based Filter• Business Rules Action• Native Process Orchestration• Improved SQL Gateway• Hibernate Gateway/Listener• HTTP Gateway/Listener• Groovy Action• Message Store Actions• JCA Container• Additional EIP examples
Questions: [email protected]
ESB Transformation Engine
• Validation• Enrichment• Inline transformations (Fragment based Processing)• Profile based XML/non-XML processing• Anything to Anything (XML, CSV, binary, X12, POJO)• Mix/Match transformers on a single message:
– Java– Groovy– StringTemplate– XSLT
• 4X performance boost over plain XSLT (Xalan): http://milyn.codehaus.org/Chiba+Integration
Questions: [email protected]
jboss-esb.xml
• Configuration for one or more services which show up in the registry.
• Deployed as the key element of a .esb archive in 4.2 +• Structure of a .esb archive
META-INF
jboss-esb.xml
com.mycompany.soa.mycustom.actions
MyCustomAction.class
Tip: Use one of the quickstarts as your template for your new project. We doassume that you are comfortable with Ant. An Eclip se Project template is underDevelopment and will be available in SVN soon (as o f May 16, 2007)
Questions: [email protected]
Hello World – jboss-esb.xml 1
<?xml version = "1.0" encoding = "UTF-8"?><jbossesb
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/ trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
<providers><jms-provider name="JBossMQ"
connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel"><jms-message-filter
dest-type="QUEUE"dest-name=" queue/quickstart_helloworld_Request_GW "/>
</jms-bus><jms-bus busid="quickstartEsbChannel">
<jms-message-filterdest-type="QUEUE"dest-name=" queue/quickstart_helloworld_Request_ESB "/>
</jms-bus>
</jms-provider></providers>
Questions: [email protected]
Hello World – jboss-esb.xml 2
<services><service category="FirstServiceESB" name="SimpleListener" description="Hello World">
<listeners><jms-listener name="JMS-Gateway"
busidref=" quickstartGwChannel "maxThreads="1"is-gateway="true"/>
<jms-listener name="helloWorld"busidref=" quickstartEsbChannel "maxThreads="1"/>
</listeners><actions>
<action name="action1" class="quickstart.helloworld.MyListenerAction" process=" displayMessage "/>
</actions></service>
</services>
</jbossesb>
Questions: [email protected]
Hello World - action
package org.jboss.soa.esb.samples.quickstart.hellow orld;
import org.jboss.soa.esb.message.Message;
public class MyListenerAction
{
public Message displayMessage (Message message) {
System.out.println("Body: " + new String(message.getBody().getContents()));
// modify the contents, do anything Java can do…
return message; // always return the message for th e “chain”
}
public MyListenerAction(ConfigTree config) {
// this constructor will be used to handle any jbos s-esb.xml
} // custom property configuration
}
Questions: [email protected]
Action Pipeline (in a Service)
FTP Action Action Action ActionBusiness
LogicComponent
TransformationCSV to XML
TransformationXML to POJO
RoutingSplitter
orBPM
LoggingAuditTrail
My_Registered_Service
Business Logic:• POJO• EJB • WS• Rules• JCA with Adapters• Anything with Java API
Actions are reusable mediation components that can be chained together to form the capabilities of a registered s ervice. Actions can be dynamically added/removed at runtime.
Action
BusinessLogic
Invocation
This box can also represent the ESB’s JVM – actions a re “in VM”
Questions: [email protected]
Enterprise Integration Patterns
Aggregator
File Transfer
Translator/Transformer
Router/CBRChannel
Message
Recipient List
Splitter
Wire TapEnricher
Content Filter
Process Manager
Message Store
Message Filter
More information atwww.enterpriseintegrationpatterns.com
Questions: [email protected]
Routing, Services & Actions
FTPASCIIXML
Binary
Action Action
SOAP
JMS
Action
Action
DB
DBPOJO
EJB
A_Service
B_Service
C_Service
JMS Action DBWS
D_Service
Questions: [email protected]
Content Based Routing
SOAP Action
DBPOJO
Platinum_Service
FTP
ASCIIXML
Binary
Action
Ordering_Service
Randomly grab orders for review – tracer andKeep a total of all orders flowing through the syst em
SOAP Action
Special_Handling
EJB
Orders over 12K or from Platinum customers
DB
Orders from customers in certain states/countries
Questions: [email protected]
Content Based Routing Engine
• Currently based on JBoss Rules – supports XPATH DSL• Access to the complete Header and Body/Contents for evaluation• Zero to many destinations
rule "Routing Rule using XPATH Greater"when
xpathGreaterThan "/Order/@totalAmount ", "50.0"then
Log : "Really It's EXPRESS Shipping";Destination : "ExpressShipping:ExpressShippingService";
end
rule "Routing Rule using XPATH Less"when
xpathLessThan "/Order/@totalAmount ", "50.0"then
Log : "Really It's NORMAL Shipping";Destination : "NormalShipping:NormalShippingService";
end
Destination : “ServiceCategory:ServiceName”
Questions: [email protected]
Splitter/Aggregator Quickstart
JMS Action
Inbound Splitter
JMS Action
Red
Also demonstrates, federated ESB, multi-JVM capabil ities
JMS Action
Green
JMS Action
Blue
JMS Action
Aggregator_Service
Questions: [email protected]
Orchestration (Got Flow)
Customer
CustomerService
Warehouse
Shipper
Submit Order
Receive Order Validate Order
Credit Check
Inventory Check
Handle Shipment
Send Shipment
CreditAgency
CSR Teams
Issues
Customers submit orders via web browser, FTP and We b Services.The system receives and validates the order, errors are sent to the appropriate CSR TeamA credit check request is made, any areas of concer n are sent to the appropriate CSR TeamAn inventory check request across multiple warehous es is sent, lack of availability goes to the CSRs.Assuming the order is valid, checks credit and avai lable inventory, pick tickets are printed, shipping labels are printed, someone throws the parts into a crate or places on a pallet and puts the package by the loading dock. Various shipping companies ar e employed.
Simple Order Handling Process
Questions: [email protected]
Service Oriented Orchestration
Customer
CustomerService
Warehouse
Shipper
Submit Order
Receive Order Validate Order
Credit Check
Inventory Check
Handle Shipment
Send Shipment
CreditAgency
CSR Teams
Issues
a Parse XMLb Transformc Apply Business Rules
Validate Order
a Create Outbound Msgb Handle Responsec Apply Business Rules
Credit Check
a Send to N Warehousesb Handle N Responsesc Determine Best WHSEsd Handle Drop-Ships
Inventory Check
ESB Mediates& Provides Services
a Determine Shipper(s)b Print Labelsc Print Pick Ticketsd Create & Send ASNs
Send Shipment
Questions: [email protected]
Service Orchestration & BPM
Submit Order
Receive Order Validate Order
Credit Check
Inventory Check
Handle Shipment
Send Shipment
CSR Teams
Issues
Customer CSR Sales Mgmt WHSE MgmtHumans
J2EE AppServer
…
FTP
SOAP
File
ValidateOrder
CreditCheck
InventoryCheck
SendShipment
External Credit/Bank Legacy Partners
Various Transports
An ESB Service is visible in the UDDI registry auto matically. A single ESB Service may or may not expose a WSDL. It may use out-of-the-box actio ns, custom actions and/or consume external services from various sources. Focus on the reuse of existing infrastructure and assets.
Questions: [email protected]
Orchestrated/Composed Services
ExternalActor
ExternalActor
ExternalActor
Action DBPOJO
Pricing_Service
Action DBEJB
Order_Service
Action
Action DBDAO
Validation_Service
BPMJVM
Questions: [email protected]
BPEL
• We are partnering with Active Endpoints• www.activebpel.org• Download their open source BPEL engine and
contact them for their free design tool.• As for ESB 4.2 MR2, review the webservice_bpel
quickstart, specifically the ActiveBPEL-Orchestration.pdf under that quickstart’s Docs folder.
• And engage us in the online forums: http://www.jboss.com/index.html?module=bb&op=viewfo rum&f=246
Questions: [email protected]
Possible Big Picture
DB
WSClient
Application Server
Enterprise Service Bus
Action
Service D
Action
Service C
Action
Service A
JVM
Spring
DAO
EJB
Rules
Groovy
Action
Service B
ORCHESTRATION
SOAP
BPEL
PartnerLink
PartnerLink
PartnerLink
SOAP
JMS
FTP
SERVICE
LegacyApplicationSOAP
.NETApplicationSOAP
Note: Not every technology is required. This is simply a way to illustrate howthe various technologies might be usedtogether
Questions: [email protected]
Conclusions
• Open Source will make SOA happen• It is NOT all about Web Services• ESB a solution for application/process integration. • ESB is about service intermediation.• JBossESB architecture is key to flexibility and
future-proofing– Forms the backbone of our SOA strategy
• DOWNLOAD ESB 4.2 MR2