The Key Technology of Online Service System Based on MQTT. Da-mei CHEN and Ze-hua GAO

Similar documents
Powering the Internet of Things with MQTT

MQTT Message Queue Telemetry Transport.

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Message Queuing Telemetry Transport

An Overview of WebSphere MQ Telemetry and How to Utilize MQTT for Practical Solutions

Lightweight Internet Protocols for Web Enablement of Sensors using Constrained Gateway Devices

Distributed Pub/Sub Model in CoAP-based Internet-of-Things Networks

Which application/messaging protocol is right for me?

Impact of MQTT Based Sensor Network Architecture on Delivery Delay Time

A Large-scale Distribution and Deployment of Robot Task Based on MQTT Protocol and ROS

MQTT MQ TELEMETRY TRANSPORT. AN INTRODUCTION TO MQTT, A PROTOCOL FOR M2M AND IoT APPLICATIONS. Peter R. Egli INDIGOO.COM. indigoo.com. 1/33 Rev. 1.

Internet of Things: An Introduction

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

MOM MESSAGE ORIENTED MIDDLEWARE OVERVIEW OF MESSAGE ORIENTED MIDDLEWARE TECHNOLOGIES AND CONCEPTS. MOM Message Oriented Middleware

OSI Layer OSI Name Units Implementation Description 7 Application Data PCs Network services such as file, print,

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Hands-On with IoT Standards & Protocols

Enabling the Wireless Internet

Area Limitations on Smart Grid Computer Networks

Kepware Whitepaper. IIoT Protocols to Watch. Aron Semle, R&D Lead. Introduction

MQTT IoT Messaging Protocol. Francisco Quintero. Lead Firmware Engineer

06/02/ Local & Metropolitan Area Networks 0. INTRODUCTION. 1. History and Future of TCP/IP ACOE322

4.0.1 CHAPTER INTRODUCTION

Comparison of IoT Data Protocol Overhead

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Ch 1. Mobile Adaptive Computing

High Volume Messaging with IBM MessageSight for use in Mobile, Web and M2M solutions

Lightstreamer. The Streaming-Ajax Revolution. Product Insight

Tyler Lacroix & Roger Lacroix Capitalware's MQ Technical Conference v

WHITE PAPER. Good Mobile Intranet Technical Overview

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

OSI Transport Layer. objectives

Optimization of Data Communication on Air Control Device Based on Internet of Things with Application of HTTP and MQTT Protocols

Open Source MQTT Brokers. Leon Anavi Konsulko Group OpenIoT Summit 2018

Cassia MQTT User Guide

A New Method Of VPN Based On LSP Technology

ESR Consortium LWM2M-MQTT-1.0

Open Source MQTT Brokers. Leon Anavi Konsulko Group OpenIoT Summit 2018

Adaptive Video Acceleration. White Paper. 1 P a g e

Transport layer issues

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

Service Mesh and Microservices Networking

ITS323: Introduction to Data Communications

Guide to TCP/IP, Third. Chapter 6: Basic TCP/IP Services

Performance Evaluation of IoT Protocols under a Constrained Wireless Access Network

BC95-G&BC68 MQTT Application Note

Challenges. Distribution. Discovery. Security. Usability. Governance. Unreliable messaging. Physical objects. Dealing with places.

Position of IP and other network-layer protocols in TCP/IP protocol suite

The COLDEX Metadata Synchronisation Service (MSS) and other services

The Client Server Model and Software Design

Chapter 1 Living in a Network Centric World

Virtual private networks

Transport Layer Review

RFID in Internet of things: from the static to the real-time

Introduction to IoT. Jianwei Liu Clemson University

FUJITSU Software Interstage Information Integrator V11

Unified Communications Platform

Seven Criteria for a Sound Investment in WAN Optimization

CS-461 Internetworking. Dr. Mohamed Aboutabl

IP Calls on 3G/Wi-Fi Instant Messaging Auto Provisioning Peer-to-Peer (P2P) Calls IP SMS Mobile Top Up Automated Calling Card Experience and more...

The Future of Application Acceleration

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016

Ch. 4 - WAN, Wide Area Networks

Realtek MQTT User Guide. This document provides guideline to use MQTT module in SDK.

Chapter 2 Distributed Computing Infrastructure

Account Customer Portal Manual

Introduction to VoIP. Cisco Networking Academy Program Cisco Systems, Inc. All rights reserved. Cisco Public. IP Telephony

Whitepaper. IoT Protocols. PAASMER Support for Protocols. Website:

ETSF10 Internet Protocols Transport Layer Protocols

Lecture 8: February 19

