On Modelling and Validation of The MQTT Iot Protocol For M2M Communication
On Modelling and Validation of The MQTT Iot Protocol For M2M Communication
On Modelling and Validation of The MQTT Iot Protocol For M2M Communication
Alejandro Rodriguez1 ,
Lars Michael Kristensen1 and Adrian Rutle1
1
Western Norway University of Applied Sciences, Bergen
{arte,lmkr,aru}@hvl.no
1 Introduction
Publish-subscribe messaging systems [9] support data-centric communication
and have been widely used in enterprise networks and applications, mainly due
to scalability and support for dynamic application topology. The interaction and
exchange of messages between clients following the publish-subscribe paradigm
are always undertaken using an intermediary usually called a broker (or a bus)
that manages topics. A client acting as a publisher on a given topic can send
messages to other clients acting as subscribers to the topic without the need to
know about the existence of the receiving clients.
A software system architecture based on publish-subscribe messaging pro-
vides more scalability than the traditional client-server architecture. One reason
for this is that operations carried out in the broker can be highly parallelized
and handled using event-driven techniques. The decoupling that the event service
provides between clients acting as publishers or subscribers can be decomposed
along the following three dimensions:
100 PNSE’18 – Petri Nets and Software Engineering
During the last years there have been a huge increase in the use of devices related
to Internet of Things (IoT) [18]. The International Union (ITU) [12] defines IoT
as a global infrastructure for the information society, enabling advanced services
by interconnecting physical and virtual devices. The fields of application for IoT
technologies are broad, and IoT solutions are being adopted in several different
environments.
At its core, IoT is characterised by the combination of physical and digi-
tal components to create new products and enable novel business models [18].
Thanks to increasingly efficient power management, broadband communication,
reliable memory and advances in microprocessor technologies, it has become
possible to digitalize functions and key capabilities of industrial products [19].
The IoT paradigm blends the virtual and the physical worlds by bringing dif-
ferent concepts and technical components together: pervasive networks, minia-
turisation of devices, mobile communication, and new ecosystems [6]. As de-
scribed in [18], from the technological side, the implementation of a connected
product typically requires the combination of multiple software and hardware
components distributed in a multi-layer stack of IoT technologies. A typical IoT
technology stack is divided in three core layers:
Device layer: This layer encompasses the hardware. Additional sensors, actu-
ators, or processors can be added to existing core hardware components, and
embedded software can be modified or integrated to manage and operate the
functionality of the physical device.
Connectivity layer: Communication protocols such as MQTT enable the com-
munication between the individual elements and the cloud.
Cloud layer: This layer manages all the devices connected and the data gen-
erated by them. Developers can provide applications for the communication
between the heterogeneous devices that constitute the IoT environment and
derive knowledge based on data analytics.
MQTT [3] runs over TCP/IP, or over other network protocols that provide
ordered, lossless and bidirectional connections. It uses the publish/subscribe mes-
sage system combined with the concept of topics to provide one-to-many mes-
sage distribution. The message transport structure is agnostic to the payload
contained, i.e., the actual content that will be sent in the message.
Topics. MQTT applies topic-based filtering of messages with a topic being part
of each published message. The broker uses the topics to determine whether a
subscribing client should receive the message or not. Clients can subscribe to
as many topics as they are interested in. A topic consists of one or more topic
levels. Each topic level is separated by a forward slash (topic level separator).
102 PNSE’18 – Petri Nets and Software Engineering
This topic structure keeps a tree hierarchy, so clients can subscribe to specific
topics, levels, and groups of topics easily.
Figure 1 shows an example for a possible topic distribution for handling some
sensors in a house. If a client subscribes to the topic Home/BedRoom/temperature
it will only receive notifications from the temperature sensor in the bedroom.
If the subscription is made to the topic Home/+/humidity the receiver will get
messages from the humidity sensors in the house. Here, the +-wildcard allows
to subscribe in a single level of the topic hierarchy and as a result both the
BedRoom and LivingRoom matches into the pattern. A client subscribed to the
topic Home/# will get messages from all the devices in the house. Here, the #-
wildcard is used to subscribe to multiple levels.
At most once: (QoS level 0): The message is delivered according to the ca-
pabilities of the underlying network. No response is sent by the receiver and
no retry is performed by the sender. The message arrives at the receiver
either once or not at all. An application of this QoS level is in environ-
ments where sensors are constantly sending data and it does not matter if
an individual reading is lost as the next one will be published soon after.
At least once (QoS level 1): Where messages are assured to arrive, but du-
plicates can occur. It fits adequately for situations where delivery assurance
is required but duplication will not cause inconsistencies. An application
of this are idempotent operations on actuators, such as closing a valve or
turning on a motor.
Exactly once (QoS level 2): Where messages are assured to arrive exactly
once. This is for use when neither loss nor duplication of messages are ac-
Rodriguez et.al.: On Modelling and Validation of the MQTT Protocol 103
ceptable. This level could be used, for example, with billing systems where
duplicate or lost messages could lead to incorrect charges being applied.
When a client subscribes to a specific topic with a certain QoS level it means
that the client is determining the maximum QoS that can be expected for that
topic. When the broker transfers the message to a subscribing client it uses
the QoS of the subscription made by the client. Hence QoS guarantees can get
downgraded for a particular receiving client if subscribed with a lower QoS. This
means that if a receiver is subscribed to a topic with a QoS level 0, no matter if
a sender publishes in this topic with a QoS level 2, then the receiver will proceed
with its QoS level 0.
Figure 2 shows the top-level module of the CPN model which consists of two
substitution transitions (drawn as rectangles with double-lined borders) rep-
resenting the Clients and the Broker roles of MQTT. Substitution transitions
constitute the basic syntactical structuring mechanism of CPNs and each of the
substitution transitions has an associated submodule that models the detailed
behaviour of the clients and the broker, respectively. The name of the submod-
ule associated with a substitution transition is written in the rectangular tag
positioned next to the transition. The CPN model of the MQTT protocol con-
sists of 24 modules organised into six hierarchical levels. We have constructed
a parametric CPN model which makes it easy to change the number of clients
and topics without making changes to the net-structure. This makes it possible
to investigate different configuration of MQTT and it is a main benefit provided
by CPNs in comparison to ordinary Petri Nets.
As described in [15], an MQTT client can operate as a publisher or subscriber.
We use the term client to generally refer to a publisher or a subscriber. There is
no restrictions in terms of hardware to run as a MQTT client, and any device
equipped with a MQTT library and connected to a MQTT broker can operate
as a client. The MQTT broker [15] is the core of any publish/subscribe protocol.
Topics are the mechanism to filter messages in the MQTT protocol. A client
can either subscribe to a topic to receive messages or publish on a topic. The
broker is primarily responsible for receiving and filtering messages, deciding to
which clients they will be dispatched and sending them to all subscribed clients.
Another responsibility of the broker is client authentication and authorisation.
The two substitution transitions in Fig. 2 are connected via directed arcs
to the two places CtoB and BtoC. The clients and the broker interact by pro-
ducing and consuming tokens on the places. Figure 3 shows the central data
type definitions used for the colour sets of the places CtoB and BtoC and the
modelling of clients and messages. The colour sets QoS is used for modelling the
three quality of service levels supported by MQTT, and the colour set PID is
used for modelling the packet identifiers which plays a central role in the MQTT
protocol logic. It can be seen that we have abstracted from the actual payload of
104 PNSE’18 – Petri Nets and Software Engineering
Clients
Client
initMsgQueue() []
BtoC 1 1`[(client(1),[]),(client(2),[])] CtoB 1 1`[]
ClientxMessages BrokerxMessages
Broker
Broker
the published messages as these are not central for modelling the protocol logic.
For similar reasons, we also abstract from the hierarchical structuring of topics.
The places CtoB and BtoC are designed to behave as queues. The purpose
of this is to assure the ordered message distribution property specified in the
MQTT documentation. Even so, these two places are slightly different; while
CtoB is modelled as a single queue that the broker manages to consume messages,
BtoC is designed to maintain an incoming queue of messages for each client.
This construction assures that all clients will have their own queue, respecting
the ordered reception of messages. The function initMsgQueue() initialises the
queues according to the number of clients specified by the symbolic constant C.
The BrokerxMessages colour set for the CtoB place used at the bottom of Fig. 3
consists of a list of ClientxMessage which are pairs of Client and Messages.
We represent all the messages that the clients and the broker can use by
means of the Message colour set. We use the terms packet and message in-
distinguishably when we refer to control packets. The control information used
depends on the messages considered. As an example, a Connect message (packet)
does not contain control information, but a Publish message requires a specific
Topic, QoS, and PID. The Topic and QoS colour sets are both indexed types
containing values (topic(1), topic(2) ... topic(T) depending on the constant
T, and QoS(0), QoS(1) and QoS(2), respectively. The ClientxMessages colour
set for the BtoC place encapsulates all the queues (each one declared as a pair
of Client and Messages in the ClientxMessageQueue colour set) in one single
queue. This construction allows us to deal with the distribution of multiple mes-
sages in a single step in the broker side which in turn simplifies the modelling of
the broker and reduces the number of reachable states of the model.
The colour sets defined for modelling the client state are shown in Fig. 5. The
states of the clients are represented by the ClientxState colour set which is
a product of Client and ClientState. The record colour set ClientState is
used to represent the state of a client which consists of a list of TopicxQoS,
a State, and a PID. Using this, a client stores the topics it is subscribed to,
and the quality of service level of each subscription. The State colour set is an
enumeration type containing the values READY (for the initial state), WAIT (when
the client is waiting to be connected), CON (when the client is connected), and
DISC (for when the client has disconnected).
Below we present selected parts of the model by first presenting a high-level
view of the clients and broker sides, and then illustrating how the model captures
the execution scenario described in Section 3.1 where two clients connects, one
subscribes to a topic, and the other client publishes on this topic. The unsub-
scribe and the disconnection phases are not detailed due to space limitations.
Rodriguez et.al.: On Modelling and Validation of the MQTT Protocol 107
The ClientProcessing submodule in Fig. 6 models all the operations that a client
can carry out. Clients can behave as senders and receivers, and the five substitu-
tion transitions CONNECT, PUBLISH, SUBSCRIBE, UNSUBSCRIBE and DISCONNECT
has been constructed to capture both behaviours.
1`(client(1),{topics=[],state=READY,p
id=0})++
1`(client(2),{topics=[],state=READY,p
In/Out Clients 2 id=0})
ClientxState
CONNECT
CONNECT
PUBLISH
PUBLISH
SUBSCRIBE
SUBSCRIBE
UNSUBSCRIBE
UNSUBSCRIBE
DISCONNECT
DISCONNECT
ClientxMessages BrokerxMessages
The socket place Clients stores the information of all the clients that are
created at the beginning of the execution of the model. In this scenario there
are two clients, and the value of the tokens representing the state of the two
108 PNSE’18 – Petri Nets and Software Engineering
clients is provided in the green rectangle (the marking of the place) next to the
Clients place. The BtoC and CtoB port places are associated with the socket
places already shown in Fig. 3.
We have modelled the broker similarly as we have done for clients. This can be
seen from Fig. 7 which shows the BrokerProcessing submodule. The Connected-
Clients place keeps the information of all clients as perceived by the broker. This
place is designed as a central storage, and it is used by the broker to distribute
the messages over the network. The broker behaviour is different from that of
the clients, since it will have to manage all the requests and generate responses
for several clients at the same time.
Connected
1 1`[]
Clients
Out
ClientsxState
Process
CONNECT
ProcessCONNECT
Process
SUBSCRIBE
ProcessSUBSCRIBE
Process
PUBLISH
ProcessPUBLISH
Process
UNSUBSCRIBE
ProcessUNSUBSCRIBE
Process
DISCONNECT
ProcessDISCONNECT
1`[(client(1),[]),(client(2),[])]
In CtoB 1 1`[] Out BtoC 1
BrokerxMessages ClientxMessages
The first step for a client to be part of the message exchange is to connect to the
broker. A client will send a CONNECT request, and the broker will respond with a
CONNACK message to complete the connection establishment. Figure 8 shows the
CONNECT submodule in a marking where client(1) has sent a CONNECT request
and it is waiting (state = WAIT) for the broker acknowledgement processing to
finish such that the connection state can be set to CON.
Rodriguez et.al.: On Modelling and Validation of the MQTT Protocol 109
1`(client(1),{topics=[],state=WAIT,pi
d=0})++
1`(client(2),{topics=[],state=READY,p
In/Out id=0})
2
Clients
Receive Send
CONNACK CONNECT
outmsgs = []
[isClientState (cs,WAIT), [isClientState (cs,READY),
cs = (client(1),{topics=[],state=READY,pid=0})
nLR outmsgs]
hasCONNACK (cs,inmsgs)]
ClientxMessages BrokerxMessages
The broker will receive the CONNECT request. The broker will register the
client in the place ConnectedClients and send back the acknowledgement. Figure 9
shows the situation where client(1) is connected in the broker side and the
CONNACK response has been sent back to the client. The function connectClient()
used on the arc from the ProcessCONNECT transition to the ConnectedClients
place will record the connected client on the broker side. The last step of the
connection establishment will occur again in the clients side, where the transition
ReceiveCONNACK (in Fig. 8) will be enabled, meaning that the confirmation for
the connection of client(1) can proceed.
Connected 1`[(client(1),{topics=[],state=CON,pi
In/Out 1
Clients d=0})]
ClientsxState
clstates connectClient(clstates,c)
[cLR boutmsgs]
boutmsgs
msgs
1`(client(1),{topics=[],state=CON,pid
=0})++
1`(client(2),{topics=[],state=CON,pid
=1})
clientSubTopic(cs,getMsg(cs,inmsgs),listpids) 2 increasePID(cs)
Clients
In/Out
ClientxState
cs iSubscribe
cs can
1 1`QoS(2)
Subscribe
QoS
1`(client(1),[])++
2 qos
1`(client(2),[0])
initQueue()
Receive (c,listpids) (c,listpids)
PendingAcks [checkClientCON(cs),
SUBACK Send
nLR msgs, c = #1 cs,
(c,rmPid (listpids, (c,listpids^^[#pid (#2 cs)]) SUBSCRIBE
ClientxPIDs listpids = [],
[hasSUBACK(cs,inmsgs), getMsg (cs,inmsgs))) notSubscribed(t,cs),
(#1 cs) = c] subLR (#pid (#2 cs))]
1`[(client(2),SUBSCRIBE((topic(1),QoS
In BtoC 1 1`[(client(1),[]),(client(2),[])] Out CtoB 1
(2),0)))]
ClientxMessages BrokerxMessages
We show now the situation where the SUBSCRIBE request has been processed
by the broker as represented in Fig. 11. The function brokerSubscribeUpdate()
manages the subscription process, so if the client is subscribing to a new topic,
it will be added to the client state stored in the broker. If the client is already
subscribed to this topic it will update it. In the example, one can see that
client(1) keeps the same state, but client(2) has appended this new topic
to its list. The corresponding SUBACK message has been sent to client(2) (with
the PID set to 0) to confirm the subscription. Next, client(2) will detect that
the response has arrived and it will check that the packet identifiers correspond
to each other.
1`[(client(1),{topics=[],state=CON,pi
Connected
In/Out 1 d=0}),(client(2),{topics=[(topic(1),Qo
Clients
S(1))],state=CON,pid=0})]
ClientsxState
clstates brokerSubscribeUpdate(clstates,(c,t,qos))
1`[(client(1),[]),(client(2),[SUBACK((to
In CtoB 1 1`[] 1 BtoC Out
pic(1),QoS(1),0))])]
BrokerxMessages ClientxMessages
cs increasePID(cs)
1`(client(1),[(0,topic(1))])++
[hasPUBACK(c,inmsgs)] 1`(client(2),[])
initQueue()
(c,listpidsxtopics) 2 (c, listpidsxtopics)
receive (msgs^^[(#1 cs, PUBLISH(t,QoS(1), (#pid (#2 cs))))])
Publishing PUBLISH_QoS_1
PUBACK
(c, rmPidT ClientxListPIDxTopic msgs
(listpidsxtopics, [checkClientCON(cs),
(pgetMsg (c,inmsgs)))) (#1 cs, nLR msgs,
listpidsxtopics^^[((#pid (#2 cs)),t)]) epub 1, c = #1 cs,
pubLR (#pid (#2 cs))]
1`[(client(1),[]),(client(2),[])]
BtoC 1 1`[(client(1),PUBLISH((topic(1),QoS(1
1 CtoB In/Out
In ),0)))]
ClientxMessages
BrokerxMessages
for the original sender client(1) (PUBACK packet), and one for the only receiver
client(2) (PUBLISH packet).
To finish the process, client(2) will notice that there has been a message
published in topic(1). Since client(2) is subscribed to this topic with QoS(1),
it must send a PUBACK acknowledgement to the broker to confirm that it has
received the published message. Figure 14 shows the Receive_QoS_1 submodule
in the clients side. The transition Receive_QoS_1 has been fired meaning that
client(2) has received the publish message from the broker, and has sent the
corresponding PUBACK. When the broker detects the incoming PUBACK message,
it will check if there is some confirmation pending in the Publishing place (in
Fig. 13 where client(2) is waiting for a PID = 0 in topic(1) with QoS(1).
4 Model Validation
During development of the MQTT protocol model we used single-step and auto-
matic simulation to test the proper operation of the model. To perform a more
exhaustive validation of the model, we have conducted state space exploration
of the model and verified a number of behavioural properties.
We have conducted the verification of properties using an incremental ap-
proach consisting of three steps. In the first step we include only the parts related
to clients connecting and disconnecting. In the second step we add subscribe and
unsubscribe, and finally in the third step we add data exchange considering the
three quality of service levels in turn. At each step, we include verification of ad-
ditional properties. The main motivation underlying this incremental approach
is to be able to control the effect of the state explosion problem. Errors in the
model will often manifest themselves in leading to a very large state space. Hence,
by incrementally adding the protocol features, we can mitigate the effect of this
Rodriguez et.al.: On Modelling and Validation of the MQTT Protocol 113
1`[(client(1),{topics=[],state=CON,pi
Connected
d=0}),(client(2),{topics=[(topic(1),Qo 1 1`0
Clients
S(1))],state=CON,pid=0})]
In/Out In/Out BPID 1 1`1
ClientsxState
PID
clstates (bpid + 1)
bpid
bsendMsgs(boutmsgs,
((c,PUBLISH(t,QoS(1),pid))::msgs) brokerDispatchPublishQos1 (bpid, clstates, c, t, pid))
Process_QoS_1
msgs
boutmsgs
[cLR boutmsgs]
listcxlptq
brokerCreateACKWaiting(bpid, clstates, t, listcxlptq)
ListClientxListPIDxTopicxQoS boutmsgs
[createPublishQoS1 listcxlptq <> [],
nLR boutmsgs,timeout()]
listcxlptq brokerUpdateACKWaiting(c,pid,listcxlptq)
(c,PUBACK(t,pid))::msgs
ReceivePUBACK
msgs
1`[(client(1),[PUBACK((topic(1),0))]),(
1 client(2),[PUBLISH((topic(1),QoS(1),0)
)])]
BrokerxMessages ClientxMessages
1`(client(1),{topics=[],state=CON,pid
=1})++
1`(client(2),{topics=[(topic(1),QoS(1)
In/Out Clients 2 )],state=CON,pid=1})
ClientxState
cs
msgs
ClientxMessages BrokerxMessages
Step 1 – Connect and Disconnect. In the first step, we consider only the
part of the model related to clients connecting and disconnecting to the broker.
The state space in this step is rather small, and consists of only 33 states, 44 arcs,
and a single dead marking. We consider the following behavioural properties:
The two properties S1-P3 and S1-P4 imply partial correctness of the protocol
as it states that the protocol can always be terminated, and if it terminates, then
it will be in a correct state. The state space obtained in this step is acyclic which
together with S1-P3 implies the stronger property of eventual correct termina-
tion. This is, however, more a property how the model has been constructed as
in a real implementation there is nothing forcing a client to disconnect.
Step 2 – Subscribe and Unsubscribe. In the second step, we add the abil-
ity for the clients to subscribe and unsubscribe (in addition to connect and
disconnect from step 1). The state space when adding these features has 1716
states, 4412 edges, and a single dead marking. For subscribe and unsubscribe we
additionally consider the following properties:
Rodriguez et.al.: On Modelling and Validation of the MQTT Protocol 115
S2-P1-CanSubscribe For each of the clients, there exists states in which both
the clients and the broker sides consider the client to be subscribed.
S2-P2-ConsistentSubscription If the broker side considers the client to be
subscribed, then the clients side considers the client to be subscribed.
S2-P3-EventualSubscribed If the client sends a subscribe message, then even-
tually both the clients and the broker sides will consider the client to be
subscribed.
S2-P4-CanUnsubscribe For each client there exists executions in which the
client sends an unsubscribe message.
S2-P5-EventualUnsubscribed If the client sends an unsubscribe message,
then eventually both the clients and the broker sides considers the client to
be unsubscribed.
It should be noted that for property S2-P2, the antecedent of the implication
deliberately refers to the broker side. This is because the broker side unsubscribes
the client upon reception of the unsubscribe message, whereas the client side does
not remove the topic from the set of subscribed topics until the subscribe ac-
knowledgement message is received from the broker. Hence, during unsubscribe,
we may have the situation that the broker has unsubscribed the client, but the
subscribe acknowledgement has not yet been received on the client side.
Step 3 – Publish and QoS levels. In this step we also consider publication
of data for each of the three quality of service levels. As we do not model the
concrete data contained in the messages, we use the packet identifiers attached
to the message published to identity the packets being sent and received by the
clients. In order to reduce the effect of state explosion, we verify properties for
each QoS level in isolation. To make it simpler to check properties related to
data being sent, we record for each client the packet identifiers of messages sent.
For all three service levels, we consider the following properties:
We have presented a formal CPN model based on the most recent specification of
the MQTT protocol (version 3.1.1 [3]). The constructed CPN model represents
a step towards developing a formal and executable specification of the MQTT
protocol. For the validation of the model, we have conducted simulation and
state space exploration in order to verify an extensive list of behavioural prop-
erties and thereby validate the correctness of the model. In addition to aiding
in the development of inter-operable MQTT implementations, the CPN MQTT
Rodriguez et.al.: On Modelling and Validation of the MQTT Protocol 117
model may also be used to perform model-based testing of MQTT protocol im-
plementations following the approach presented in [17].
During our study of MQTT specification, we encountered several parts that
are vaguely defined and which could lead developers to different implementa-
tions. There is a gap in the specification with the lossless property in that the
MQTT protocol is described to run over TCP/IP, or over other transport pro-
tocols that provide ordered, lossless and bidirectional connections. However, the
QoS level 0 establish that message loss can occurs and the specification is not
clear as to whether this is related to termination of TCP connections and/or
clients connecting and disconnecting to the broker. Additionally, we found sev-
eral issues in the specification of QoS levels 1 and 2. As an example, it is specified
that the receiver (assuming the broker role) is not required to complete delivery
of the application message before sending the PUBACK (for QoS1) or PUBREC
or PUBCOMP (for QoS2) and the decision of handling this is up to the imple-
menter. Moreover, the documentation specifies that when the original sender
receives the PUBACK packet, ownership of the application message is trans-
ferred to the receiver, but it is unclear how to determine that the original sender
has received the PUBACK packet.
There exists previous work on modelling and validation of the MQTT pro-
tocol. In [11], the authors uses the UPPAAL SMC model checker [7] to evaluate
different quantitative and qualitative (safety, liveness and reachability) proper-
ties against a formal model of the MQTT protocol defined with probabilistic
timed automata. Compared to their work, we have verified a larger set of be-
havioural properties using the incremental approach adding more operations in
each step. In [14], tests are conducted over three industrial implementations of
MQTT against a subset of the requirements specified in the MQTT version 3.1.1
standard using the TTCN-3 test specification language. In comparison to our
work, test-based approaches do not cover all the possible executions but only ran-
domly generated scenarios. With the exploration of state spaces, we considered
all the possible cases. In [2], the authors first define a formal model of MQTT
based on timed message-passing process algebra, and they conduct analysis of
the three QoS levels. In contrast, our work is not limited to the publishing/sub-
scribing process, but considers all operations of the MQTT specification.
We see several directions for future work based on the result presented in this
paper. Currently, we have restricted the model to simplify the verification part
and reduce the effect of the state space explosion. We are currently investigating
how to lift some of these restrictions to conduct verification of additional scenar-
ios. Since our goal was to construct a complete model that covers all the MQTT
operations, we have abstracted some parts, e.g., the topics structure and the
payload of packets. We are considering how to incrementally add more details to
the model so it will be even closer to the MQTT specification. Also, the model
currently considers scenarios where the re-connection of clients is not taken into
account. We plan to extend the model so that re-connection and simulation of
persistence of data will be included, being able to also extend the behavioural
properties verified.
118 PNSE’18 – Petri Nets and Software Engineering
References
1. M. A. Adamski, A. Karatkevich, and M. Wegrzyn. Design of embedded control
systems, volume 267. Springer, 2005.
2. B. Aziz. A formal model and analysis of an IoT protocol. Ad Hoc Networks,
36:49–57, 2016.
3. A. Banks and R. Gupta. MQTT Version 3.1.1. OASIS standard, 29, 2014.
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html.
4. L. Baresi, C. Ghezzi, and L. Mottola. On accurate automatic verification of publish-
subscribe architectures. In Proceedings of the 29th international conference on
Software Engineering, pages 199–208. IEEE Computer Society, 2007.
5. J. Billington and M. Diaz. Application of Petri nets to Communication Networks:
Advances in Petri nets, volume 1605. Springer Science & Business Media, 1999.
6. S. Chen, H. Xu, D. Liu, B. Hu, and H. Wang. A vision of IoT: Applications,
challenges, and opportunities with china perspective. IEEE Internet of Things
journal, 1(4):349–359, 2014.
7. A. David, K. G. Larsen, A. Legay, M. Mikučionis, and D. B. Poulsen. Uppaal
SMC tutorial. International Journal on Software Tools for Technology Transfer,
17(4):397–415, Aug 2015.
8. J. Desel, W. Reisig, and G. Rozenberg, editors. Lectures on Concurrency and Petri
Nets, Advances in Petri Nets, volume 3018 of Lecture Notes in Computer Science.
Springer, 2004.
9. P. T. Eugster, P. A. Felber, R. Guerraoui, and A.-M. Kermarrec. The many faces
of publish/subscribe. ACM computing surveys (CSUR), 35(2):114–131, 2003.
10. D. Garlan, S. Khersonsky, and J. S. Kim. Model checking publish-subscribe sys-
tems. In Intl. SPIN Workshop on Model Checking of Software, pages 166–180.
Springer, 2003.
11. M. Houimli, L. Kahloul, and S. Benaoun. Formal specification, verification and
evaluation of the MQTT protocol in the Internet of Things. In Mathematics and
Information Technology, pages 214–221. IEEE, 2017.
12. ITU-T. Overview of the Internet of things. https://www.itu.int/ITU-
T/recommendations/rec.aspx?rec=y.2060, 2012.
13. K. Jensen and L. Kristensen. Coloured Petri Nets: A Graphical Language for
Modelling and Validation of Concurrent Systems. Communications of the ACM,
58(6):61–70, 2015.
14. K. Mladenov. Formal verification of the implementation of the MQTT protocol in
IoT devices. Master thesis, University of Amsterdam, 2017.
15. MQTT essentials part 3: Client, broker and connection establishment.
https://www.hivemq.com/blog/mqtt-essentials-part2-publish-subscribe.
16. A. Rodriguez, L. M. Kristensen, and A. Rutle. Complete CPN model of the MQTT
Protocol. via Dropbox. http://www.goo.gl/6FPVUq.
17. R. Wang, L. Kristensen, H. Meling, and V. Stolz. Application of Model-based
Testing on a Quorum-based Distributed Storage. In Proc. of PNSE’17, volume
1846 of CEUR Workshop Proceedings, pages 177–196, 2017.
18. F. Wortmann and K. Flüchter. Internet of things. Business & Information Systems
Engineering, 57(3):221–224, 2015.
19. Y. Yoo, O. Henfridsson, and K. Lyytinen. Research commentary — the new or-
ganizing logic of digital innovation: an agenda for information systems research.
Information systems research, 21(4):724–735, 2010.
20. L. Zanolin, C. Ghezzi, and L. Baresi. An approach to model and validate publish/-
subscribe architectures. In Proc. of the SAVCBS, volume 3, pages 35–41, 2003.