Application Protocols · Study deck
Application Protocol Roles
A soil sensor can have a working radio route and still lack a usable conversation with an irrigation service.
Broker Bex is your guide for this deck.

After studying this chapter
Learning objectives
Choose each application conversation from its meaning, constraints, and required evidence.
- Network delivery carries bytes; application rules give those bytes meaning.A moisture reading needs shared units, observation time, and error meanings even when the radio route already works.
- Different conversations need different delivery behaviour.The building monitor separates room telemetry, device configuration, live operations, and enterprise work into distinct communication flows.
- Gateway translation can change identity, payload meaning, and delivery evidence.The cloud may see the gateway, the original device, or both, so permissions must match the identity crossing the boundary.
- A protocol choice needs evidence for failure and recovery.The valve trial repeats an identifier, removes the route, and checks that old observations retain their original times.
Major section
Follow Meaning Above the Network Route
This selection funnel starts with Interaction pattern; follow Budget and Semantics before comparing protocol candidates.
- The interaction stage identifies the conversation before comparing protocols.The funnel separates requests, published events, observation, and streaming because each pattern needs different replies and delivery behaviour.
- The budget stage checks device and network constraints.Sleep, headers, handshakes, loss, and reachability affect whether a constrained device can complete the chosen exchange.
- The semantics stage defines names and shared message meaning.A topic or URI, delivery rule, schema, and error contract can establish how the receiver should interpret the arriving payload.
- Candidate cards remain subject to the security contract.MQTT brokered events and CoAP constrained requests become candidates only after interaction, budget, and meaning have been established.
Major section
The moisture probe’s conversation contract
The moisture probe needs a conversation contract beyond its small payload.
- A small payload still needs a defined interaction.The moisture probe sends a 90-byte reading every five minutes, but reachability and freshness determine the appropriate conversation.
- Requests and publication distribute readings differently.A service can request current state, while a broker can fan one published observation out to archive and alarm consumers.
- Observation keeps an interested client updated as state changes.This option differs from an isolated request because the application maintains updates for the client following the probe.
- Failure tests must leave visible and safe outcomes.Repeated identifiers need duplicate-safe handling, missing routes need visible timeout or queueing, and delayed readings need their original observation times.
Major section
A peer request through the root
This RPL diagram traces a peer request; follow E through B to root A and back toward F.
- The peer request travels from E through B to root A.In the non-storing RPL example, a request between peers first climbs toward the root instead of taking a direct application path.
- Root A writes the source route back through B to F.The complete E → B → A → B → F journey includes a return through B before the request reaches its peer.
- The indirect route changes delay, packet space, and failure evidence.Source-routing information and constrained hops belong in the protocol budget even when the application sends only one CoAP request.
- A working route still needs an application conversation contract.The path cannot decide whether the arriving bytes describe moisture, a valve command, or an error requiring an operator response.
Major section
The protocol selection record
This record pairs protocol roles above with evidence prompts below; start with HTTP, CoAP, MQTT, and AMQP.
- The upper examples connect protocol families to distinct roles.HTTP links dashboard resources, CoAP serves constrained requests, MQTT distributes fleet telemetry, and AMQP carries service work through a durable queue.
- Flow and Participants establish the communication boundary.The record names the message role and the device, gateway, broker, service, browser, or operator involved in that exchange.
- Delivery, Payload, and Trust define what must survive translation.Schema, units, naming, authorization, and any identity change at the gateway determine whether the receiver can use the message correctly.
- The Evidence box makes the selection reviewable.A trace, failure test, security profile, owner, and review date let the team reopen the decision when the flow changes.
Activity 1 · Match
✎ Match the conversation role

I want you to match the conversation before you choose a favourite protocol.
On paper, match HTTP, CoAP, MQTT, WebSocket, and AMQP to web resource access, constrained requests, brokered telemetry, live duplex updates, and durable service work. Add one failure test for the valve-command flow.
4 minutes · Pen and paper · Answer: Activity 1
Major section
Summary
Protocol fit belongs to each communication flow and its evidence requirements.
- The interaction pattern determines which protocol roles deserve comparison.The building monitor uses separate records for room telemetry, configuration, live operations, and enterprise work instead of choosing one universal protocol.
- Names, schemas, units, and timestamps establish shared interpretation.The 90-byte moisture fixture must arrive with the same decoded value, unit, and observation time at the consumer.
- Gateway boundaries need checks for identity and delivery changes.A local retry can become broker delivery or durable queueing, while logs must still connect the cloud symptom to the device exchange.
- One product can use several application protocols.MQTT telemetry, HTTP administration, WebSocket dashboard state, and AMQP enterprise work address different conversations within the same system.
Deck summary
Key takeaways
A successful exchange must preserve the intended meaning and leave useful failure evidence.
- A working network path does not prove shared message meaning.The soil sensor still needs agreed names, replies, errors, and representation rules before its data supports the irrigation service.
- An acknowledgement does not prove that a valve reached its target.Protocol success can confirm an exchange while the physical outcome still requires separate application evidence.
- Duplicate handling, authorization, and freshness belong in the contract.The valve trials repeat a command identifier, attempt an unauthorized operation, and restore connectivity with old observations still clearly dated.
- Evidence and review triggers keep protocol choices accountable.Logs, traces, failure tests, and explicit ownership make the selection record useful when a communication flow or its operating risk changes.
Retrieval practice
Recall check 1 of 3

Broker Bex says: answer from memory, then check your reasoning.
Q1A team starts an IoT application design by saying, "Use MQTT everywhere because it is common." What is the strongest correction?
Show answer
Answer: A Protocol choice should follow the message role and review evidence, not popularity alone.
Retrieval practice
Recall check 2 of 3

Broker Bex says: answer from memory, then check your reasoning.
Q2A gateway publishes sensor readings to the cloud, exposes a local configuration API, and feeds a live browser dashboard. Which selection record is strongest?
Show answer
Answer: A A gateway can host several application protocol roles, and each role needs its own delivery and review evidence.
Retrieval practice
Recall check 3 of 3

Broker Bex says: answer from memory, then check your reasoning.
Q3A cloud service receives a command message, but the device performs the command twice after a reconnect. Which application-protocol contract should be reviewed first?
Show answer
Answer: A Duplicate command execution is an application-level delivery contract problem, not just a network reachability problem.
Print reference
Answers
Answer key.
- A · Protocol choice should follow the message role and review evidence, not popularity alone.
- A · A gateway can host several application protocol roles, and each role needs its own delivery and review evidence.
- A · Duplicate command execution is an application-level delivery contract problem, not just a network reachability problem.
Print reference
Activity 1 answer
Model answer.
Match: HTTP matches web resources; CoAP matches constrained requests; MQTT matches brokered telemetry; WebSocket matches live duplex updates; AMQP matches durable work. A valve-command test can repeat an identifier to check duplicate-safe handling, or remove the route and require visible timeout rather than false success.