0

Hi everyone Im having the following issue with Google Cloud IoT specificly with the Registry Creation and subfolders:

I have a device with exactly 19 values to send and all are important now google let me create a registry with upto 10topics/subfolders

the original idea [IDEA] was to use a structure like so:

  • topics/PowerMeter/PM1/v1
  • topics/PowerMeter/PM1/V2
  • topics/PowerMeter/PM1/v3
  • topics/PowerMeter/PM1/C1
  • topics/PowerMeter/PM1/C2
  • topics/PowerMeter/PM1/C3
  • ....and so on for 19 values of /PM1/

the question... is it a good practice to send a bunch of values packed in a payload to then process in the cloud? or is it best to have all separated in topics?...

i understand that cloud functions gets more expensive as the time elapsed to acomplish the task is greater, so maybe separate in topics should be ok?

if so, how to do it? there is just 10 topics/subfolders to work with....

then how to handle alarms with the same subfolders? i need some kind of guidance about this little proyect maybe google documentation confused me?

anyway anyone your help is very very appretiated

4

1 回答 1

1

Now that I've gotten clarity from the comment, I'd definitely have all the values in one json blob, use a single cloud function to parse and move to storage. The amount of process time to handle 19 values vs 1 value each is going to be much smaller compared to spinning up 19/20 individual functions for sure. Even if there's a good amount of work that's done with the data, you're likely paying this cost in each individual function anyway. From an infrastructure standpoint, managing one vs 20 will be much easier/better as well.

于 2019-02-04T22:00:31.287 回答