Hacker News new | ask | show | jobs
by tony-allan 933 days ago
I like the idea of using Websockets for IoT devices if you just need a simple communication mechanism.

I wouldn't do it at scale. Message brokers are battle-hardened for messages at scale, have multiple communication styles, especially pub/sub. They are built for messages at scale.

My interest in Websockets is the same as yours — fewer components (no MQTT server). Works well for a simple message flow and I'm ok with reenventing pub/sub for a small number of devices.

1 comments

You might be right about scale, but web servers already handle huge amounts of websockets, and already have complicated pub/sub schemes - think about a chat room for instance. I am using Django Channels which lets you define groups that other channels can subscribe to, and I'm sure other web frameworks have similar things. It seems easier to use than MQTT topics because it's all there right inside your webapp and DB, not on a seperate MQTT broker, this is the main thing that's attracting me to the idea.