0% found this document useful (0 votes)
130 views55 pages

Net Integration Using Message Broker and Ibm Integration Bus

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views55 pages

Net Integration Using Message Broker and Ibm Integration Bus

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

.

NET Integration using Message Broker


and IBM Integration Bus
Matthew Golby Kirk (IBM) and Adrian Wright (Summa)

Session # 1479 © 2013 IBM Corporation


Please Note
IBM’s statements regarding its plans, directions, and intent are subject to change or
withdrawal without notice at IBM’s sole discretion.
Information regarding potential future products is intended to outline our general
product direction and it should not be relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a commitment,
promise, or legal obligation to deliver any material, code or functionality. Information
about potential future products may not be incorporated into any contract. The
development, release, and timing of any future features or functionality described
for our products remains at our sole discretion.
Performance is based on measurements and projections using standard IBM
benchmarks in a controlled environment. The actual throughput or performance
that any user will experience will vary depending upon many factors, including
considerations such as the amount of multiprogramming in the user’s job stream,
the I/O configuration, the storage configuration, and the workload processed.
Therefore, no assurance can be given that an individual user will achieve results
similar to those stated here.

© 2013 IBM Corporation


IBM Integration This Week: Selected Sessions
Mon 10.30am: Integration and Messaging Trends (Palazzo N) Message Broker V8
Mon 10.30am: Healthcare Integration in WMB (Delfino 4001A) Integration Bus V9
Mon 1.00pm: Meet the Experts (San Polo 3401 Zone C)
Mon 1.00pm: Integration and Business Rules (ODM) (Marcello 4503)
Mon 1.00pm: Introduction to WMB & IB (Palazzo O)
Mon 2.30pm: WMB and WESB: Integration Bus Strategy (Palazzo O)
Mon 2.30pm: Zystems: Customer Experience WMB V8 (Marcello 4401A)
Mon 4.00pm: Mobile and WMB & IB (Palazzo O)
Mon 4.00pm: Customer Feedback roundtable (Zeno 4710)
Mon 4.00pm: Retail: Panel Discussion (Lido 3001A)
Mon 5.15pm: Kroger: Retail Integration with WMB (Lando 4303)
Mon 5.15pm: Services and WMB & IB (Palazzo O)
Tues 10.15am: What’s New in WMB & IB (Palazzo N)
Tues 10.15am: DFDL Introduction (Palazzo O)
Tues 2.30pm: Industry Formats in DFDL (Palazzo O)
Tues 2.30pm: Customer Feedback roundtable (Zeno 4710)
Tues 2.30pm: Healthcare: Documenting an Influenza Outbreak (Murano 3204)
Tues 4.00pm: Meet the Experts (San Polo 3401 Zone D)
Tues 4.00pm: Integrating with BPM (Palazzo O)
Tues 4.00pm – 6.15pm: Lab (Murano 3303)
Tues 5.15pm: Effective Administration in WMB & IB (Palazzo O)
© 2013 IBM Corporation
IBM Integration This Week: Selected Sessions
Message Broker V8
Integration Bus V9
Weds 8.30am: Effective App Dev in WMB & IB (Palazzo O)
Weds 10.15am: .NET Integration (Palazzo O)
Weds 1.00pm: Workload Management and Registry in IB (Delfino 4005)
Weds 1.00pm: WMB & IB Transformation Options (Palazzo P)
Weds 1.00pm: Customer Feedback roundtable (Zeno 4710)
Weds 2.15pm: WMB & IB Record and Replay (Palazzo P)
Weds 3.45pm: WMB & IB Cloud Provisioning Options (Palazzo P)
Weds 3.45pm: Travelport: Customer Experiences (Marcello 4501B)
Weds 3.45pm: WebSphere ESB Best Practices (Lando 4203)
Weds 5.00pm: BMW: SeeBeyond to WMB (Marcello 4403)
Thurs 8.45am: What’s New in WMB & IB (Palazzo E)
Thurs 8.45am – 11.15pm: Lab (Murano 3303)
Thurs 10.15am: Introduction to WMB & IB (Palazzo P)
Thurs 1.00pm: WMB and WESB: Integration Bus Strategy (Palazzo O)
Thurs 1.00pm: DFDL Introduction (Palazzo P)
Thurs 2.15pm: Mobile and WMB & IB (Palazzo N)
Thurs 2.15pm: Workload Management and Registry in IB (Palazzo O)
Thurs 3.45pm: .NET Integration (Palazzo N)

