Introduction
This chapter provides information about the importance of mobile response time in today’s business environment, and about the technologies available to achieve real-time user mobile experiences.
This chapter shows you how the MQTT protocol can be implemented with IBM MessageSight to achieve a business solution.
This chapter includes the following topics:
Challenges
IBM product solutions:
 – IBM MessageSight
 – IBM WebSphere MQ
 – IBM Worklight
 – IBM Integration Bus (formerly WebSphere Message Broker)
 – IBM InfoSphere® Streams
MQTT advantages (versus HTTP)
IBM MessageSight user examples
1.1 Challenges
As technology evolves, more devices are connected to each other across the Internet, evolving into what has often been referred to as the Internet of Things (IoT). It seems that we, as a society, are constantly connected through smartphones, notebooks, and tablets.
However, it is not only people who are sending data across the internet. Machines can also be producing, collecting, and sending data. The expansion of interconnected devices creates a demand for systems to receive and quickly process an ever-growing amount of data, and users expect a real-time response.
The enhancements in technology make our daily tasks easier by allowing people to perform tasks on the go, and not requiring access to the old desktop computer. Even activities that used to require face-to-face access, such as monitoring homes and health, can now be done remotely, thanks to technological advances.
This enables us to interact with information in more intimate ways than before, but it creates a demand on business systems to handle an increasing number of connections, and to provide analytical processing with quick response times.
One of the biggest challenges for today’s marketplace is the evolution of mobile devices and the user experience. Previously, a phone only talked to other phones, and sent data when the user instructed it to send information.
Today, a phone or tablet can connect to almost anything, and share and receive information automatically. The user experience is constantly evolving, and requires a system that can facilitate the transports of data in near real time to optimize the user experience.
Most of today’s edge connectivity follows a similar pattern, whereby devices collect data for central processing. Then decisions are made centrally and pushed out to devices. To enhance the mobile user experience, you need to add intelligence throughout the network.
The expanding mobile world has created a need for businesses to expand beyond their existing messaging enterprise. Massive amounts of data need to be processed in real time and kept secure.
The old request/response model does not work for many of today’s current scenarios. To ensure that the user experience is satisfactory, messaging applications must be able to deliver secure, reliable behavior in an unreliable or intermittently connected wireless environment.
You can take the following approaches simultaneously:
Enable systems to collect information, distill it, and then push it up to traditional central systems for processing.
Use the information gathered from remote devices, and use MQTT connectivity to push information back down, applying central intelligence combined with contextual information to make things happen.
For example, a promotion can be targeted at a particular consumer at exactly the correct time based on the customer’s previous preference and current geolocation.
These are ways that you can use data today, which can make a huge difference to a business and its ability to meet customer expectations.
1.2 IBM product solutions
To help businesses meet the demands of today’s interconnected world, IBM has a suite of messaging products. By using the IBM portfolio of messaging products, you can create a solution that extends from back-end enterprise applications to include millions of mobile users.
IBM MessageSight is one of the latest additions to the IBM messaging family. It is an appliance-based messaging server optimized to address the massive scale requirements of the machine-to-machine (m2m) and mobile use cases. IBM MessageSight is designed to sit at the edge of the enterprise, and can extend your existing messaging infrastructure or be used stand-alone.
1.2.1 IBM MessageSight
IBM MessageSight joins the IBM portfolio of middleware to help bridge back-end enterprise environments to remote smarter clients as the planet becomes more digitally instrumented, interconnected, and intelligent.
This enables organizations to provide an interactive experience with their users, and offer real-time analytics of large data volumes, as shown in Figure 1-1.
Figure 1-1 IBM MessageSight extends your enterprise to remote wireless clients
IBM MessageSight is built for high performance to offer persistent, transactional messaging. The hardware is 2U form factor, eight 1 GbE and four 40 GbE ports. IBM MessageSight includes built-in security, and makes integration with external Lightweight Directory Access Protocol (LDAP) security systems possible.
IBM MessageSight enables you to sense and respond to data coming from the edge of your enterprise. Messaging connectivity can be achieved using MQTT, Java Message Service (JMS), or WebSphere MQ. The ability to connect through MQTT makes the appliance ideal for use with mobile clients. Administration can be done with a web user interface (web UI) or using the command line.
The high-availability pair takes the form of a primary/standby configuration. The primary node continually replicates both the message store and the appliance configuration information to the standby node.
If the primary node fails, the standby node has the latest data that is needed for applications to continue messaging services. The standby node does not accept connections from application clients or provide messaging services until a failover operation occurs.
IBM MessageSight offers mobile application support, and can handle massive scaling of concurrent device connectivity and communication, offering high- performance messaging. The appliance is DMZ-ready, with no user-level operating system, and encrypted flash and storage media, allowing you to securely extend your existing messaging enterprise. The device can act as the gateway for business data flowing in and out of your enterprise’s network.
IBM MessageSight is developer-friendly, designed for easy deployment and easy integration. This book explores how IBM MessageSight can be integrated with other IBM offerings to deliver a complete messaging solution that encompasses remote mobile clients and back-end enterprise systems.
With the versatile IBM MessageSight, you can use either the MQTT protocol for low latency publishing and subscribing (ideal for m2m), or JMS to transfer messages received from remote clients to back-end applications.
Figure 1-2 shows a few examples of how clients connected to IBM MessageSight can interface with WebSphere MQ and other back-end applications. In this diagram, IBM MessageSight connects many users and devices on the Internet to services that are deployed on an intranet. The users, devices, and services interact with each other by exchanging messages through IBM MessageSight.
Figure 1-2 Typical IBM MessageSight connectivity designs
1.2.2 IBM WebSphere MQ
IBM WebSphere MQ has been the top message queuing software for two decades. It offers assured delivery of asynchronous messages, and can be an integral part of critical business architecture. Including WebSphere MQ in your topology enables a diversity of messaging styles. Applications can send data point-to-point, or use the publish/subscribe model.
A variety of application languages might be used, including C, COBOL, Java, and JMS, just to name a few. WebSphere MQ includes a telemetry feature that uses the reliability of WebSphere MQ messaging functions to be extended to include messages from a huge array of endpoints, ranging from client applications to applications running on mobile devices, Android phones, and even small sensors, radio frequency identifications (RFIDs), and telemetry devices.
The IBM MessageSight MQ Connectivity feature enables message data flow received from remote wireless devices to be funneled to a queue manager. The connection from IBM MessageSight to the queue manager is through a client channel, which can be secured using Secure Sockets Layer (SSL) or Transport Layer Security (TLS). A single user ID is defined on the queue manager for IBM MessageSight authentication.
1.2.3 IBM Worklight
IBM Worklight is a member of the MobileFirst family of products that provides a platform for the development of mobile applications. It includes a collection of application programming interfaces (APIs) that can be used to develop hybrid Worklight applications. Using the Worklight APIs, you can create web applications that are tailored to the mobile environment.
IBM Integration Bus, in conjunction with IBM Worklight, can also provide your mobile applications with secure access to your back-end systems, and integration that is robust and can scale to handle a growing number of connections.
1.2.4 IBM Integration Bus (formerly WebSphere Message Broker)
IBM Integration Bus V9.0 is the latest version of what was previously known as WebSphere Message Broker. The principal function of a message broker is to mediate communications between applications by providing capabilities for tasks, such as message validation, message transformation, message enhancement, and message routing.
IBM Integration Bus goes beyond the normal routing, transformation, or message aggregation, enabling you to solve most integration requirements between application systems, from simple point-to-point connectivity to more complex topologies. It has a wide range of built-in connectors that enable integration between queues, web and Representational State Transfer (REST) services, files, databases, and packaged applications.
IBM Integration Bus provides a range of flexible deployment options:
Standard operating systems:
 – Linux
 – Microsoft Windows
 – IBM AIX®
 – IBM z/OS
