A presentation on BizTalk 2009 ESB (Enterprise Service Bus) Guidance at Auckland Connected Systems User Group by Kevin Gock. Thiago Almeida presented Capabilities of BizTalk Server 2009
2. Agenda Enterprise Service Bus (ESB) ESB Guidance Itinerary Dynamic Endpoint Resolution Web Services ESB Management Portal Demo Questions?
3. Definition of ESB Implementation of an infrastructure for enabling a service oriented architecture (SOA) Enterprise – Integrate assets of one company Service – Provides services e.g. Routing, Transformation Bus – Pluggable messaging endpoints
4. Think of an ESB as ... Collection of architectural patterns based on Traditional enterprise application integration (EAI) Message-oriented middleware Web services .NET and Java interoperability Host system integration Interoperability with service registries and asset repositories
6. What is the ESB Guidance? Enhancements to BizTalk Developed by Patterns and Practices Team Extends BizTalk Itinerary-based invocation Dynamic endpoint resolution Message routing using registry or rules engine Web Services Fault Management and Reporting Integration with 3rd Party SOA Governance Solutions Sample Applications
7. Installation Install: BizTalk ESB Core, Exception Handling packages Itinerary Designer ESB Configuration Tool Documentation Source Code Requires: Windows 2008 SQL Server 2008 Visual Studio 2008 SP1 Enterprise Library 4.0 Unity Application Block 1.1 Use Microsoft Hyper-V for virtualisation
8. What is an Itinerary? XML defining a sequence of Services to execute Sent by a client as a SOAP header along with message
9. How does an Itinerary work? Client Sends Itinerary and Message (both flow together for each Service executed) ESB Pipeline sets Itinerary values as message context properties Itinerary Subscribers: Orchestration or ESB Agent (name=Transform/Routing) Filter for specific name, type, state
10. Why have an Itinerary? Makes message highly distributable. Ability for any ESB container to process the message Caller must be changed to pass Itinerary
11. Dynamic Endpoint Resolution Allows an Itinerary service endpoint to be resolved, dynamically at runtime. Supported Resolvers: - UDDI - LDAP - Xpath - BRE - Static
12. Dynamic Endpoint Resolution Example Itinerary – Resolvers XML Fragment: Processing: Transform message using BRE Send the Order to static file location location resolved by using UDDI search Send the response back to caller
13. Why use Dynamic Endpoints? Avoid consumers binding directly to a static endpoint. If endpoint changes then the consumer needs to change also. Example: Orchestration calls static WebServiceA .NET app calls static WebServiceA UDDI would be useful to lower maintenance by changing the UDDI registry only.
20. Summary Guidance implementing an ESB, best practices and reducing effort Loose coupling with Itinerary and Dynamic Endpoint Resolution Lots of useful Web Services Management of the ESB via a Portal (faults, UDDI) Still in CTP2 so there are outstanding issues Source code for ESB and samples Extensible and Free!
Example of Service Registry: UDDI (Universal Description, Discovery and Integration) is used in the ESB Management Portal which I will demo
Purpose is to make implementing an ESB using BizTalk easier ESB Guidance 2.0 released January 14 as CTP2ESB Guidance is a little like the Enterprise Library is to .NET Development. ITINERARY: XML Message with a list of services to executeDYNAMIC: Finding an endpoint (like a web service location) at runtime, rather than hard coding itMSG ROUTING: Use the BRE to determine where to route the messageEND B3: One feature which I will leave out is SOA Governance Integration as it requires 3rd party tools. Its mainly about monitoring polices, usage information, service level agreements.
Use Hyper-V and snapshotsThere are 2 main installation options:Use Pre-compiled binaries (recommended, unless you need to change the source for some reason)Use Source CodeESB Configuration Tool sets up the ESB Core and Exception Handling Web Services and DBs
There are 3 key elements which are used by the filter for processing which are the name, type and state. There are currently 2 ESB Agent Orchestrations which subscribe to the Transform and Routing for processing of these services.The last service is processed outside of the generic ESB components.
1) When a service is executed it is up to the Itinerary Subscriber to advance the Itinerary from the current step to the next step. There is a helper classes to do this.
When a message carries the list of services to execute with it, it decentralises the processing making the message more distributableAs an example a message have an itinerary for different environments, test, uat etc.
To resolve UDDI for example you would specify in the Itinerary, the UDDI search criteria which would result in a resolved location such as a file location.
This windows application is part of the ESE Guidance. You can combine a Message and Itinerary separately can make a Web Service call.Run the programThe first service in the Itinerary transformed the order by having a SubmitOrder element wrapped around the messageThe second service routed the message to the out folderShow the message generatedShow the ESB.Agent project Delivery: Receive Msg Filter Expression Resolve Shape – Resolves message using helper class and set the TransportLocation and Transport Type Set Delivery Shape – Sets the Delivery properties of the messageThe third message ran an orchestration which returned the response.
Show UDDI searching on the Provider “Microsoft.Practices.ESB“, Service is “OrderFileServicev3“
All the key features are exposed as web services.Itinerary:accept external messages and submits them for processingResolver: Look up end points and resolve themBizTalk: exposes information about BizTalk hosts, orchestration, applications, and status.
Exception Management:Go to TestData Folder and drop “Request_EAIProcessHandler.xml” to “RequestPort” folderCheck the PostDecline and RepairSubmit folderException Explanation:The EAIProcess orchestration determines there is an exception and constructs a Fault message using ESB Exception classes. The orch then publishes the Fault message to the BizTalk Message Box through a direct-bound port, and the orchestration endsThere is a custom fault handler orchestration EAIProcessHandler, which subscribes to a FaultCode of 1000 and processes it.3) Edit fault in Portal and resubmit with a “Unit Price”4) The PostApproval folder will have the approved RequestRegistry (UDDI):Click Registry Tab, Global.ESB dropdownPublish “EAIProcessHandler.RepairSubmit” ServiceCheck in UDDI Services Tab and search “EAIProcessHandler.RepairSubmit”Drill down to the Access Point.My Settings: Enable the applications by default they were off.