IBM MQ Light Service for Bluemix

49
© 2014 IBM Corporation IBM MQ Light Service for Bluemix Mark Phillips ([email protected]) @markphillips June 2014

description

 

Transcript of IBM MQ Light Service for Bluemix

Page 1: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

IBM MQ Light Service for BluemixMark Phillips ([email protected]) @markphillips

June 2014

Page 2: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

2

Please NoteIBM’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.

2

Page 3: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Agenda

Introduction to Bluemix

Introduction to MQ Light Service for Bluemix

MQ Light• Messaging API and Graphical tools

MQ Light Service in depth

Demo

3

Page 4: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

The next billion dollar idea starts

with a single developer.

That developer starts with a single line of

code

4

Page 5: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

New App Culture Has New Expectations

requires new delivery tools

Integrated experience across mobile, internet, storefront and

phoneIntegrated

Mobile is focused on most important functions integrated with

other appsMobile

Iterative delivery has become the norm – users want fewer

functions initially with improvement over timeIterative

Impacts ecosystem of employees and partners as much as

customersEcosystem

5

Page 6: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

ELIMINATE DRUDGERY

“It’s not that my developers lack the skills to manage infrastructure, it’s that I don’t want them to. I need them writing code for the business”

OPEN TECHNOLOGIES

ONE SINGLE SOLUTION

EXPERIMENT MORE

PEACE OF MIND

“I am losing talented developers because they don’t have access to the tools they want to use.”

“I am nervous we are spending time and money integrating things that should naturally fit together”

“My average developer has 250 open change requests from the business. That is a lot of business value we need to deliver”

“I am not confident that the platform is secure as I integrate into existing systems”

…what developers want

6

Challenges that we hear…

Page 7: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Translates into an application development environment that…

Brings the best of born-on-the-cloud development without leaving behind enterprise data and services

Combines the flexibility of a platform as a service (PaaS) with existing suites of software as a service (SaaS)

Offers freedom of choice to use any software or open technologies

Scales from a single developer to global teams Enables a massive and open ecosystem built on open standards

7

Page 8: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Delivering a Composable Services development environment

Run Your AppsThe developer can chose any language runtime or bring their own. Just upload your code and go.

DevOpsDevelopment, monitoring, deployment and logging tools allow the developer to run the entire application

APIs and ServicesA catalog of open source, IBM and third party APIs services allow a developer to stitch together an application in minutes.

Cloud IntegrationBuild hybrid environments. Connect to on-premises systems of record plus other public and private clouds. Expose your own APIs to your developers.

Built on IBM SoftLayerRuns automatically on top of IBM’s leading infrastructure as a service. No need to worry about provisioning or managing infrastructure.

8

IBM Bluemix

Page 9: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

TOTAL CONTRIBUTORS

LINES OF CODE

PULL REQUESTS PUBLIC REPOSITORIES

1,118Average per month2013 average: 13312mo average: 98

Lifetime average: 58

646k

1025+ 133+

Continuing our history of embracing and extending Open Source

9

Embracing Cloud Foundry

Page 10: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Agenda

Introduction to Bluemix

Introduction to MQ Light Service

MQ Light• Messaging API and Graphical tools

MQ Light Service in depth

Demo

10

Page 11: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

IBM Messaging portfolio

Enable developers to build more scalable, responsive applicationsFocus on application developer use cases, breadth of language support, no administration, ease-of-deployment, lightweight & powerful API, as software or a cloud service

Deliver Messaging Backbone for EnterpriseFocus on traditional MQ values, rock-solid enterprise-class service, ease-of-operation, breadth of platform coverage, availability, z/OS exploitation

Capture Big Data from Mobile and Internet of ThingsFocus on Internet-scale events, m2m device enablement, security and privacy, feed into real-time analytics, location-based notifications

11

Page 12: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

The journey that got us here…

Previous developer / IT relationship• Driven by centrally controlled common standards• Carefully planned projects delivering core business systems• Focused on re-using existing skills and investments

12

JonIT mgmt

Must use approved IT services

Share, re-use and save!

I need to access some messaging services. I own the apps. Demand for

Infrastructureservices

AndyDeveloper

IainInfrastructure Guy