Virtualized systems:
 – AIX Hypervisor
 – VMware
Public clouds:
 – IBM SmartCloud®
IBM Integration Bus is a significant evolution of the WebSphere Message Broker technology base, with continuous innovation to incorporate an increasing number of integration use cases.
The previous WebSphere Message Broker versions can be used in conjunction with IBM MessageSight by incorporating a WebSphere MQ queue manager between IBM MessageSight and the broker. IBM Integration Bus V9 has the added benefit of enabling you to configure a direct JMS publish/subscribe connection from IBM Integration Bus to IBM MessageSight, without the need for an intermediate queue manager.
IBM Integration Bus includes two comprehensive patterns that provide production-ready, bidirectional connectivity between back-end systems and connected IBM MessageSight clients:
The Event Filter pattern uses IBM Integration Bus to receive events from mobile clients through IBM MessageSight, filter the events based on specified criteria, and forward events that match the criteria to a back-end system.
The Event Notification pattern uses IBM Integration Bus to receive events from a back-end system, and dynamically publish those events to mobile clients through IBM MessageSight.
1.2.5 IBM InfoSphere Streams
Extracting insight from an immense volume and variety of data is now possible with IBM InfoSphere Streams. Data in motion is one of the fundamental aspects of big data. Being able to harness and use data as it flows through a system is essential for today’s business world. InfoSphere Streams allow real-time analytic processing of big data. Integrating IBM InfoSphere Streams into your enterprise system enables massive volumes of data to be ingested and analyzed as it
is received.
Rule-based decisions can be made as the data comes in, triggering actions based on the information received. For example, an influx of data can be received using IBM MessageSight, and funneled to InfoSphere Streams.
Through stream computing, InfoSphere Streams can determine what response or downstream processing is needed, and start it accordingly. InfoSphere Streams is able to ingest a variety of data, from simple text to images and geospatial information. It then uses its powerful analytics to link and evaluate the data as it is received then take appropriate actions.
1.3 MQTT advantages (versus HTTP)
The MQTT protocol is optimized for networks with limited processing capabilities, small memory capacities, or high latency. Compared to HTTP, MQTT imparts several advantages to mobile applications:
Faster response times
Higher throughput
Higher messaging reliability
Lower bandwidth usage
Lower battery usage
MQTT’s efficient use of network and battery power, along with its integration with enterprise messaging middleware, makes it ideal for scenarios where an enterprise application must push data or interact with one or more mobile applications.
HTTP is designed as a request/response protocol for client/server computing, not necessarily optimized for mobile and push capabilities, particularly in terms of battery usage. MQTT helps overcome problems experienced by HTTP, by offering reliable delivery over fragile networks. MQTT will deliver message data with the required quality of service (QoS) even across connection breaks.
MQTT includes several useful features:
Last Will and Testament All applications know immediately if a client disconnects ungracefully.
Retained messages Any user reconnecting immediately gets the latest business information.
The lightweight MQTT protocol enables publish/subscribe messaging to reliably send data to phone or tablet applications without having to code retry logic in the application. The MQTT protocol can be used to create an interactive user experience with any mobile platform.
IBM Worklight is an example of an application development tool that enables you to create mobile applications with MQTT quickly and easily.
An actual example where implementing the MQTT protocol rather than HTTP was beneficial is the case of a prominent social networking company. The company had experienced latency problems when sending messages. The message delivery was reliable but slow with their previous method.
A new mechanism was needed that can maintain a persistent connection with the messaging servers without using too much battery power. This capability is critical to users of the company’s social networking site, because so many of them use the service on battery-powered mobile devices.
The company’s developers solved the problem by using the MQTT protocol. By maintaining an MQTT connection and routing messages through its chat pipeline, the company was able to achieve message delivery at speeds of just a few hundred milliseconds, rather than multiple seconds.
1.4 Mobile user experience scenarios with MQTT and IBM MessageSight
In today’s world, there are many practical instances where MQTT and IBM MessageSight implementations can offer a solution for an integrated system that enables users to interact using mobile devices. In this section, you examine a few possible scenarios.
1.4.1 Connected car
IBM MessageSight can enable customers to connect and interact with their cars. A connected car can use the MQTT protocol to send messages from the car to IBM MessageSight and then notify the customer, as shown in Figure 1-3.
For example, a connected car is a car that is able to send diagnostic information to the car company. Also, the car is able to receive messages, which might range from remotely locking the car to a request to send its current location.
Figure 1-3 Connected car
MQTT and IBM MessageSight facilitate message routing, enabling the car to send diagnostic information to the car company. The car essentially acts as a rolling sensor platform publishing telematic events. The MQTT protocol is used to transport data from the car sensors to the automobile company.
The data can be analyzed using predictive maintenance analytics, acting as a virtual mechanic that sends a notification to the customer that service is needed before a component fails.
Also, the car is able to receive messages, which might range from remotely locking the car, setting the climate controls (heat or air), or requesting that the car send its current location. Most existing connected car solutions have previously taken a mobile response time measured in 10s of seconds. Tests with MessageSight using MQTT have shown the response time to be less than a second, equal to the time it takes to push a key fob.
1.4.2 Connected city
If you take the connected car scenario a step further, you can see how having the MQTT messaging features available within many cars can effectively translate into a connected city. If the car were involved in an accident that caused the airbag to deploy, it triggers an event to be published, as shown in Figure 1-4.
Publish/subscribe messaging enables different users to receive the alert that an accident has happened. It can be generic (to inform other drivers of the location of the accident), or it can be specific (to route only to the car owner’s family), and so on. The alert might also be sent to emergency services, to alert police or medics of the accident.
Figure 1-4 Connected city
For the connected city example, it is easy to see how millions of cars sending messages can create a massive amount of data to be processed. To date, analyzing this volume of data has presented a problem. Using IBM MessageSight in conjunction with IBM InfoSphere Streams stream computing helps alleviate this dilemma by allowing real-time analytics to be performed on big data.
1.4.3 Connected home
The interactive user experience can also apply to the home. Figure 1-5 shows a scenario where changing a channel on the TV creates a message that is sent back to the data center, which in turn determines how advertising might be catered specifically to the consumer currently watching TV.
Figure 1-5 A connected home
Other convenient features of a connected home might be the ability for the homeowner to adjust the thermostat or unlock the door using his mobile device. These types of features not only offer convenience, but also help contribute to a smarter planet, making it possible for utilities to be adjusted to lower the usage when not needed. The ability to remotely manage door locks and utilities can apply to a rental or vacation home property as well.
1.4.4 Connected retail consumers
Retailers are able to provide a unique shopping experience tailored to a customer’s location and shopping preferences. Bidirectional communication between a retailer’s back-end systems and the customer’s mobile devices enables retailers to provide notifications to consumers based on the customer’s proximity to the store (Figure 1-6).
Figure 1-6 Connected retail consumers
For example, if a customer is browsing a product at home on his mobile device, and later enters the store, he can use the retailer’s mobile application to find where the product is located within the store. The retailer might even want to push a notification for a sale or discount on that product or another product while the customer is browsing in the store.
The retailer can enable business rules to handle database calls, analytics, pricing, and so on, to cater the notifications based on the individual consumer, even the consumer’s current geographic location. The retailer’s central office is able to monitor the millions of messages using IBM MessageSight.
 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset