HACKER Q&A
📣 alfor

What software do you use for IoT devices and server


We build Iot devices with a missmatch of rest api call, websockets, MQTT, databases, etc.

As I dig more into the code I find crazy DB polling to get changes pushed to devices.

There must be a better way, do you use realtime databases, synchronized objects, MQTT?

How do you keep the architecture simple, reliable and realtime with a big fleet of devices.

Our devices are full linux systems, we use a mix of NodeRed, Python, fastapi, VueJS, MongoDB, Postgres, MQTT for our software.

What tools help you out in the long run and wich ones let you down?


  👤 tamimio Accepted Answer ✓
It totally depends on what IoT and what purpose, for example:

IIoT/PLC/industrial automation: most likely you will have to use vendors software, most if the time it’s crap, and a mix of several tech stacks like MSSQL/C#/C++

Sensors and such: depends on what are you building or using the sensors: the protocol mostly is MQTT, and if you would store it in a db postrrsql, elasticsearch, surreldb, influxdb among the most I used.

Robots/drones: on what I build, I use protobuf/grpc for performance and cross-language and direct linux socket io, and where needed websocket but mostly for any web interaction rather than the protocol itself. The tech stack for those, the embedded side is up to you or sometimes based on the sdk you are dealing with, the backend/frontend however, I used to use go/nodejs and for frontend svelte or a simple js library/framework, but recently I’m shifting and redoing everything in rust, embedded, backend and frontend (using something like egui https://github.com/emilk/egui).

When it comes to IoT, I try as much as possible to stay away from python unless you are scripting something else done in go/c++/rust, look at python as a glorified bash script, it’s useful for that or other data science work, but not in IoT.

Same goes with other tech you mentioned, it might suit one case but not another, for example, MQTT is good for sensor IoT type, but good luck controlling a drone with it, mongodb might be great to store a fleet of robots with its access credentials and such, but if you try to use it to store realtime data, it might not perform as expected, and so on.


👤 francoismassot
On the storage part, quickwit, an OSS search engine, can also be an option (disclaimer: I work there).