3.2: Architecture: Clients and Broker
Created by ppatierno on 11/11/2013 5:50:00 PM

Architecture:  Clients and Broker

In general, a network based on MQTT protocol consists of many clients (up to 10k devices) and a server named “broker” (even if it is possible to increase the size of the network by adding more brokers connected in bridge).

Fig3.1

Figure 3.1 : MQTT architecture, clients and broker

Each client connects to the broker providing its own unique identifier (client ID) and the role of the broker is to manage clients connections and to transfer messages between them. In addition, the broker is responsible for managing any messages persistence (typically into a database) so that it can send them to all clients that were temporarily disconnected but returned online; this feature is called “retain message” and it is important on unreliable networks with fragile connections.  When a client does not need to send any message or it does not receive messages for a long time, it must periodically send a “keep-alive” message to the broker to keep the connection alive otherwise the broker close the connection after a timeout that is 1.5 * keep-alive time (this value is specified by the client when connecting to the server). The entire architecture is based on TCP/IP, so that each message exchanged between clients is wrapped inside a TCP packet.

Fig3.2

Figure 3.2 : MQTT is based on TCP/IP. Messages are wrapped inside TCP packets

print
  Comments


Turkish porno izle video site in rokettubeporno izle