Approaches to Deploying VoIP Technology Instead of PSTN Case Study: Libyan Telephone Company to Facilitate the Internal Work between the Branches

Kony and TIBCO enable fast reliable Websockets Communication. Overview of the integration of WebSockets with TIBCO eftl and the Kony Platform

Distributed Systems. Bina Ramamurthy. 6/13/2005 B.Ramamurthy 1

IMS Client Framework for All IP-Based Communication Networks

CN1047 INTRODUCTION TO COMPUTER NETWORKING CHAPTER 6 OSI MODEL TRANSPORT LAYER

Simulation of TCP Layer

Load Balancing Technology White Paper

How to Route Internet Traffic between A Mobile Application and IoT Device?

Avaya Port Matrix: Avaya Communicator for Microsoft Lync 6.4. Avaya Proprietary Use pursuant to the terms of your signed agreement or Avaya policy.

A Communication Middleware with Unified Data Transmission Interface

NT1210 Introduction to Networking. Unit 10

Providing Security to the Architecture of Presence Servers

Development of Communication Software for Mobile Computing

Internet Draft Intended status: Standards Track Expires: January 16, 2019 D. Xiong Chongqing University of Posts and Telecommunications July 15, 2018

SPS: an SMS-based Push Service for Energy Saving in Smartphone's Idle State

MODERNIZATION OF AUTOMATIC SURFACE WEATHER OBSERVING SYSTEMS AND NETWORKS TO UTILIZE TCP/IP TECHNOLOGY

Subject: Adhoc Networks

Version 2.1 User Guide 08/2003

Getting Started with MQTT. Eclipse M2M Webinars Webinar #3 September 27, /10/2012 1

IBM Lotus Expeditor 6.2 Server MQ Everyplace Overview

Solace JMS Broker Delivers Highest Throughput for Persistent and Non-Persistent Delivery

Release Notes for NBAR2 Protocol Pack

Transport Protocols. ISO Defined Types of Network Service: rate and acceptable rate of signaled failures.

Part VI. Appendixes. Appendix A OSI Model and Internet Protocols Appendix B About the CD

Multimedia! 23/03/18. Part 3: Lecture 3! Content and multimedia! Internet traffic!

Part 3: Lecture 3! Content and multimedia!

DS 2009: middleware. David Evans

Yealink VCS Network Deployment Solution

Instant Messaging Interface for Data Distribution Service

Internet Technology 3/2/2016

Transcription:

2016 International Conference on Artificial Intelligence: Techniques and Applications (AITA 2016) ISBN: 978-1-60595-389-2 The Key Technology of Online Service System Based on MQTT Da-mei CHEN and Ze-hua GAO Beijing University of Posts and Telecommunications, Beijing, China Keywords: Online customer service system, MQTT, /Subscribe model, Servers. Abstract. The access traffic of websites mainly transfer from PC to Mobile terminal, which is different from the traditional portal webs. MQTT protocol is a lightweight agent-based publish/subscribe messaging transport protocol. Based on TCP, it has small traffic overhead and operates at low bandwidth and unreliable network environment, so it is ideal for use in mobile applications. This paper researches the key technology of online customer service system based on the MQTT protocol. Introduction With the development of the Internet, mobile Internet applications across every corner of people's daily lives. Online customer service system is a web-based instant communication instruments, which creates a real-time communication and exchanges platform for website visitors. The traditional online customer service system could not be met with the concurrency support. This causes the system to respond slowly, messages lost, and frequent problems. Currently, message transmission scheme on the mobile terminal mainly includes SIMPLE protocol, XMPP protocol and MQTT protocol in mobile social network. In the field of telecommunications, SIMPLE protocol as the network protocol of IMS core network has a more mature application base, a more mature audio standard, and supporting a variety of instant messaging. However, when the network environment changes from private network to mobile network and the terminal changes to mobile terminal, there will be more traffic, large packet, the congestion problem, low efficiency and more complex issues in extending new features. This will be a key factor in restricting instant messaging business development. On the traditional Internet, XMPP protocol is a widely used instant messaging. XMPP protocol is an XML-based open instant messaging protocol, integrated XML flexible scalability, but there are difficulties in storing and forwarding, heavy network traffic, large packet, protocol complexity, high cost of deployment, and the lack of stable standards in terms of audio and video as well. XMPP protocol is based on XML, and XMPP protocol itself will carry a lot of redundant information, which will directly lead to heavy network traffic and storage. Meanwhile MQTT protocol supports encrypted channel transmission based on TSL/SSL, authentication support during the connect time to ensure the security of message transmission and terminal access. Today, due to the increased use of smartphones, push notification services[1] are now commonly used. These benefits of MQTT agreements satisfy the needs of the application on mobile systems, which make MQTT can not only be applied to the mobile terminal and also the Internet of things. This means that although the MQTT protocol adds a very small header (i.e., only two bytes) to a message, TCP introduces a considerable overhead to provide reliable, ordered, and error-checked message delivery[2]. MQTT is a lightweight pub-sub messaging protocol for communication in Machine-to-Machine (M2M) or Internet of Things (IoT) contexts[3]. MQTT agreement has differences with SIP and XMPP protocol on the mechanism. The SIP and XMPP protocol use the point to point communication mechanism to determine the forwarding destination address according to the message field. MQTT agreement is based on publish / subscribe model introducing the theme of the proposed concept. If the Terminal subscribes to a topic and the will forward the messages to publish on the topic to the terminal for communication, messaging and offers three Qos quality assurance. One form of data-centric communication is the publish/subscribe messaging system. Compared with other data-centric variants, publish/subscribe 8