© 2013 IBM Corporation


Agenda for Part 1 Agenda for Part 2

 Why .NET?
 Adrian Wright from Summa
 .NET Overview
– Framework and CLR  Message Broker .NET Case Study
at Autosoft
 Integration with WMB and IIB
– .NET Input node
– .NET Compute node
 Visual Studio Integration
– Plugins
– Debugging
 The Plugin API
– Navigation and Tree access
 Integrating .Net and COM applications
 ESQL Calling .NET
 Hosting the CLR
 Summary

5 © 2013 IBM Corporation


Why .NET?

 Many clients have a large investment in Microsoft, .NET and related technologies
– Dynamics for CRM / ERP
– SharePoint for collaboration
– Visual Studio for development
– Custom .NET applications
 .NET is a very popular environment for developers.
– TIOBE Programming Community Index for June 2011. [www.tiobe.com]

Language Access and Transform


Java JavaCompute Node
C C Plugin Node
C++ C Plugin Node
C# .NET Compute Node
PHP PHPCompute Node
VB .NET Compute Node

– IIB now provides transformation capability for all of the top 6 languages
6 © 2013 IBM Corporation
.NET Framework Overview

VB C++/ Many other 3rd


C# F# JScript
.NET CLI party options

Common Language Specification

Visual Studio Tools


ADO ASP Win
DLR WCF LINQ Forms WPF
.NET .NET

Base Class Library


JIT &
Threading
Common Language Runtime NGEN

Garbage Exception Profiling &


Security Loader
Collector Handling Debugging

Operating System
7 © 2013 IBM Corporation
The .NET Common Language Runtime (CLR)

 The CLR provides an environment inside which “managed” code is executed


 Similar to a JVM
 Can be hosted inside another process
 Gives the ability to run managed code
 SQLServer does this to run managed Stored Procedures
 Provides key services to all code running inside it
 Loading, GC, Debugging, Threading, Exception Handling, JIT, etc.

JIT &
Threading
Common Language Runtime NGEN

Garbage Exception Profiling &


Security Loader
Collector Handling Debugging

Operating System
8 © 2013 IBM Corporation
From Source Code to Byte Code

VB C++/
C# F# JScript 40+ Others...
.NET CLI
Common Language Specification

 All .NET code is compiled from the source language into Managed “CIL” (MSIL) code

 Common Type System (CTS) and Common Language Spec (CLS)


F#
C#
 The CIL code lives in a .DLL or .EXE and is called an Assembly
– The Assembly is loaded into the CLR to be executed VB
– Code is “JITted” before it is executed
• Can be JITted before hand with NGEN

CIL
 At runtime the CLR does not care what the source language was

9 © 2013 IBM Corporation


Integrating .NET with WMB and Integration Bus

 Extremely tight language agnostic integration


– Integrates any CLR language (V4 and V4.5) at a very low level
 Create your own .NET Input nodes using Visual Studio
– Start flows from .NET data sources (MSMQ etc)
– Use an event or polling style
 Create your own .NET Compute nodes using Visual Studio
– Integrate new or existing .NET applications directly with your Message Flow
• Write nodes in C#, VB, F#, C++/CLI, and many more
 Tightly integrated with Visual Studio
– Integration toolkit can launch Visual Studio
– Visual studio plugin to simplify node development
 Call .NET code directly from ESQL
– Jump straight from ESQL into .NET code
 Integrate with existing COM applications

10 © 2013 IBM Corporation


Integrating .NET with WMB and Integration Bus 2

 Mobile Enable .NET Assemblies


– Expose .NET Assemblies as Mobile Services using a simple pattern

 Microsoft Dynamics Patterns


– Patterns to integrate SAP, File, MQ and HTTP to Microsoft Dynamics CRM

 MSMQ Sample Provided


– MSMQ -> MQ
– MQ -> MSMQ

 User Properties on .NET Input and Compute nodes


– Allows easy configuration

 .NET Nodes can be “templated” with customised icon


– Allows distribution of the node to other teams

 Deploy .NET Assemblies in the BAR file

