I want to connect a local system to the Cloud using an extra device like an ESP or Raspberry Pi. What would you prefer? Embedded RTOS (running on the ESP32) or a full GOS like Alpine Linux(running on the Pi 4)? It only has to handle some UART reading, a bit of string modification and a MQTT connection to the cloud. Honestly I don't think I need a full blown GOS for that. It also would make the system more complicated and increase the fault surface. Am I missing some points?
I'd be looking at microPython on an ESP - programming is simple; you get easy access to the GPIO/UART/etc; there are MQTT libraries; and the software & platform will be stable. What's not to like?<p>If you go for the Linux/Raspberry option, the coding will be of similar difficulty (perhaps a fraction easier). But Linux / RaspberryPiOS puts you on the never-ending upgrade and security path. There's not much in the way of attach surface on an ESP, but a Pi needs more thought. Especially as (over time) the little Pi is likely to acquire more complex apps ... a web front-end would be tempting :) ... but then you have to upgrade a webserver, and keep all the libraries up-to-date...<p>Keep it simple.