systems are common and wide-spread in distributed computing[4].the combination of the publish / subscribe model of MQTT and Qos guarantee for real-time communications such as point to point, group chat scenario have a natural advantage. As an example, Facebook Messenger[5] is based on MQTT, and many other open source projects are on the way based on MQTT. The Standards of MQTT Protocol The Overview of MQTT MQTT (Message Queuing Telemetry Transport)[6] is designed for the Internet of Things to deliver messages. MQTT protocol is open, streamlined, lightweight and easy to implement, especially for the low-bandwidth, unstable, high cost network environment and embedded devices and mobile terminals with limited processor and memory resources. MQTT is a lightweight duplexing asynchronous messaging protocol, whose features are fit for certain scenarios of the Internet of Things. Specifically, MQTT can solve intercommunication problems within devices of the Internet of Things, and communication problems between these devices and the back-end application systems. The Message Format of MQTT The signaling format of MQTT protocol includes three parts: fixed header, variable header and payload. Each command message must contain a fixed header. The Features of MQTT Table 1. MQTT message glands. bit 7 6 5 4 3 2 1 0 Dup QoS RETAI byte 1 Message Type flag level N byte 2 Remaining Length MQTT is a lightweight machine-to-machine messaging protocol[7]. Providing one-to-many message releasing, the publish/subscribe messaging model as shown in Fig.1 can decouple application devices to transmit information by shielding the load contents. Compared to the polling method, push notification method was proved to be more efficient in battery and data consumption[8]. MQTT employs TCP/IP protocol to provide network connection; supporting small transmission whose overhead is small, minimizing agreement exchange to reduce network traffic. In addition, MQTT adopts the Last Will and Testament characteristic to inform concerned clients terminal mechanisms. QoS 0 QoS 1 QoS 2 /Subscribe /Subscribe /Subscribe er (source) subscriber (sink) Figure 1. Topic-based pub/sub communication model. Figure 2. Packet transmission method about QoS Level To ensure the reliability of messaging, MQTT supports 3 levels of Quality of Services (QoS) [9], as shown in Fig.2. Message promulgation totally depends on the underlying TCP / IP network, this level may loss or repeat message, so applying to the case that receiving message is lost once, because there will be a second transmission: "At least once" means the times of received is at least once to ensure that the message reaches, but the situation may occur repeatedly receive message: "only once". It 9

refers to the times of arrived message is one and only one, the highest level is suitable for situation that duplicating or missing messages will lead to incorrect results. The Design of Online Customer Service Based on /Subscribe Model From the entire instant communication platform, the online customer service system can be used as an application of a typical instant communication platform, which can ensure that the entire instant communication platform will access more business, so that the whole platform scalability enhancements, more efficient available. The system-architecture of instant communication should ensure the independence of each functional layer in order to facilitate rapid response to a variety of business needs. The reliable message delivery for point to point or for a group is implemented by a push which is based on MQTT protocol. The upload and download of small voice and video file are achieved by small distributed file. The storage and management of online customer service system are implemented by IM. The system architecture based on public/subscribe model as shown in Fig.3. Research of Key Middleware Figure 3. System architecture based on public/subscribe model. The Server of Pushing Message. This system selects an open. Which is called emqttd. The emqttd is implemented by erlang platform. The advantage of emqttd is that it primarily supports publish-subscribe feature, you can ensure reliable and secure transmission of messages. Also it can be easy to integrate with enterprise applications. Emqttd supports to notify news in real-time and push rich content. The flexible pub-sub and the storage and filtration of message can also be complied.it occupies little bandwidth and high bandwidth utilization, low power consumption of mobile applications. The Server of Distributed Small File Storage. The traditional way is to transfer message by text message and file together. But the MQTT message body is only suitable for a small transmission of document. For a file,which occupies a large space, may be interrupted in the process of uploading in the traditional way, so a new type of file transfer that establish a small distributed file storage in the process of implementation and design the interface of small text storage. The interface of uploading and downloading are standard http protocol instead of proprietary protocols which can reduce the work of client SDK integrated for the function of uploading and downloading. There are two approaches for reliable delivery of voice, video and other small files, one is that to regard the contents of the package as MQTT load by MQTT reliable service, the other is only included the package of MQTT link to download and the client will download after receiving the 10

