Building a Real-time Mobile Solution with IBM MessageSight and MQTT
IBM Redbooks Solution Guide
Published 14 November 2014
View online
Authors: Rahul Gupta
Abstract
IBM® MessageSight is an appliance that is designed for the Internet of Things (IoT) and mobile environments. It provides a secure, DMZ-ready channel for lightweight, rapid, bidirectional messaging. MessageSight offers mobile application support, handles massive scaling of concurrent device connectivity and communication, and offers high-performance messaging. The appliance is DMZ ready and allows organizations to securely extend the messaging enterprise to external clients and sensors. It can act as the gateway for business data flowing in and out of the enterprise’s network. MessageSight is developer friendly and is designed for easy deployment and integration.
This IBM Redbooks® Solution Guide explains how to implement real-time mobile application solutions using MessageSight. It includes a scenario that shows how a taxi company developed a PickMeUp mobile application that integrated MessageSight and MQTT.
Contents
IBM® MessageSight is an appliance that is designed for the Internet of Things (IoT) and mobile environments. It provides a secure, DMZ-ready channel for lightweight, rapid, bidirectional messaging. MessageSight offers mobile application support, handles massive scaling of concurrent device connectivity and communication, and offers high-performance messaging. The appliance is DMZ ready and allows organizations to securely extend the messaging enterprise to external clients and sensors. It can act as the gateway for business data flowing in and out of the enterprise’s network. MessageSight is developer friendly and is designed for easy deployment and integration.
This IBM Redbooks® Solution Guide explains how to implement real-time mobile application solutions using MessageSight. It includes a scenario that shows how a taxi company developed a PickMeUp mobile application that integrated MessageSight and MQTT.
Figure 1 illustrates how clients who are connected to MessageSight can interface with back-end applications. It also shows how MessageSight connects many users and devices on the Internet to services that are deployed on an intranet. The users, devices, sensors, and services interact with each other by exchanging messages through MessageSight.
Figure 1. Typical IBM MessageSight connectivity design
Did you know?
One MessageSight appliance can serve up to a million devices connected concurrently and can handle the throughput of up to 13 million nonpersistent messages or 400,000 persistent messages per second with predictable latency in microseconds under load.
Business value
By processing large volumes of events in near real time, MessageSight delivers the performance, value, and simplicity that organizations need to accommodate the ever growing multitude of mobile devices and sensors. MessageSight extends messaging networks with extreme transaction rates, massive scale, and predictable low latency. It delivers messaging for the edge of the enterprise to reach out to the expanding IoT, the dramatic scaling in the number of concurrent devices that can be connected with timely information.
These capabilities allow today's organizations to be more engaged to support new systems of interaction with clients, partners, and employees by unlocking information in systems of record to enable business to be conducted anywhere. Unlike messaging appliances that merely consolidate traditional messaging services onto a hardware form factor, MessageSight is specifically engineered to deliver massive scale communications within and beyond the enterprise. It is designed with specific optimization to accelerate reliable messaging delivery with persistence qualities minimizing latency, and provide high and predictable throughput.
In real time, MessageSight supports new levels of performance and scale across a wide variety of use cases that include massive sensor networks, intelligent automotive applications, and large-scale mobile banking. By scaling huge numbers of concurrently connected devices, the appliance enables large volumes of events to be streamed into analytic engines for processing big data.
Solution overview
A taxi company wants to improve its quality of service and productivity by automating its business processes. They can do this by taking advantage of mobile technologies. They want to connect a passenger who needs a taxi with one of the company's taxi drivers and to do so in the most convenient and effective way possible. The traditional, centralized call center model is not efficient in many cases, because there can be delays or errors at the coordinator end that can lead to unexpected mishaps between a passenger and driver. This taxi company wants to develop a PickMeUp mobile application for taxi drivers and for passengers by using a real-time engagement that can be established between the passenger and driver.
A passenger using the PickMeUp mobile application can perform following actions:
- Create a new pickup request.
- Chat with the identified taxi driver and provide exact pickup details.
- Complete the payment after the drop at destination.
A taxi driver using the PickMeUp mobile application can perform following actions:
- Identify the list of current pickup requests.
- Accept a new pickup request.
- Chat with the passenger and receive exact pickup details.
- View the journey map showing the distance for the pickup and drop location.
- Initiate a payment after the passenger ride is complete.
To deliver these requirements in the passenger and taxi driver mobile application, a solution is implemented to enable the following phases of engagement between the taxi driver and passenger:
- Connecting: In this phase, the passenger and taxi driver PickMeUp applications connect to MessageSight and publish basic information that is related to their identities and login times of connection (as shown in Figure 2).
Figure 2. Passenger app and driver app user interface during the connecting phase
- Pairing: The purpose of this phase is to link a passenger to a driver. A passenger requests a taxi ride. The driver can view a list of potential passengers who are waiting for an available taxi and choose a passenger in the list. Figure 3 shows the PickMeUp passenger app and driver app during the taxi driver and passenger pairing phase. During this phase, a driver is paired with the passenger for the pick up request.
Figure 3. PickMeUp passenger app and driver app during the taxi driver and passenger pairing phase (© OpenStreetMap contributors)
- Approaching: This phase allows drivers to locate passengers in real time and to recognize the passenger as quickly as possible. Similarly, a passenger needs to locate a driver in real time. Various tools, such as maps, chats (text and voice), and pictures are proposed by the PickMeUp app for use in this phase.
- Riding: After the driver and passenger are physically located at the same position, the ride starts.
- Payment: This last phase (shown in Figure 4) starts when the passenger’s destination is reached. The passenger can then pay for the ride using the PickMeUp app. Moreover, the passenger can rate the driver and tip the driver. The back-end system is in charge of retrieving payment information from passengers and processing the payment.
Figure 4. MessageSight enabling communication between PickMeUp taxi driver, passenger, and back-end applications (© OpenStreetMap contributors)
Figure 5 shows a solution overview of the PickMeUp taxi service.
Figure 5. Solution overview of the PickMeUp taxi service
Solution architecture
This section describes the architecture of PickMeUp app in an attempt to propose preferred practices for developing mobile applications with MQTT and MessageSight. Figure 6 captures the overall architecture of the PickMeUp system and describes briefly the anticipated software and hardware components that are required to implement the solution.
Figure 6. PickMeUp architecture overview
The architecture is composed of the following components:
- Passenger app: The PickMeUp mobile application for the Passenger to run on mobile devices. The app is built to be an MQTT client application. The target platforms for the app are Android, iOS, and mobile web with HTML5 enabled. There is one Passenger app for each of the platforms. The iOS version uses the IBM WebSphere® MQ Client Pack as the MQTT client library. The Android version uses Eclipse Paho library. The web version uses Paho JavaScript client library.
- Driver app: The PickMeUp mobile app for the Driver to run on a mobile device. The target platforms for the app are iOS and mobile web with HTML5 enabled.
- PickMeUp backend: The PickMeUp backend is designed to act as an interface to seamlessly simulate the taxi payment process. The backend also cleans up abundant data stored on MessageSight server.
- IBM MessageSight: Works as the messaging server for the solution.
- Message Queuing Telemetry Transport: MQTT is used as the messaging protocol over the MessageSight server to provide real-time experience and massive messaging capacity.
Figure 7 provides the reference architecture overview for MessageSight. The backend is more comprehensive to cover the integration with other enterprise applications and subsystems. WebSphere MQ Connectivity can be used to connect MessageSight with other enterprise systems.
Figure 7. Referential architecture overview for a mobile application using MQTT and MessageSight
Other enterprise resource planning applications can be integrated to make the application work better with other parts of the enterprise, for example a payment app or accounting app. The enterprise LDAP can be used to authenticate the users of the system. Single sign-on support can be achieved by adding LTPA or OAuth service provider components into the architecture to enhance the authentication of the system. MessageSight can be placed at the enterprise edge or DMZ.
Usage scenarios
Mobile technologies have significantly changed the way organizations service their customers. The increased use of mobile technology is forcing enterprises to innovate, to transform, and to try new ways of reaching, engaging, and communicating with customers. Enterprises can benefit by using the unique features offered by mobile platforms.
The following table provides a list of sample scenarios where MessageSight can enable real-time engagement through mobile applications.
Table 1. Scenarios where MessageSight and MQTT can be used
Scenario | Key industries | Examples |
Automated metering |
|
|
Distribution supply chain and logistics |
|
|
Industrial tracking and visibility |
|
|
Health care quality and resource tracking |
|
|
Location awareness and safety |
|
|
Executive alerts |
|
|
Supported platforms
IBM MessageSight is an appliance. Refer to the IBM MessageSight announcement letter for hardware and software requirements.
Ordering information
Ordering information is shown in the following table.
Table 2. Ordering part numbers and feature codes
Program name | PID number | Charge unit description |
IBM MessageSight | 5725-F96 | Per appliance install |
Related information
For more information, see the following documents:
- IBM Offering Information page (to search on announcement letters, sales manuals, or both):
http://www.ibm.com/common/ssi/index.wss?request_locale=en
- On this page, enter MessageSight, select the information type, and then click Search. On the next page, narrow your search results by geography and language.
- Building Real-time Mobile Solutions with MQTT and IBM MessageSight, SG24-8228
http://www.redbooks.ibm.com/abstracts/sg248228.html - Building Smarter Planet Solutions with MQTT and IBM WebSphere MQ Telemetry, SG24-8054
http://www.redbooks.ibm.com/abstracts/sg248054.html - Responsive Mobile User Experience Using MQTT and IBM MessageSight, SG24-8183
http://www.redbooks.ibm.com/abstracts/sg248183.html - IBM MessageSight product web page
http://www-03.ibm.com/software/products/en/messagesight - IBM MessageSight announcement letter
http://ibm.co/1xo29rP - IBM MessageSight Knowledge Center
Others who read this publication also read
Special Notices
This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.