MEET CO-SUPERVISOR
On Monday, i have met my co-supervisor, Prof. Zul, to discuss about the software to be use in my final year project. He talk about some components to be used and also about the software, which is between Grafana or MQTT. He also ask me to elaborate more on my objective of this project to make this project be important thing and must have product in every resident unit.
MQTT
What is MQTT?
MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol that provides resource-constrained network clients with a simple way to distribute telemetry information. The protocol, which uses a publish/subscribe communication pattern, is used for machine-to-machine (M2M) communication and plays an important role in the Internet of Things (IoT).
MQTT allows devices to send (publish) information about a given topic to a server that functions as an MQTT message broker. The broker the pushes the information out to those clients that have previously subscribed to the client's topic. To a human, a topic looks like a hierarchial file path.
MQTT is a good choice for wireless networks that experience varying levels of latency due to occasional bandwidth constraints or unreliable connections. Should the connection from a subscribing client to the broker get broken, the broker will buffer messages and push them out to the subscriber when it is back online. Should the connection from the publishing client to the broker be disconnected without notice, the broker can close the connection and send subscribers a cached message with instructions from the publisher.
How MQTT works?
An MQTT session is devided into four stages: connection, authentication, communication and termination. A client starts by creating a TCP/IP connection to the broker by either using a standard port defined by the broker's operators. When connecting, it is important to recognize that the server might continue an old session if provided with a re-used client identity.
Because MQTT aims to be a protocol for resource-constrained devices, SSL/TLS might not always be an option and in some cases, might not be desired. In such cases, authentication is presented as a clear-text username and password that is send by the client to the server as part of the CONNECT/CONNACK packet sequence. Some brokers, especially open brokers published on the internet, will accept anonymous clients. In such cases, the username and password is simply left blank.
MQTT is called a lightweight protocol because all messages have a small code footprint. Each message consists of a fixed header (2 bytes), an optional variable header, a message payload that is limited to 256 MB of information and a Quality of Service (QoS) level. The three different Quality of Service levels determine how the content is managed by the MQTT protocol. Although higher levels of QoS are more reliable, they have more latency and bandwidth requirements so subscribing clients can specify the highest QoS level they would like to receive.
The challenges of using MQTT for Internet of Things.
Because MQTT was not designed with security in mind, the protocol has traditionally been used in secure, back-end networks for application-specific purposes. MQTT's topic structure can easily form a huge tree and there's no clear way how to divide a tree into smaller logical domains that can be federated. This makes it difficult to create a globally scalable MQTT network, because as the size of the topic tree grows complexity increases.
Another negative aspect of MQTT is its lack of interoperability. Because message payloads are binary, with no information as to how they are encoded, problems can arise - especially in open architectures where different applications from different manufacturers are supposed to work seamlessly with each other.
So, the text above is some knowledge about MQTT that we can used in our study and project. Thank you for spent some time to view blog... ☺
No comments:
Post a Comment