49
Please Note IBMs statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBMs 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 users 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.

1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Embed Size (px)

DESCRIPTION

Presentation from IBM Impact 2014. What are the best practices for IBM Integration Bus development? How do you design integrations that conform to external and internal standards? Learn how to use the products's built-in capabilities to apply common usage patterns and develop, refine and share your own patterns that solve your company's integration requirements. This session will also introduce the application development enhancements in the latest release of IBM Integration Bus that allow you to implement solutions more quickly than ever.

Citation preview

Page 1: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

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.

Page 2: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

2

Effective Application Development

▪ What should you consider when building connectivity solutions? ▪ What technology is provided to help you? ▪ This session aims to point you in the right direction!

▪ My top tips will be highlighted as we move along!

▪ We will consider development from several design perspectives: o User-defined nodes o Subflows o Deployable subflows o Libraries o Applications o Patterns o Pattern authoring o Integration API

▪ I’ll focus on WMB V8 but will point out some IIB V9 improvements too!

Page 3: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Effective Application Development Introduction

Page 4: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Tools of the Trade!

4

Page 5: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Create Your Connectivity Solution

5

"  Built-in nodes encapsulate transports, technologies and applications •  Our intent is always to make the common tasks easy, and the rest possible! •  Use the built-in nodes to reduce the amount of custom code required •  This makes best use of the built-in facilities like activity trace and resource statistics

Page 6: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

▪ WMB and Integration Bus have several transformation options: ▪ Mapping ▪ XSLT ▪ ESQL ▪  Java ▪ PHP ▪  .NET

▪ Reflects the importance of transformation in connectivity solutions ▪ User-defined nodes supported for Java and C/C++

▪ Every transformation option has strengths and weaknesses! •  Performance and scalability •  Backend integration •  Skill sets and learning curve •  Developer usability •  Portability and maintenance

"  Use a transformation technology appropriate to the problem at hand!

6

Transformation Options

Page 7: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Message Modelling

"  Models are needed for parsing, validation and transformation •  Models avoid the need to write custom code to parse messages!

7

§ Graphical mapper requires models to display the message structure –  ESQL editor provides in line validation of code that navigates message trees

Page 8: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

§ XML documents and messages are modelled using XML schemas – XSDs and WSDLs are deployed directly to the runtime – no import required!

§ Non XML data (both text and binary) is defined using DFDL schemas – Data Format Description Language standardised through the Open Grid Forum – DFDL schemas replace message set projects and the MRM message domain –  Input nodes support DFDL alongside XMLNSC, JSON, MRM etc

§ New model based tooling to design and test DFDL schema models – Test parsing, test data generation and parse-by-example all built into editor! – As with XSDs, DFDL schemas are also deployed directly to the runtime

Message Modelling DFDL and XML Schemas

8

Page 9: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Design for Performance

9

"  There are several areas that incur a processing cost •  Parsing and serialization of messages as they enter and exit the flow •  Business logic such as transformations executed during message processing •  Transformation cost includes general complexity, tree navigation and tree copying •  External resources such as interactions with databases and queue managers

"  Message flow design is critical to achieve high performance and scalability

•  For example using global units of work to achieve transactionality across a flow

"  Performance is a large (and important) topic in its own right •  There is a wealth of information and guidance available online!

Page 10: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

10

Design for Administration ▪ Integration Explorer has a wealth of monitoring tools!

▪ Statistics monitor resource usage across execution groups ▪ Range of options to update and visualise the resource statistics ▪ Activity Logging to focus on resource usage

Page 11: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

11

Design for Administration

▪ Monitoring also provided on individual message flows ▪ Quick and easy way to identify hot spots in your solutions!

Page 12: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

12

Design for Administration ▪ Use Applications and Libraries for easier management

▪ Use configurable services to externalize deployment time properties ▪ Allows deployment information to be configured by a system administrator ▪ For example, credentials for the database nodes and FTP server and port ▪ Ideal for moving solutions through staging environments (test to production)

Page 13: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