Page 13: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Evolving developer / IT relationship• Driven by business sponsor demands• Developers download and use the tools to get the job done• Focused on trying new apps and concepts in the market

BethBusiness Sponsor

AndyDeveloper

IainInfrastructure Guy

What handy tools can I grab?

13

Demand for Infrastructureservices

The journey that got us here…

Page 14: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

14

Ruby

Node.js

Python

C

C++

Java

C#

Perl

Go

Clojure

Lua

Erlang Scala

PHP

The journey that got us here…

Page 15: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

What is MQ Light and Application Messaging?

Messaging for application developers to help create responsive applications that scale easily

Trivially easy to get started; no setup, no configuration, no administration

Available as software download or full cloud service in IBM Bluemix

APIs crafted specifically for each language

Tooling that supports app development

Cloud Service

15

Software

Page 16: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Use Cases

16

Worker Offload

Intensive work offloaded and distributed amongst worker processes to be performed asynchronously

Examples : Processing images or videosPerforming text analytics

Event driven

Take one or more actions when something interesting happens

Examples: ● Email logs and update dashboards when

build finishes● Upload videos once finished transcoding

Page 17: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Use Cases

17

Delayed processing

Schedule a task to happen at some point in the future

Examples : ● Generate end of day summary● Run detailed report when app usage

is low

3rd party integration

Connect to 3rd party system and ensure applications remain responsive even when 3rd party is not available or responding fast enough

Examples● Updating existing CRM system● Booking appointment

Page 18: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Introduction to MQ Light Service

18

Page 19: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light Runtime connectivity

19

.php

……

.py

Community support. IBM Priority based on feedback.

Page 20: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light with Java

JMS 1.1 API• Pub/Sub and Queue• Local Transactions only.• Java SE model• Java EE Model including MDBs

20

JMS JMS

Page 21: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light with Node.js

21

MQ Light

MQ Light

Simple, programming Language neutral messaging model

Idiomatic language & framework API Mappings

• Frictionless development

Open wire protocol & Open source client libraries

• Facilitates community drivers for languages & frameworks

MQ Light API

Page 22: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Polyglot Messaging

22

MQ Light

.rb

……

.py

Community support. IBM Priority based on feedback.

JMS

Mapping from JMS to MQ Light enables apps using polyglot model.

Worker offload with workers implemented in different languages.

.php

Page 23: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Agenda

Introduction to Bluemix

Introduction to MQ Light Service

MQ Light• Messaging API and Graphical tools

MQ Light Service in depth

Demo

23

Page 24: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Application messaging deployment options

Developer coding inrange of

languages/frameworks.

WebSphere MQ(Statement of Direction)

MQ Light (Beta)

Deploy seamlessly to MQ Light, MQ or MQ Light Service for Bluemix

Builds application and uses MQ Light messaging and tests in local

developer sandbox

24

MQ Light Service for Bluemix(Beta)

Page 25: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

25

MQ Light API - Runtimes

MQ

Lig

ht A

PI

MQ

Lig

ht A

PI

Open Wire Protocol

MQ Light Service for Bluemix(Beta)

WebSphere MQ(Statement of Direction)

MQ Light (Beta)

app

Page 26: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

26

MQ Light Messaging Model – Send Messages

Applications send messages to a topic. A topic is an address in the topic space

either flat or arranged hierarchically.

1. Send (‘/test/a’, “Hello”);2. Send (‘/test/a’, “World!”);

Topic Address Space

Sender application

Page 27: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

27

MQ Light Messaging Model – Simple Receive

• Applications receive messages by creating a destination with a pattern which matches the topics they are interested in.

• Pattern matching scheme based on WMQ.

1. Send (‘/test/a’, “Hello”);2. Send (‘/test/a’, “World!”);

1. Hello2. World!

Topic Address Space

Sender application

DESTINATIONPattern=/test/a

Page 28: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

28

MQ Light Messaging Model – Pub/Sub

• Multiple destinations can be created which match the same topic• Pub/Sub style.

DESTINATION

1. Send (‘/test/a’, “Hello”);2. Send (‘/test/a’, “World!”);

1. Hello2. World!

1. Hello2. World!

Topic Address Space

