Memory efficient data structure for IoT?

Hi everyone,
What is the most memory efficent Redis data structure for an IoT app??

Regards

It depends on the shape of your data, if each event is just a single numeric value, then RedisTimeSeries.
If instead you have multiple properties, then it’s probably Redis Streams.

1 Like

Definitely agree with that assessment and with IoT you will likely end up using Redis Streams.

1 Like

@JRedis2020

It depends on what kind of data you are processing, attributes and data follow. few examples came in my mind:

  1. use case just ingesting IoT data and you may want to process the response. in this case Redis Streams might be good option:

XADD mystream * cpu-temp 23.4 load 2.3
β€œ1553097561402-0”
XADD mystream * cpu-temp 23.2 load 2.1
β€œ1553097568315-0”

  1. If the use case is for analytics then you can use RedisTimeSeries

TS.ADD temperature:2:32 1548149180000 26 LABELS sensor_id 2 area_id 32
(integer) 1548149180000
TS.ADD temperature:3:11 1548149183000 27 RETENTION 3600
(integer) 1548149183000
TS.ADD temperature:3:11 * 30
(integer) 1559718352000

  1. If are just storing IoT devices meta data as cache and not frequently going to change then you many use Hashes key per device and put all fields with respective fields.

Hope this helps. If you can describe your use case in more details, it will be easy to answer with better approach.

I’ve been studying a bit about Redis Edge and I find that it is working in conjunction with open source loT edges, which is designed so that we can all develop applications with LoT.

In addition to this, RedisEdge is available as a module for Azure LoT Edge, this makes it easier for developers to get the most out of Redis. These two combinations together are helping companies focus on information rather than managing data. Developers with this new tool can configure their solutions through containers and be monitored from the cloud.

It is a very interesting topic of which it would be good to create a new topic to create more in-depth analysis with the other members of the community.