"   DBMS represents system of record for key business entities •  Customers, accounts, partners, products… all stored in databases •  Integration Bus tools discover and represent these key data •  Integration services extends access to end-user applications

"   New integration tools discover key database assets 1.  Connect to DBMS (e.g. Oracle, DB2…) 2.  Discover source artefacts (tables, views, etc.) 3.  Map CRUD operations to service interface 4.  Save in canonical WSDL document

–  Custom bindings for SQL access 5.  Re-use database WSDL in multiple scenarios

"   Many uses for database service definition •  WSDL contains both logical and physical database information •  Drag and drop WSDL to automatically create SQL access methods •  Create new integration service to exploit customized database access

–  End-user application consumes as regular (e.g.) web service

"   Customize integration services with data analysis •  Tools for solving the problem of XML document understanding

–  XML message formats can be structurally diverse –  Often useful to semantically interpret related elements, e.g. healthcare CDA exchange format

•  New Data Analysis Perspective provides a collection of useful data views –  Model data based on input element XML; understand and visualise related elements –  Generate resources (subflows, maps) that allow transformation between modelled elements

13

Database Service Discovery and Data Analysis Products Partners Customers Accounts

Page 14: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

14

"   Service definitions allow you to make best use of available resources •  Facilitates sharing of service information between users and systems •  Allows users to understand interfaces (e.g. CustomerAddress.Update operation) •  Provides a connector with which to exchange technical configuration (e.g. hostname) •  Provides attachment points for associated policies (e.g. authorization)

"   New framework enables discovery, cataloguing and re-use of services •  Discovery connectors translate the service provider description to a common model •  Interrogate IT systems for definition of technical assets – objects, functions and interaction points •  User selects and refines definition of technical assets •  Service definitions created and associated with technical assets •  Discovered service definitions stored in embedded registry •  Use catalogued services to configure integration solutions

"   Initial implementation discovers and catalogs MQ service definitions 1.  Discover queues from referenced queue manager endpoint 2.  IB develops MQ service definition and stores in registry 3.  Use service definitions to configure MQ nodes

"   New and existing nodes will be updated over time •  Completely aligned with runtime connector framework

–  Simple protocol points appropriate for style of interaction –  Allows for simple development of custom connectors

MQ Service Discovery

Page 15: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Effective Application Development Connecting with Nodes

Page 16: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

▪ Nodes represent both logical end points and processing functions ▪ User-defined nodes can be written in Java, C/C++ and also as subflows ▪ Where possible use the built-in nodes - log a requirement if something is missing!

▪ Several broad categories of nodes exist in Integration Bus ▪ Input, output, get and request nodes that manage end points ▪ Asynchronous variations also exist for more efficient processing

▪ The Java and .NET Compute nodes dramatically reduced the need to write custom nodes:

16

Connecting with Nodes

Page 17: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Effective Application Development Subflows

Page 18: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

▪ Subflows are simply message flows that are invoked from another flow ▪ Input and output nodes in the subflow become terminals in the main flow ▪ Use subflows to break up large problems into smaller more manageable chunks

▪ Subflows are directly deployable to the runtime ▪ Shared subflows deployed just once per execution group (or application) ▪ No need to redeploy message flows after changes to shared routines are made ▪ Redeployment of a subflow is automatically picked up by any consumers

18

Subflows

Page 19: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Effective Application Development Applications and Libraries

Page 20: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

20

Applications, Libraries and Services

▪ Applications package end-to-end connectivity solutions ▪ The concept of an application is shared between the toolkit and runtime ▪ Applications are deployed and managed as a single unit of isolation

▪ Libraries package resources for reuse (flows, scripts, models) ▪ Resources in an application are not visible to anything else

▪ Use applications to manage your solutions inside an execution group ▪ A Service is an Application with a well defined interface (WSDL)

Page 21: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Effective Application Development Patterns

Page 22: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

22

The Challenge

From: MQ

File

WSDL

To:

Page 23: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

23

Patterns for Simplified Development

§  Creates top-down, parameterized connectivity solutions

§  Reduces common problems in flow development