Sender application

DESTINATIONPattern=/test/a

Pattern=/test/#

Client 1

Client 2

Page 29: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

29

MQ Light Messaging Model – Persistent destinations

• Destinations persist for a defined “time to live” after receiver detaches.

1. Send (‘/test/a’, “Hello”);2. Send (‘/test/a’, “World!”);

Topic Address Space

Sender application

HelloWorld!

DESTINATIONPattern=/test/a

Disconnected client

Page 30: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

30

MQ Light Messaging Model – Sharing

• Clients attaching to the same topic pattern and share name attach to the same shared destination.

DESTINATION1. Send (‘/test/a’, “Hello”);2. Send (‘/test/a’, “World!”);

1. Hello2. World!

1. Hello

2. World!

SHARING

Topic Address Space

Sender application

DESTINATIONPattern=/test/#

Pattern=/test/#Share=myshare

Client 1

Client 2

Client 3

Page 31: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light Messaging Model - Message Delivery

Currently: – At most once delivery (QoS 0)– At least once delivery (QoS 1)

On the backlog:• Acknowledge & Reject messages• Control over the number of unacknowledged messages

delivered. (Readahead)• require Destination – Results in a error if a destination

does not exist for the message.

31

Page 32: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light Messaging Model – Messages

Messages have a payload which is either Text or Binary.• Content-type is used by clients to transfer JSON

On the backlog:• Messages can have:

– Time-to-live– Delivery delay– Properties

32

Page 33: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

33

MQ Light Messaging Model – Client takeover

1. Send (‘/test/a’, “Hello”);

Hello

Topic Address Space

Sender application

DESTINATIONPattern=/test/#

Client 1

World!

Client 1

2. Send (‘/test/a’, “World!”);

• Applications connect to MQ Light service specify (optional) client ID.• Re-using the same client ID pre-empts the original connection.

• Ideal for worker takeover in the cloud.

Page 34: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light Node.JS API.

Installable from NPM

Promotes a fluent programming style

Easily wrappable into promises.

Focussed on code simplicity.

Client - connect state machine• Assists cloud applications.

34

