0
votes

We are building an application, where IoT devices (temperature sensor) will be pushing data to Azure IoT Hub.

And there would be a webjob which will be reading this data and pushing it in database (after rolling it up along with raw). We also need a feature on web application, where a user can subscribe to any room/area and we need to push current temperature to his screen (whenever it changes). And this is required only when user is on that screen.

We were planning to have redis pub/sub for this task. Webjob can publish this data to redis pub/sub (along with db). And webApplication will subscribe to Redis PubSub (only for the users who has subscribe to web server using signalR).

Any thoughts on this design? Is Redis PubSub is a good choice in this case?

1

1 Answers

0
votes

Usually I prefer to use message queue such as RabbitMQ to do such kind of work.

Redis do support pub/sub, and make it every simple and fast. It is a good choice if you ONLY NEED pub/sub.

RabbitMq, in another hand, has more feathers, and, for me it is easy to debug with.

What's more, you need to think more about high availability/persistence. For redis, you may need to implement it by yourself, but for message queue(s), they may already have solutions.