0

Scalability
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Scalability

by wickedbeernut on Mon Dec 24, 2018 11:25 am

I have a basic scalability question. Let's assume ...

    I have an IoT "thingy" with one property I'd like to monitor and one property I'd like to control.
    I create a group corresponding to each property.
    The feed key associated with each group (e.g., "1") represents a thingy identifier.
My groups / feeds look like this,

    /feeds/monitor-property.1
and,

    /feeds/control-property.1
Furthermore, let's assume,

    I create a dashboard.
    I add a Gauge block and associate it with the monitor property group / feed.
    I add a Slider block and associate it with the control property group / feed.
Everything works great! But what if I have 1,000 of these thingies?

When I power-up a new thingy for the first time and it publishes a property, io.adafruit.com automatically creates the corresponding feed and adds it to the appropriate group. That's pretty cool! Upon power-up, my 1,000 thingies each publish the monitor property and control property resulting in the automatic creation of 2,000 feeds,

    /feeds/monitor-property.1
    /feeds/monitor-property.2
    ...
    /feeds/monitor-property.1000
and,

    /feeds/control-property.1
    /feeds/control-property.2
    ...
    /feeds/control-property.1000
My question is ... how do I graphically manage (monitor and control) 1,000 instances of my thingy? I don't want to manually add 1,000 Slider blocks and 1,000 Gauge blocks to my dashboard and manually associate each with the corresponding group / feed.

Have I structured the groups / feeds appropriately?

Is there a way to graphically / dynamically select the feed key associated with a block at run-time? In other words, I would have one Gauge block and one Slider block on my dashboard and I'd select the feed key corresponding to the thingy I want to monitor and control from, say a drop-down menu.

Is there a way to programmatically add blocks to a dashboard? In other words, when I power-up a new thingy, a new Gauge block and Slider block would be automatically added to my dashboard and associated with the new feeds?

This would seem to be a rather typical (albeit hypothetical) IoT usecase. I don't intend to use io.adafruit.com with 1,000 thingies. However, I would like to understand how io.adafruit.com scales to, say a few dozen thingies. I'm sure this is just a lack of understanding on my part.

Joe

wickedbeernut
 
Posts: 10
Joined: Wed Jun 22, 2016 1:20 pm

Re: Scalability

by brubell on Thu Dec 27, 2018 5:40 pm

My question is ... how do I graphically manage (monitor and control) 1,000 instances of my thingy? I don't want to manually add 1,000 Slider blocks and 1,000 Gauge blocks to my dashboard and manually associate each with the corresponding group / feed.


You mentioned a dozen, so let's use that as an easier number to manage and scale for this question.

Button/Sliders would be a pair as a group, you can add 6 groups per dashboard. Therefore, you'd have two separate dashboards - one for each group.

Have I structured the groups / feeds appropriately?

I think so, can't think of a better way...


Is there a way to programmatically add blocks to a dashboard? In other words, when I power-up a new thingy, a new Gauge block and Slider block would be automatically added to my dashboard and associated with the new feeds?


You can control the dashboard using the Adafruit IO HTTP API: https://io.adafruit.com/api/docs/#tag/Dashboards

brubell
 
Posts: 282
Joined: Fri Jul 17, 2015 10:33 pm

Re: Scalability

by wickedbeernut on Fri Dec 28, 2018 2:50 am

Thank you, brubell.

Button/Sliders would be a pair as a group, you can add 6 groups per dashboard. Therefore, you'd have two separate dashboards - one for each group.


Are you suggesting there's an Adafruit.io construct to group blocks? Or are you simply suggesting I can manually add some number of Gauge blocks and Slider blocks (Gauge / Slider block pairs) to each of potentially many dashboards (and manually associate each block with the corresponding group / feed)? This "scales" a little better than manually adding all of the blocks to a single dashboard, but not much. I'm still having to manually add each block and associate each block with a group / feed.

All of the Gauge blocks are exactly the same. The group associated with each block is exactly the same. They only differ in terms of the feed. The same is true of the Slider blocks. I'm adding the same blocks over and over and over again (regardless of whether it's one dashboard or 100 dashboards) when all I really need to do is select the feed associated with a single pair of Gauge / Slider blocks at run-time.

With regards to your suggestion ...

Is there a way to select a different dashboard in the dashboard full screen view (e.g., a drop-down menu)? Or do I need to exit the dashboard full screen view, go to the dashboards page, select the desired dashboard and re-enter the dashboard full screen view?

I appreciate your help,

Joe

wickedbeernut
 
Posts: 10
Joined: Wed Jun 22, 2016 1:20 pm

Re: Scalability

by brubell on Fri Dec 28, 2018 11:56 am

Are you suggesting there's an Adafruit.io construct to group blocks


You can't group blocks, but dashboard elements can be different groups.

ie: gauge1 corresponds with Group1/EnergyValue, gauge2 corresponds with Group1/HumidValue. You can move them to different parts of the dashboard.


Is there a way to select a different dashboard in the dashboard full screen view (e.g., a drop-down menu)? Or do I need to exit the dashboard full screen view, go to the dashboards page, select the desired dashboard and re-enter the dashboard full screen view?

There's not currently a way of navigating thru dashboards without navigating through the site, I passed that idea you had (re; dropdown) on to the team.

brubell
 
Posts: 282
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.