client.connect() .on('connected', function() { console.log('Have some random cat names. Have them!'); subscribe('/kittens'); }) .on('disconnected', function() { console.log('That's enough for now!'); }) .on('message', function(data) { console.log('Why not call your cat: '+data); });

Page 35: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Developer-centric MQ Light GUI

35

Page 36: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Agenda

Introduction to Bluemix

Introduction to MQ Light Service

MQ Light• Messaging API and Graphical tools

MQ Light Service in depth

Demo

36

Page 37: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light Service (Beta in IBM Bluemix)

Supports MQ Light API & JMS

JMS queues autodefined tominimize administration

Connection details supplied to app by VCAP_SERVICES

Location transparency facilitated by “connectionLookupURI”

– Default URI returns list of endpoints as json document

– JMS connections append “&format=CCDT” to get CCDT

Client Libraries injected into application runtime– Node.JS - Specify dependency on mqlight in package.json– Java JEE – Resource adapter added when JMS is detected by Liberty

buildpack.

37

Page 38: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light Service Node.js Support

Applications can be developed and tested locally by connecting to local server, then seamlessly deployed into Bluemix

– Must be coded to read connection details from VCAP_SERVICES

38

require "mqlight"var opts;if (process.env.VCAP_SERVICES) { var services = JSON.parse(process.env.VCAP_SERVICES); if (services[ 'mqlight' ] != null) { username = services [ 'mqlight' ][0].credentials.username; password = services [ 'mqlight' ][0].credentials.password; connectionLookupURI = services['mqlight'][0].credentials.connectionLookupURI; } opts = { user: username , password: password, service: connectionLookupURI , id:id};} else { opts = { service:'amqp://localhost:5672',id:id};}var client = mqlight.createClient(opts);client.connect(function(err)

Page 39: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

MQ Light JMS Support

Support “Java SE” style messaging.• Either read connection details from VCAP_SERVICES• Or use the connection helper

• Include the WMQ JMS client libraries• Push to bluemix as .jar

Supports Liberty Profile “JEE” style messaging.• Either push a .WAR

– Resource Adapter injected and JNDI namespace populated by Liberty buildpack.

• Or push a packaged liberty server– Supports MDBs

39

MQLightConnectionHelper connHelper = MQLightConnectionHelper

.getMQLightConnectionHelper();

MQConnectionFactory cf = (MQConnectionFactory)connHelper.getJmsConnectionFactory();

Connection conn = cf.createConnection(connHelper.getUsername(), connHelper.getPassword());

Page 40: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Using MDBs with MQ Light in Liberty

40

Java

Server.xml

Page 41: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

JMS to MQ Light Interoperability

MQ Light String ←→ JMS Text Message

MQ Light Binary Message ←→ JMS Bytes message

JMS Topic space appears as MQ light topic address space.

41

Page 42: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Agenda

Introduction to Bluemix

Introduction to MQ Light Service

MQ Light• Messaging API and Graphical tools

MQ Light Service in depth

Demo

42

Page 43: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Demo Scenario

Twitter sentiment analysis application.

Tracks a number of “products”.

43

Live Twitter feedLive Twitter feed

Cumulative interest and sentiment

Cumulative interest and sentiment

Relevant tweetsRelevant tweets

Page 44: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Demo Architecture – Node.JS and Java workers

44

Twitter API

Web UI

Front end node app

Analytics workers

DESTINATION(shared)Analysed tweets

tweets

Page 45: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Demo

MQ Light Download– https://developer.ibm.com/messaging/mq-light/

Sentiment Analysis Sample:– https://github.com/ibm-messaging/mqlight-sentiment-sample

45

Page 46: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Questions?

46

Page 47: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Reference

● MQ Light ● Download page

● https://developer.ibm.com/messaging/mq-light/

● Concepts ● https://developer.ibm.com/messaging/mq-light/mq-light-concepts

Bluemix● Sign up

● https://ace.ng.bluemix.net/

● MQ Light Documentation ● https://www.ng.bluemix.net/docs/#services/MQLight/index.html#mqlight010

● Blog● https://developer.ibm.com/bluemix/blog/

● Support● https://developer.ibm.com/bluemix/support/

47

Page 48: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Thank You

48

Page 49: IBM MQ Light Service for Bluemix

© 2014 IBM Corporation

Legal Disclaimer

• © IBM Corporation 2014. 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.

• If the text contains performance statistics or references to benchmarks, insert the following language; otherwise delete: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.

• If the text includes any customer examples, please confirm we have prior written approval from such customer and insert the following language; otherwise delete: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.

• Please review text for proper trademark attribution of IBM products. At first use, each product name must be the full name and include appropriate trademark symbols (e.g., IBM Lotus® Sametime® Unyte™). Subsequent references can drop “IBM” but should include the proper branding (e.g., Lotus Sametime Gateway, or WebSphere Application Server). Please refer to http://www.ibm.com/legal/copytrade.shtml for guidance on which trademarks require the ® or ™ symbol. Do not use abbreviations for IBM product names in your presentation. All product names must be used as adjectives rather than nouns. Please list all of the trademarks that you use in your presentation as follows; delete any not included in your presentation. IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. Unyte is a trademark of WebDialogs, Inc., in the United States, other countries, or both.

• If you reference Adobe® in the text, please mark the first use and include the following; otherwise delete:Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries.

• If you reference Java™ in the text, please mark the first use and include the following; otherwise delete:Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

• If you reference Microsoft® and/or Windows® in the text, please mark the first use and include the following, as applicable; otherwise delete:Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.

• If you reference Intel® and/or any of the following Intel products in the text, please mark the first use and include those that you use as follows; otherwise delete:Intel, Intel Centrino, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

• If you reference UNIX® in the text, please mark the first use and include the following; otherwise delete:UNIX is a registered trademark of The Open Group in the United States and other countries.

• If you reference Linux® in your presentation, please mark the first use and include the following; otherwise delete: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.

• If the text/graphics include screenshots, no actual IBM employee names may be used (even your own), if your screenshots include fictitious company names (e.g., Renovations, Zeta Bank, Acme) please update and insert the following; otherwise delete: All references to [insert fictitious company name] refer to a fictitious company and are used for illustration purposes only.

49