11 © 2013 IBM Corporation


Managing .NET Integration

 Fine grained operation control


– Configurable Service, Resource Stats

 The CLR is hosted inside each Execution Group


– One CLR per E.G.

 Each CLR is split into different App Domains


– Provided as unit of scoping
– Choose which .NET App Domain your code runs in

12 © 2013 IBM Corporation


Running .NET in your Enterprise

 Microsoft .NET is supported on the Windows platform

 .NET functionality is available in all editions of Integration Bus (Express, Standard,


Advanced, etc)

 Existing connectivity options give flexible deployment options


– You can position .NET in the “middle” as part of your core infrastructure
– You can position .NET at the “edge” and connect to your main infrastructure
– Use any IIB transport option to make the links
• JMS, WebService, MQ etc

13 © 2013 IBM Corporation


.NET Input Node – Start it up!

 First Class Input node


– Very straightforward to configure
 Write your Input node in any CLR compliant language
– Build transformations in: C#, VB, F#, C++/CLI, Jscript, etc…
 Allows you to start a flow directly from .NET code
– Two Visual Studio code “templates” to get you started
• Polling Style
• Event Style
 Simply return a byte array to IIB for auto hand off to the built in parsers
– DFDL, XMLNSC, JSON, etc
– Or choose to construct the tree yourself
 Dynamic Output Terminals
– As many as you need
 MSMQ Input sample provided
– MSMQ -> MQ and vice versa

14 © 2013 IBM Corporation


.NET Compute Node - What do you want to integrate today?

 First Class transformation node


– similar to JavaCompute
 Write your transformations in any CLR compliant language
– Build transformations in: C#, VB, F#, C++/CLI, Jscript, etc…
 Allows you to integrate your .NET code directly with your Flow
– Three code “templates” to get you started
• Filter Message
• Modify Message
• Create Message
 Implement a single method “Evaluate”
– Stub is auto implemented in Visual Studio
 Provides full access to the Message Trees
– Message,
– LocalEnvironment,
– Environment,
– ExceptionList
 Dynamic Output Terminals
– As many as you need
15 © 2013 IBM Corporation
.NET Compute Node Configuration
 Browse to choose Assembly
 Drag / Drop an assembly on the node to configure

16 © 2013 IBM Corporation


Launch Visual Studio directly from the .NET Compute node
 Simply double-click on the node
- Or right click “Open Microsoft Visual Studio”

© 2013 IBM Corporation


Visual Studio 2010 and 2012 Integration

 Visual Studio is the “toolkit” when developing .NET assemblies


– Visual Studio is the “industry standard” for .NET development
– Use any version – “Express” through to “Ultimate”

 Tight integration with the WMB and IIB runtime


– “Double Click” on a .NETCompute Node to launch Visual Studio
– Node can be configured with a “Solution” to launch automatically

 Plugin for Visual Studio to generate skeleton .NET Input code


– Specific to the language choice and the node type (Event driven or Polling driven)

 Plugin for Visual Studio to generate skeleton .NET Compute code


– Specific to the language choice and the node type (Filter / Modify / Create)

 Use Visual Studio debugger to debug your .NET assemblies.


– “Attach” the debugger to the runtime “dataflowengine.exe” process for the E.G.
• See all the message trees in their entirety.

18 © 2013 IBM Corporation


Speed up development with the Visual Studio Node Templates

19 © 2013 IBM Corporation


Auto generated node templates for Visual Studio

20 © 2013 IBM Corporation


The Visual Studio Object Browser

 Use the Object browser to view the.NET APIs provided

21 © 2013 IBM Corporation


22 © 2013 IBM Corporation
Visual Studio Content Assist for the Plugin API

23 © 2013 IBM Corporation


Debug your .NET code with the Visual Studio Debugger

24 © 2013 IBM Corporation


Programming with the .NET APIs

 The API is designed to look and feel like a standard .NET API
– Follows the Microsoft “Framework Design Guidelines”
– For example, uses properties where appropriate, follows naming conventions etc

 Is designed to be usable by as many .NET languages as possible


– Plugin assembly is marked as ‘CLSCompliant’.
– CLS guidelines followed
– Where facilities that are not CLS compliant are used, alternatives are offered
• E.g. Alternatives for explicit datatype casting

 Scalar values and Nullable value types supported throughout


