0
0
IOT Protocolsdevops~20 mins

Client-server vs publish-subscribe models in IOT Protocols - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
IoT Communication Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding communication flow in client-server model

In a client-server model, which statement best describes how communication happens?

AClients publish messages to a broker, which then forwards to servers.
BServers broadcast messages to all clients without waiting for requests.
CClients send requests directly to servers, and servers respond only to those requests.
DClients and servers communicate through a shared message queue without direct requests.
Attempts:
2 left
💡 Hint

Think about who initiates communication and who responds in client-server.

🧠 Conceptual
intermediate
2:00remaining
Role of broker in publish-subscribe model

What is the main role of the broker in a publish-subscribe messaging model?

AIt stores and forwards messages from publishers to subscribers based on topics.
BIt directly connects each publisher to every subscriber without intermediaries.
CIt acts as a server that responds to client requests for data.
DIt encrypts messages to secure communication between clients.
Attempts:
2 left
💡 Hint

Consider how messages reach subscribers in publish-subscribe.

💻 Command Output
advanced
2:00remaining
Output of MQTT client subscribing to a topic

Given an MQTT client subscribing to topic 'home/temperature', what output will it show when a message '22°C' is published to that topic?

IOT Protocols
mqtt_subscribe('home/temperature')
# Message published: '22°C'
AReceived message on 'home/temperature': 22°C
BError: Topic 'home/temperature' not found
CNo messages received
DReceived message on 'home/humidity': 22°C
Attempts:
2 left
💡 Hint

Think about what happens when you subscribe to a topic and a message is published to it.

Troubleshoot
advanced
2:00remaining
Troubleshooting message delivery failure in publish-subscribe

An MQTT subscriber is not receiving messages from the broker. Which of the following is the most likely cause?

APublisher is sending messages to a different protocol.
BBroker is down but subscriber still receives messages.
CSubscriber is sending requests directly to the broker.
DSubscriber did not subscribe to the correct topic.
Attempts:
2 left
💡 Hint

Check the topic subscription carefully.

Best Practice
expert
3:00remaining
Choosing between client-server and publish-subscribe for IoT devices

For a large network of IoT sensors sending data to multiple monitoring systems, which communication model is best and why?

APublish-subscribe, because it requires sensors to manage connections to each monitoring system.
BPublish-subscribe, because it decouples senders and receivers and scales well with many clients.
CClient-server, because it allows sensors to broadcast data to all monitoring systems simultaneously.
DClient-server, because it ensures direct communication and reduces message overhead.
Attempts:
2 left
💡 Hint

Consider scalability and decoupling in large IoT networks.