§  Establishes best practices for healthcare integration

§  Reduces time-to-value for solution development

§  Patterns are easily extended with regular IIB functionality

Page 24: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Pattern Generation

24

"  Pattern generation creates the production ready projects •  Generated projects reflect the configuration choices of the pattern user •  Configuration is saved so that the pattern can be re-generated if required

Page 25: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Built-In Patterns

"  Integration Bus provides a core set of built-in patterns "  These implement a variety of common scenarios

•  Web service front end to a MQ based application •  Processing data stored in a file and routing to one or more queues •  Adding a proxy in front of a web service provider •  Processing data from an SAP system and routing to MQ •  Shredding messages and routing to one or more queues

"  Patterns are selected based on client feedback and field experience "  This core set of patterns continues to grow with each release

25

Page 26: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Effective Application Development Pattern Authoring

Page 27: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

27

Pattern Authoring

"  Patterns becomes even more compelling when you can create your own!

•  Every organization has their own repeating connectivity patterns! •  Pattern authoring is the name we give to this technology in WMB and Integration Bus

"  We recommend you start with a working solution •  One or more projects

"  Pattern authoring is a design activity •  It may be long lived •  It is often not sequential

"  Using patterns is a top-down activity driven by a requirement, but: •  Authoring a working solution is (typically) a bottom-up activity •  So pattern authoring bridges these two different approaches

"  Patterns have their own development cycle •  Pattern Authoring editor supports this design activity

Page 28: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Create Your Working Solution

28

"  No change at all - design your solutions as you do today •  Pattern authoring does not change the tools you use to create solutions •  The key to a good pattern is to create a good working solution!

Page 29: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Design Your Pattern

29

"  Straightforward to create patterns using the Pattern Authoring editor! •  Design the user interface which is presented to your pattern users •  Easy to add branding - style sheets, images and other files as required

Page 30: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Pattern Refinement

"  Pattern authoring in supports property changes •  Node, user-defined properties (UDPs) and promoted node properties

"  Property variability is the most common type of variability that a pattern might need to express - there are many others:

•  Generate application text files such as ESQL scripts •  Make structural changes to Message Flows •  Create administration files such as MQSC scripts

"  It is impossible to try and predict all the possible extensions that a pattern author might wish to implement "  We provide two ways to extend pattern authoring

•  Java code that is invoked when pattern instances are generated •  PHP templates that generate text files in pattern instance projects

30

Page 31: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Packaging a Pattern

31

Page 32: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Effective Application Development Pattern Communities

Page 33: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Pattern Communities

"  Pattern authoring creates patterns whose value multiplies as they are shared and used by a community of developers "  Public and private communities are equally interesting! "  A community needs to offer more than just a repository of assets!

•  Space for content such as patterns and subflow nodes •  Forums to host discussions and threaded conversations •  Categorisation is important as the community grows! (taxonomies) •  Essential administrative functions such as user management •  News articles and broadcasts keep the site fresh

"  There are literally dozens of content management systems available "  On the commercial side we have tried Lotus Connections and

Rational Asset Manager "  Open source projects such as Drupal and Joomla are compelling!

33

Page 34: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Creating a Community Space

34

Page 35: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

35

Effective Application Development From small to large! User-defined nodes (UDNs)

Opaque node implementation hides intellectual property Extend the built-in nodes with your own business logic Excellent potential re-use across many applications

Subflows A piece of reusable logic implemented as a subflow Copy-and-pasted into the main flow by the BAR compiler

Deployable subflows Separately deployed from the main flows that invoke them

Libraries Packaging mechanism to facilitate reuse of many resources Shared understanding between the toolkit and runtime

Applications Connectivity solutions which are managed as a whole Typically combines one or more libraries together

Patterns Re-use working solutions quickly and easily Creates production ready connectivity solutions Builds on all of the above technologies!

Page 36: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Integration API Migration, Mash-ups, On-demand Applications…

Page 37: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

37

The Integration API

"  The Integration API is our Java application development API •  Packaged along with the administration API in ConfigManagerProxy.jar •  Provides a complete Java API to manipulate message flows (and subflows)

