Upload
matt-leming
View
624
Download
1
Embed Size (px)
Citation preview
MQ Light APIJames Bennett
Product Management
Matthew Leming
MQ Development
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.
1
Digital IT Enterprise ITCloud
On-Prem
Message Hub(Based on Apache Kakfa)
H
Message-
Connect
2
Enterprise Messaging & Integration
Hybrid Messaging
MQ ExplorerMQ Client
Kafka API REST API IBM MQ Appliance IBM MQ
Message Hub
• A scalable, distributed, high throughput message bus based on Apache Kafka
• Wide compatibility via 3 APIs : REST, Kafka and MQ Light AMQP (coming soon)
• Tightly integrated with the Bluemix platform
MQ Light API
AMQP
RESTful API
HTTP
Apache Kafka
TCPStreams
…
3
Challenges
• Enterprises need increased agility with improved administration
efficiency
“Applications deployed in 3 hours, not 3 months”
“Same size middleware team, more and more applications”
“The messaging system must be able to respond to change”
• Whilst retaining strong operational control and visibility
– Security
– Performance
– Availability
4
Different pain points
Andy
Developer
Iain
Infrastructure
Guy
I want to execute code
without taxing my
Web app processes
My job is run a
communications service
for my customers’ apps
Some
Thing
My Apps Workers Messaging
Backbone
My Customers’ Apps
5
Different languages
Ruby
Node.js
Python
C
C++
Java
C#
Perl
Go
Clojure
Lua
Erlang Scala
PHP
6
Different approaches
Connecting external
systems
Event driven
Worker offload
• Posting video to multiple social
sites after transcoding
• Respond to external events
• Updating external booking app
• Posting updates to twitter
• Image processing
• Text analytics
7
The MQ Light API
A. Simple Messaging Model
B. Idiomatic clients in fully supported languages across an
open wire protocol
C. Support across the IBM Messaging portfolio
8
Digital IT Enterprise ITCloud
On-Prem
Message Hub(Based on Apache Kakfa)
MQ Light API
MQ Light API
H
Message-
Connect
9
Enterprise Messaging & Integration
Hybrid Messaging
MQ ExplorerMQ ClientMQ Light API
Kafka API REST API IBM MQ Appliance IBM MQ
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
10
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. Hello
2. World!
Topic Address Space
Sender application
DESTINATIONPattern=/test/a
11
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. Hello
2. World!
1. Hello
2. World!
Topic Address Space
Sender application
DESTINATIONPattern=/test/a
Pattern=/test/#
Client 1
Client 2
12
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
Hello
World!
DESTINATIONPattern=/test/a
Disconnected client
13
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. Hello
2. World!
1. Hello
2. World!
SHARING
Topic Address Space
Sender application
DESTINATIONPattern=/test/#
Pattern=/test/#
Share=myshare
Client 1
Client 2
Client 3
15
MQ Light Messaging Model
• Messages
– Payload is either Text or Binary.
– Content-type is used by clients to transfer JSON
– Per message time to live.
• Message delivery model
– At most once delivery (QoS 0)
– At least once delivery (QoS 1)
– Acknowledge messages
– Control over the number of unacknowledged messages delivered. (link credit)
16
MQ Light Node.JS API
• Installable from NPM
• Fully non blocking – Node.JS style
• Fluent programming style - wrappable into promises.
• Focussed on code simplicity.
• Client seamlessly retries across cloud endpoints
# Receive:
var mqlight = require('mqlight');
var recvClient = mqlight.createClient({service: 'amqp://localhost'});
recvClient.on('started', function() {
recvClient.subscribe('news/technology');
recvClient.on('message', function(data, delivery) {
console.log(data);
});
});
# Send:
var mqlight = require('mqlight');
var sendClient = mqlight.createClient({service: 'amqp://localhost'});
sendClient.on('started', function() {
sendClient.send('news/technology', 'Hello World!');
}); 17
Programming languages
Language Availability Notes
Node.js Supported IBM Client
Ruby Supported IBM Client
Java (Non Blocking) Supported IBM Client
Python IBM Client in Beta
PHP Qpid Proton
Scala Can use Java non Blocking client. Forum users report this working.
C/C++ Qpid Proton
Perl Qpid Proton
18
The plan
• Demo of worker offload pattern using MQ Light
– Start with local MQ Light server on laptop
– Upload the same code to Bluemix
• Using Node.js client
• Based off this tutorial but with some tweaks
– https://developer.ibm.com/messaging/2014/09/25/getting-started-node-js-
mq-light-apps-bluemix
19
Code overview
• User types in words into browser
• Words sent to workers and upper cased
• Words returned to browser
Front
end
(Node)
Browser
Worker 1
(Node)
MQ
Light
POST
Publishmqlight/sample/words
Subscribemqlight/sample/wordsuppercase
GET
(polling)
Publishmqlight/sample/wordsuppercase
Subscribemqlight/sample/words
share = common-back-end
1
2
3
4
5
6
20
on(message, …)
on(message, …)
Second worker online
21
Front
end
(Node)
Browser
Worker 1
(Node)
MQ
LightSubscribemqlight/sample/words
share = common-back-end
1
2
3
4
5
6
Worker 2
(Node)
4
Local demo
Bluemix prep
• Get Bluemix account
• Install Cloud Foundary command line
• Login
23
Create MQ Light service
24
Upload apps
25
Upload done
26
Bluemix demo
The MQ Light API
A. Simple Messaging Model
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. Hello
2. World!
1. Hello
2. World!
Topic Address Space
Sender application
DESTINATIONPattern=/test/a
Pattern=/test/#
Client 1
Client 2
29
The MQ Light API
A. Simple Messaging Model
B. Idiomatic clients in fully supported languages across an
open wire protocol
30
MQ Light Node.JS API
• Installable from NPM
• Fully non blocking – Node.JS style
• Fluent programming style - wrappable into promises.
• Focussed on code simplicity.
• Client seamlessly retries across cloud endpoints
# Receive:
var mqlight = require('mqlight');
var recvClient = mqlight.createClient({service: 'amqp://localhost'});
recvClient.on('started', function() {
recvClient.subscribe('news/technology');
recvClient.on('message', function(data, delivery) {
console.log(data);
});
});
# Send:
var mqlight = require('mqlight');
var sendClient = mqlight.createClient({service: 'amqp://localhost'});
sendClient.on('started', function() {
sendClient.send('news/technology', 'Hello World!');
}); 31
The MQ Light API
A. Simple Messaging Model
B. Idiomatic clients in fully supported languages across an
open wire protocol
C.Support across the IBM Messaging portfolio
32
Digital IT Enterprise ITCloud
On-Prem
Message Hub(Based on Apache Kakfa)
MQ Light API
MQ Light API
H
Message-
Connect
33
Enterprise Messaging & Integration
Hybrid Messaging
MQ ExplorerMQ ClientMQ Light API
Kafka API REST API IBM MQ Appliance IBM MQ
34
35
Questions?
36
Where can I get more information?
IBM Messaging developerWorks
developer.ibm.com/messaging
IBM Messaging Youtube
https://www.youtube.com/IBMmessagingMedia
Ibm.biz/ibmmessaging
@IBMMessaging
IBM MQ Facebook
Facebook.com/IBM-MQ-8304628654/37
Monday
10:30-11:30 3592 New MQ features
3452 Managing applications
12:00-13:00 2835 MQ on z/OS and Distributed
15:00-16:00 3470 Latest MQ z/OS features
2833 Where is my message?
3544 MQ Light in an MQ infrastructure
16:30-17:30 3573 Hybrid cloud messaging
2941 MQ Advanced
Tuesday
08:30-09:30 3540 The MQ Light API
12:00-13:00 3456 The IBM MQ Appliance
13:15-14:15 3499 Introducing Message Hub
3458 MQ Appliance administration
14:30-15:30 6432 MQ updates and futures (InnerCircle)
2849 Messaging feedback roundtable
16:00-17:00 3544 MQ Light in an MQ infrastructure
3513 MQ hands on lab
Wednesday
08:30-09:30 3602 Managing your MQ environment
12:00-13:00 3613 Designing MQ self service
6408 Hybrid messaging roadmap (InnerCircle)
13:15-14:00 3416 HA and DR with MQ
3433 Why secure your messaging?
15:45-16:30 3429 Securing MQ
2847 Meet the messaging experts
16:00-17:00 3508 MQ Light hands on lab
16:45-17:30 2275 Migrating to the IBM MQ Appliance
Thursday
08:30-09:15 3420 MQ Clustering
2931 Business agility with self service MQ
09:30-10:15 3479 MQ z/OS clusters and shared queue
3450 Optimising MQ applications
2849 Messaging feedback roundtable
10:30-11:15 3465 MQ Appliance high availability
3481 MQ z/OS messaging connectivity
11:30-12:15 3474 Active-active messaging
3537 Monitoring and managing MQ
3425 MQ publish/subscribe
Find us at the EXPO:
Hybrid Integration peds 65-68
Check out the Hybrid Messaging sub topic under the
Hybrid Integration topic for further customer and business
partner sessions
Hybrid Messaging from the IBM experts at InterConnect 2016 Sunday
14:30-15:30 6408 Hybrid messaging roadmap (InnerCircle)
Notices and Disclaimers
Copyright © 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission
from IBM.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.
Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of
initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS
DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE
USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY.
IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided.
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.
Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers
have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in
which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials
and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or
their specific situation.
It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and
interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such
laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law
40
Notices and Disclaimers Con’t.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not
tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products.
Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the
ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The provision of the information contained h erein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual
property right.
IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®,
FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG,
Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®,
PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®,
StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business
Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM
trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
41
Thank YouYour Feedback is Important!
Access the InterConnect 2016 Conference Attendee
Portal to complete your session surveys from your
smartphone,
laptop or conference kiosk.
Back up
Backup: front end in action
44
Backup: Bluemix dashboard
45
Backup: frontend app
46
Backup: MQ Light dashboard
47
Message Hub Delivery strategy
Message HubMessage Hub
incubatorFeatures & capabilities
Promoted when ready
• MQ Light API
Future :
• UI Enhancements
• MQ Bridge
• Log compaction
• Variable retention
• …
• [continuously delivered
new features]
48