– All IIB types are “Nullable”
– Conversions to/from Nullable equivalents available

 Simple but Powerful


– Utility methods provided for common tasks, such as throwing user exceptions,
– creating XMLDecl’s etc [<?xml version="1.0" encoding="UTF-8" standalone="yes"?>]
NBParsers.XMLNSC.CreateXmlDeclaration( element, "1.0", "utf-8", "yes" );
25 © 2013 IBM Corporation
Integration breadth: Call COM and custom .NET applications

 Allows easy integration with COM and .NET applications


– Access existing COM and .NET applications that run in a .NET 4 or 4.5 environment
 .NET makes it easy to call other .NET applications and components

//Call WCF Service with details from Message


private void UpdateService(NBElement customer)
{
MyWcfServiceClient client = new MyWcfServiceClient();

// Use the 'client' variable to call operations on the service.


client.SetData((string)customer[“Name"]);

// Always close the client.


client.Close();
}

26 © 2013 IBM Corporation


Handle Exceptions with Ease

 WMB and IIB exceptions turned into NBExceptions which can be caught in .NET code
– NBException
• NBRecoverableException
NBUserException
NBXxxException

 NBExceptions are turned into WMB or IIB exceptions if thrown from user .NET code
– You can “leave” your .NET code with an exception if necessary.
– You can catch the exception by using in a Try/Catch node or wiring a Catch terminal.
– NBRecoverable exceptions can be caught in an ESQL handler, with a specified
SQLCode and SQLState

 .NET exceptions are turned into WMB or IIB exceptions if thrown from user .NET code
– You can catch the exception by using in a Try/Catch node or wiring a Catch terminal

27 © 2013 IBM Corporation


“Hot Swap” Your .NET Code

1: Build your assembly in Visual Studio


2: .NET Compute Node points to the assembly on disk
– Deployed as part of a flow
3: Test flow “Rebuild”
4: Rebuild in Visual Studio after changes
5: Re-test flow
– No re-deploy / restart needed

28 © 2013 IBM Corporation


Example: Creating a new account in Dynamics CRM

Sending a request in

© 2013 IBM Corporation


Example: Creating a new account in Dynamics CRM

Getting a response back

© 2013 IBM Corporation


Part One Summary

 Very tight .NET Integration


– CLR (v4 or v4.5) hosted inside the Execution Group
– .NET code executed natively
– Use any CLR language to create your nodes
– Integrated App Domain support

 Large API to provide access to integration facilities


– Navigation
– Element creation
– Exception handling
• From .NET exception to ExceptionList
• From ExceptionList to .NET exception
• Catch exceptions in ESQL

 Strong Visual Studio Integration


– Launch Visual Studio from the Integration Toolkit
– Plugins to provide fast node creation
– Content assist for easy access to the API
– Debug your nodes using Visual Studio
31 © 2013 IBM Corporation
Autosoft Message Broker .NET Case Study

Adrian Wright
Senior Technical Consultant, Summa
Where are we going?

• Who is Autosoft?
• Who is Summa?
• Why use Message Broker in a .NET shop?
• How have we used Broker in a .NET environment?
• How have we used .NET compute nodes?
• What have we learned?

33
• Founded in 1983, located in West Middlesex, PA
• Dealer Management System provider
• Full range of solutions for thousands of auto dealerships
• Offers integrations with many of the major OEM’s

34
Background

• Legacy MS Shop
• Migrating from client/server platform to .NET SaaS
model
• Flat-file approach to integration running on AxWay
• Need to support business partners
– 23 automobile manufacturers and payment gateways
– Need to support STAR “standards”
– Need to support custom APIs
• Need a solution that’s reliable, could handle high-
volume, and required response times

35
About Summa

• Consulting company specializing in high-impact solutions


• IBM Premier Business Partner
• Microsoft Partner
• Experience in large cross-section of industries, including:
– Healthcare, Financial, Telecommunications, Retail,
Manufacturing and Information Technology
• Core competencies focused on the following areas:
– Application Modernization, BRMS/BPM, Integration,
Enterprise Computing, and User Experience

36
37
Why Use Message Broker in a .NET Shop?

• Support for .NET languages and tools


• Performance
• Customer Support and Responsiveness
• Reliability
• Easy to manage and deploy
• Easy to install

38
What options did we consider?

• Initial thought was to leverage standard .NET integration


options
– OSS – NServiceBus, MassTransit
– Primary option was Microsoft BizTalk

39
Product Selection

• Demonstrations of both Message Broker / MQ and


BizTalk
• Identification of critical factors for Autosoft
• Assessment of both products with respect to those
factors
• Autosoft chose Message Broker
– Multiple editions of Broker allowed us to right-size
– Broker stacked up better for the key
factors that Autosoft prioritized

40
Broker in a .NET environment

• Ease of interaction with custom .NET client applications


• Shared logic and message objects via .NET DLL’s
• Integration with Autosoft existing development tools and
infrastructure
• Automated end-end testing

41
Broker in a .NET environment
• Clients contact MB by WCF transport-independent API
• WCF has native SOAP Web Service capabilities
• IBM’s WCF Channel for MQ provides read/write access
to MQ using the same API

42
Broker in a .NET environment

• Integration with Autosoft’s existing tools/infrastructure

43
Broker in a .NET environment

• Single repository for canonical message definitions


• TeamCity, NuGet, and Broker WSDL import
keep everything in sync
.NET applications

WSDL / XSD Build Process


Broker .NET Nodes
Canonicals Generate .NET DLL’s

Automated Test
Framework

Broker Message
Sets
44
Broker in a .NET environment

• Automated testing using NUnit and TeamCity


– Invoke message flows via WCF SOAP Client and
WCF IBM Channel for MQ
– Verify synchronous response
– Verify MQ depth count via IBM MQ API for .NET
– Verify logged message counts

45
How have we used the .NET nodes?

• 50+ flows in production


• Complex integrations -- all use .NET nodes, between 5
and 15 .NET nodes per flow
• Primary method for building reusable components
• Message Transformation
• 100 unique .NET nodes, use across all flows
• No ESQL, Java, or PHP compute nodes
• Wrap .NET nodes in a User-Defined Node for
parameterized reusable components

46
How have we used .NET Nodes?
• Familiar LINQ API to do outbound message paging
• Split a large message into several smaller ones

47
How have we used .NET nodes?

• SQL Server data access – .NET natively provides


flexible, robust access to SQL Server
– Cross-reference lookups
– Message logging
– Store messages for retry
– Using ADO.NET for data access

48
How have we used .NET nodes?

• Simple transformations in .NET – for complex STAR


messages (300+ elements), rely on XSL Node
• Message enrichment
• Storage of SAML token in memory across flows
• “NotOnSundayOrMondayNode”
• Wacky requirement to support invalid Unicode
characters

49
What have we learned?

• Strong alignment of Autosoft’s existing skill sets and


tools
• IBM Support has been great
• .NET nodes can do a lot – no ESQL needed
• Development velocity is strong – Broker development
often outpaces other development teams
• Have met aggressive development timelines with key
integration partners

50
Questions?

© 2013 IBM Corporation


GrazieItalian

Thai

Traditional Chinese

Russian Obrigado Merci


Brazilian Portuguese French

Gracias
Spanish Arabic

Danke
German

Simplified Chinese

Japanese

52 © 2013 IBM Corporation


We love your Feedback!

Don’t forget to submit your Impact session and speaker feedback!


 Your feedback is very important to us – we use it to improve next year’s conference
 Go to the Impact 2013 SmartSite (http://impactsmartsite/com):
–Use the session ID number to locate the session
–Click the “Take Survey” link
–Submit your feedback

© 2013 IBM Corporation


© 2013 IBM Corporation
Legal Disclaimer

• © IBM Corporation 2013. All Rights Reserved.


• The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained
in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are
subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing
contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and
conditions of the applicable license agreement governing the use of IBM software.
• References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or
capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to
future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by
you will result in any specific sales, revenue growth or other results.
• Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will
experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage
configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
• All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs
and performance characteristics may vary by customer.
• IBM, the IBM logo, and WebSphere are trademarks of International Business Machines Corporation in the United States, other countries, or both.
• Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
• Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.
• UNIX is a registered trademark of The Open Group in the United States and other countries.
• Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of
others.

© 2013 IBM Corporation

You might also like