Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Effective Application Development with WebSphere Message Broker


Published on

Published in: Technology

Effective Application Development with WebSphere Message Broker

  1. 1. Ant Application DevelopmentWebSphere Message Broker © 2012 IBM Corporation
  2. 2. Effective Application Development ▪ What should you consider when building connectivity solutions? ▪ What technology is provided in Message Broker to help you? ▪ This session aims to point you in the right direction! ▪ Ant’s 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 Services o Patterns o Mobile o Pattern authoring o Message Broker API ▪ This session covers many new features such as service creation2 © 2012 IBM Corporation
  3. 3. Effective Application Development Introduction © 2012 IBM Corporation
  4. 4. Tools of the Trade!4 © 2012 IBM Corporation
  5. 5. Create Your Connectivity Solution 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 statistics5 © 2012 IBM Corporation
  6. 6. Transformation Options▪ Message Broker has 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 © 2012 IBM Corporation
  7. 7. Message Modelling Models are needed for parsing, validation and transformation – Models avoid the need to write custom code to parse messages! Graphical mapper requires models to display the message structure – ESQL editor provides in line validation of code that navigates message trees7 © 2012 IBM Corporation
  8. 8. Message ModellingDFDL and XML Schemas 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 – Message Broker input nodes now 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 runtime8 © 2012 IBM Corporation
  9. 9. Design for Performance There are several areas that incur a processing cost in Message Broker – Parsing and serialization of messages as they enter and exit Message Broker – 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!9 © 2012 IBM Corporation
  10. 10. Design for Administration ▪ Message Broker Explorer has a wealth of monitoring tools! ▪ Statistics monitor resource usage across execution groups ▪ Range of options to update and visualise the resource statistics10 © 2012 IBM Corporation
  11. 11. Design for Administration ▪ Monitoring also provided on individual message flows ▪ Quick and easy way to identify hot spots in your solutions!11 © 2012 IBM Corporation
  12. 12. Design for Administration ▪ 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)12 © 2012 IBM Corporation
  13. 13. Effective Application Development Connecting with Nodes © 2012 IBM Corporation
  14. 14. Connecting with Nodes ▪ 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 node exist in Message Broker ▪ Input, output, get and request nodes that manage end points ▪ Asynchronous variations also exist for more efficient processing ▪ The JavaCompute node dramatically reduced the need to write custom nodes:14 © 2012 IBM Corporation
  15. 15. Effective Application Development Subflows © 2012 IBM Corporation
  16. 16. Subflows ▪ 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 Message Broker 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 consumers16 © 2012 IBM Corporation
  17. 17. Effective Application Development Applications and Libraries © 2012 IBM Corporation
  18. 18. Applications and Libraries New in V8 ▪ 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 group18 © 2012 IBM Corporation
  19. 19. Effective Application Development Services © 2012 IBM Corporation
  20. 20. Services ▪ Services are applications with a well defined interface (contract) ▪ The service interface is expressed with a WSDL and a port type ▪ Service creation includes tooling to build the interface and structure ▪ Each operation is implemented as a (deployable) subflow ▪ Service descriptor (XML) ties the interface with the service implementation ▪ Services are deployed and managed just like regular applications ▪ Supporting resources are deployed with the service (maps, ESQL, schemas)20 © 2012 IBM Corporation
  21. 21. Effective Application Development Patterns © 2012 IBM Corporation
  22. 22. The Challenge From: MQ File WSDL To:22 © 2012 IBM Corporation
  23. 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 broker functionality23 © 2012 IBM Corporation
  24. 24. Built-In Patterns Message Broker 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 release24 © 2012 IBM Corporation
  25. 25. Effective Application Development Mobile © 2012 IBM Corporation
  26. 26. Mobile Worklight integration makes developing mobile services simple! – Four new patterns makes mobile service integration quick and easy – Toolkit support to mobile enable Message Broker services – Pattern source included for flexible customization to many other tools Message Broker mobile patterns – Mobile enablement for Microsoft .NET applications – Create flexible mobile services on top of Message Broker – Resource management including security and caching – Outbound push notifications for asynchronous data delivery26 © 2012 IBM Corporation
  27. 27. Mobile Enablement for Microsoft .NET Applications Creates a mobile-ready service around a Microsoft .NET application – Generates a web service implementation which is deployed to Message Broker – Builds a Worklight integration adapter and a sample mobile application – Inbound data from the mobile application is sent to Worklight as JSON/HTTP – The adapter converts the JSON data into/from SOAP/HTTP for the .NET web service27 © 2012 IBM Corporation
  28. 28. Mobiles Services Creates a mobile-ready interface around a Message Broker service – Right click option on a Message Broker service to mobile service enable it! – Builds an adapter to integrate Worklight and Message Broker services – Inbound data from the mobile application is sent to Worklight as JSON/HTTP Makes it very simple to mobile enable a Message Broker service! – The adapter passes the inbound request straight through to the service – Pattern adds an HTTP/JSON message flow (binding) to the service project28 © 2012 IBM Corporation
  29. 29. Asynchronous Push Notifications Creates a push notification adapter from a WebSphere MQ queue – Generates a web service implementation which is deployed to Message Broker – Users receive notifications when the mobile application is not active – Efficiency gain as application does not need to issue constant queries – Saves battery life and also reduces network bandwidth (communication fees) Push notifications are applicable across many industry verticals – Notifications are not always appropriate and do have disadvantages29 © 2012 IBM Corporation
  30. 30. Worklight Resource Handler Resource oriented architecture is a well known implementation pattern – Provides a common set of functions (CRUD – Create Read Update and Delete) – A Message Broker service is generated with subflows for each operation – The service integrates security authorization and authentication (LDAP) – Operations optionally integrate with the Message Broker Global Cache (WXS)30 © 2012 IBM Corporation
  31. 31. Effective Application Development Pattern Authoring © 2012 IBM Corporation
  32. 32. 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 Message Broker We recommend you start with a working solution – One or more Message Broker 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 activity32 © 2012 IBM Corporation
  33. 33. Create Your Working Solution No change at all - design your Message Broker solution 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!33 © 2012 IBM Corporation
  34. 34. Design Your Pattern 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 required34 © 2012 IBM Corporation
  35. 35. Pattern Refinement Pattern authoring in Message Broker 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 In Message Broker 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 projects35 © 2012 IBM Corporation
  36. 36. Packaging a Pattern36 © 2012 IBM Corporation
  37. 37. Effective Application DevelopmentFrom small to large! User-defined nodes Opaque node implementation hides intellectual property (UDNs) 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 Services Services provide interface (contract) and implementation Promotes encapsulation, isolation and re-use of solutions Patterns Re-use working solutions quickly and easily Creates production ready connectivity solutions Builds on all of the above technologies!37 © 2012 IBM Corporation
  38. 38. Message Broker APIMigration, Mash-ups, On-demand Applications… © 2012 IBM Corporation
  39. 39. Message Broker Flow API The Message Broker Flow 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 Message Broker Flow 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 projects39 © 2012 IBM Corporation
  40. 40. Effective Application Development Debug and Test © 2012 IBM Corporation
  41. 41. Debugging Applications Message Broker has excellent real time debugging facilities built-in:41 © 2012 IBM Corporation
  42. 42. Unit Test Client42 © 2012 IBM Corporation
  43. 43. Effective Application DevelopmentSummary  Use the features of Message Broker 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 in Message Broker – we really do listen43 © 2012 IBM Corporation