"  The Integration API can be used in standalone applications •  Wide variety of applications are now possible such as business data mashups •  Easy to implement mass creation of message flows during migration projects

Page 38: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Bringing It All Together!

Page 39: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Microsoft .NET Service Enablement

39

§ How quickly can you build a web service using a .NET application? § Creating a service where one doesn’t currently exist is service enablement

§  Excellent opportunity to show case new features •  Applications and libraries, deployable WSDL/XSD, Pattern Authoring enhancements

Page 40: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Configuring the Microsoft .NET Assembly

40

§ User-defined editor allows the pattern user to select their .NET assembly – Selection proceeds to a class and the (static) methods available in that class

– Assembly can be developed in any .NET language (for example, VB.NET or C#)

– Return value and parameters are reflected on and displayed by the user-defined editor

Page 41: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Service Pattern Parameters

41

§ Additional pattern parameters default to the .NET class and namespace – These values are used to build a WSDL and XSD to represent the service interface

– Pattern user can (optionally) specify the application domain where their code is run

– Code will run in the default application domain for the node if this parameter is left blank

– Remaining pattern parameters are common to all the built-in patterns

Page 42: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Projects Generated by the Pattern

42

§  The pattern generates an application and a library –  Application contains the mechanics of the pattern instance

–  Library contains subflows for user customizations

–  Customizations are never deleted on re-generation!

§  WSDL created to represent the selected .NET methods – One WSDL operation for each .NET (static) method

–  Likewise one message part defined per operation

– WSDL types are defined in a separate XML schema file

– WSDLs and XSD are deployed directly to IIB

Page 43: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Deploying and Testing Pattern Instances

43

Page 44: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Microsoft .NET Data Types

44

CLR Data Type (System.*)

XSD (WSDL) ESQL

Int32 xsd:integer INT

Int64 xsd:long INTEGER

Decimal xsd:decimal DECIMAL

Double xsd:float FLOAT

Byte[] xsd:hexBinary BLOB

String xsd:string CHARACTER

Char xsd:string CHARACTER

Boolean xsd:boolean BOOLEAN

DateTimeOffset xsd:dateTime TIMESTAMP

TimeSpan xsd:time TIME

DateTime xsd:dateTime TIMESTAMP

§ The table shows the mapping from .NET data types to ESQL and XSD §  Value types declared as Nullable<> are also supported (not relevant for class types)

Page 45: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Pattern Design Points

"  Methods must be static, public and visible to be eligible for inclusion •  Intention is to also support .NET instance methods by creating objects

"  No method overloading is currently supported by the pattern •  Choose one method which is sufficient for the service definition

"  One class per service – create a wrapper class for aggregation "  Exceptions thrown by.NET are returned as regular SOAP faults

45

Page 46: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

"   Use the features of WMB & IIB to their full extent! •  Message modelling, transformation options, applications and libraries •  Capabilities link in with activity trace, record edit replay, and more

"   Libraries and subflows make for simpler designs •  Deployable subflows and libraries extend the benefits to the runtime

"   Consider production and performance early on in your design

•  In particular, applications and configurable services •  Your system administrator will thank you for this!

"   Patterns address time-to-value for your solutions •  It takes just a few minutes to create a pattern! •  Why not create a patterns community in your organisation?

"   Tell us what you need – we really do listen "   Developer Edition

•  Free edition of IB for use in evaluation, dev, test and production usage •  Fully functional: all nodes available and no time limitations •  Throughput rate limited to 1TPS per integration flow

46

Effective Application Development Summary

Page 47: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Questions?

Page 48: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

We Value Your Feedback

"   Don’t forget to submit your Impact session and speaker feedback! Your feedback is very important to us – we use it to continually improve the conference.

"   Use the Conference Mobile App or the online Agenda Builder to quickly submit your survey

•  Navigate to “Surveys” to see a view of surveys for sessions you’ve attended

48

Page 49: 1138 Effective application development in IBM Integration Bus (IBM IMPACT 2014)

Thank You