What is the indication of using Redis with Iots?

Asked

Viewed 81 times

0

I have in my hands a project of integrating devices from a company to a web platform. This video shows a general idea of the project.

These are various machines, which send information (status, temperature, speed, ..., etc.) to a central server, (a Mysql database). And from another direction, these machines are instructed by various users to: stop a process in progress, slow down or increase speed, decrease temperature, ... etc.

My job is to integrate this architecture on the web, in real time, as in the video I showed above.

Receiving the real-time information from the machine and displaying it in the browser is done. I basically used Mysql + SSE + PHP + Bootstrap. TBM can interact tone tablets and smart phones. This is already done.

My doubt lies in the direction Browser ==> Devices.

In the current architecture this process goes through REDIS. As I never worked with this technology I went to do a research and found this website which shows some applications. I’m wanting to leave the whole process using Mysql and abandon Redis. To do this I need to understand the importance of this technology in Iot projects, to know if Mysql will respond to needs.

As far as I understand it, it is a very sweaty Nosql database for cache.

But I can’t see where Redis is important in Iot development.

Someone who has worked with these two Iot and Redis technologies, could explain to me?

1 answer

0

Redis has I/O faster because it gets everything in memory, but because of this it is not suitable if you need to persist this data (but there are ways to write to disk). Usually it is not necessary to record data history on Iot projects, just transfer messages as quickly as possible.

For example if you are going to use a pi Raspberry and keep writing in his SD, it will wear out fast. An HDD requires much more power, few embedded equipment uses HDD and even then Hdds eventually fail and need to be replaced. It is unusual to replace embedded device parts.

However you can use Mysql too, with a table using Myisam engine, which leaves everything in memory. But you said you already have a server, I don’t know if this fits in Iot. You included a video with a toy train, I can’t imagine how that relates to your project.

But that’s it: redis is fast and not persistent. Iot uses a lot of redis because it consumes few resources, but obviously has less functionality than a RDBMS. If you have a large server, you have the resources to leave a persistent data structure and use less cost-effective tools.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.