message. The former approach is that if people receive a lot of small files messages when people are not online. The offline message will take up much memory of, you need to modify the and send a message to an external database such as additional storage. We chose the second method though the MQTT to download link can reduce the change of MQTT which is convenient to create professional software to store and expend small files. The Business Server. Because of the push is focus on reliable delivery of messages, interactive interfaces between the data of IM service and the terminal of the SDK will be used in the business. The business will package the rest business services and online customer service system. The function of the point to point service messages, the group message, the definition of business-critical messages, and the offline messages, all will be implemented by the business. In addition the file transfer, group management, relationship management, and other friendship will be achieved by the business. The Key Technology When the number of customers increased to a certain number, for example the high concurrent situation, online customer service system should have the ability to deal with the situation. So we increase the ngnix, a high-performance web and reverse proxy, in the actual implementation process. In the case of high concurrent connection, ngnix is a good alternative for Apache service. It can support up to 50,000 concurrent response to high connections. As a load balancing, nginx support rails and php internal procedures in foreign service, the program also supports http proxy service in foreign service. The whole architecture is as shown in Fig.4. ngnix Figure 4. The relation chart of system. Figure 5. The flow chart of messages. In order to make sure reliable message to arrive, the request from the client will send to the business at first, since the push only focus on how to publish/subscribe and push messages. The business performs recording process, then the message will send to MQTT by the business. After processing the message will be sent to the client, then if the message is received by client, the client will send a confirmation to the service, in order to ensure reliable delivery of messages throughout the process. The whole process of implementation as shown in Fig.5. Functional Testing Based on /Subscribe Model Testing environment: The browser as a functional testing terminal; Buidling emqttd based on MQTT protocol; Good network environment. The Scene One As shown in Fig.6, when we subscribe the topic MQTT1, the message can be received by the sender. The Scene Two As shown in Fig.7, when we do not subscribe the topic MQTT1, but we send the message about the topic MQTT2. The receiver will not receive these messages as show in the message list. 11

Figure 6. Public and Subscribe the topic and the message list about MQTT1. Figure 7. Public and Subscribe the topic and the message list about MQTT2. Conclusion This Paper introduces the key technology of online service system based on MQTT protocol. Comparing with other instant protocols, the paper analyse the advantage of MQTT which can be implemented in the low-bandwidth environment. The system can be expanded into a highly available instant messaging product. References [1] K. M. Bell, D. N. Bleau, J. T. Davey, Push notification service, U.S. Patent 8 064 896, November, 2011. [2] N. De Caro, W. Colitti, K. Steenhaut, G. Mangino and G. Reali, "Comparison of two lightweight protocols for smartphone-based sensing," 2013 IEEE 20th Symposium on Communications and Vehicular Technology in the Benelux (SCVT), Namur, 2013, pp. 1-6. [3] H. C. Jo and H. W. Jin, "Adaptive Periodic Communication over MQTT for Large-Scale Cyber-Physical Systems," Cyber-Physical Systems, Networks, and Applications (CPSNA), 2015 IEEE 3rd International Conference on, Hong Kong, 2015, pp. 66-69. [4] U. Hunkeler, H. L. Truong and A. Stanford-Clark, "MQTT-S A publish/subscribe protocol for Wireless Sensor Networks," Communication Systems Software and Middleware and Workshops, 2008. COMSWARE 2008. 3rd International Conference on, Bangalore, 2008, pp. 791-798. [5] Building Facebook Messenger, http://www.facebook.com/notes/facebookengineering/buildingfacebook-messenger/1015025935099 8920, cited August, 2012 [6] MQTT V3.1 Protocol Specification [7] Power Profiling: HTTPS Long Polling vs. MQTT with SSL, on Android, http://stephendnicholas.com/archives/1217, cited October, 2012. [8] Chen, Whei-Jen and Gupta, Rahul and Lampkin, Valerie and Robertson, Dale M. and Subrahmanyam, Nagesh, Responsive Mobile User Experience. [9] S. Behnel, L. Fiege, G. Muehl, On Quality of Service and Subscribe, Proceedings of the 26th IEEE International Conference on Distributed Computing Systems Workshops, July, 2006. 12