I recently read a Quora question about whether CoAP or MQTT is more lightweight, but the answers don't seem particularly satisfying and all contradict each other: the top answer says MQTT takes fewer resources, and another below that says CoAP is less demanding.
From what I've found, it would make sense that CoAP would be less demanding than MQTT, since CoAP only requires UDP, and its messages are mainly fire-and-forget, unlike MQTT which functions over TCP (and hence would be much more involved).
Which protocol requires the least resources to function?
By resources, I'm primarily thinking of required processor power, RAM and data to be transmitted. For example, in the Quora question I linked, the top answer points out that a simple ESP8266 chip could run MQTT, which only has a 80MHz processor and less than 1MB of RAM. I'm curious as to whether CoAP could run on something like this, or an even more constrained environment.
The sort of use case I'm envisaging is where the device would mostly be receiving data from another device (e.g. commands to switch on/off), but may need to infrequently (perhaps a few times an hour) send updates with the device's status. I'd like to use as little processing power as possible to reduce device costs, and transmit relatively infrequency to reduce power usage as much as possible.