Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShadowManager: Use Assigned Devices for Shadow sync from Cloud -> Greengrass #125

Open
1 of 2 tasks
cBiscuitSurprise opened this issue Aug 26, 2022 · 4 comments
Open
1 of 2 tasks
Labels
enhancement New feature or request

Comments

@cBiscuitSurprise
Copy link

Feature Description
Specialize the ShadowManager at runtime (specifically for Cloud -> Core shadows).

Also see brief discussion on re:Post

Use Case
The ShadowManager currently requires explicitly calling out every shadow to sync from Core -> Greengrass. This seems acceptable when targeting a single Greengrass-Instance with a handful of devices, but when targeting a group of instances or an instance with a lot of devices, this becomes cumbersome and may push the limits of configuration-document size. We're in search of a configuration that's generic at the group level, and defer the specialization to runtime, once the component is on an instance.

Proposed Solution
Each core device already has an Associated client devices list which could be used to allow the ShadowManger to specialize itself to each core device at runtime.

I'd expect a configuration like:

{
    ...
    "synchronize": {
        "assignedDevices": {
            "classic": true,
            "namedShadows": [ ... ],
        }
    }
    ...
}
  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@jbutler
Copy link
Contributor

jbutler commented Aug 26, 2022

Hey @cBiscuitSurprise , thanks for opening this issue.

Being able to automatically sync the classic shadows for associated client devices makes sense to me. Some portion of that functionality would likely live in our Client Device Auth component, but we can start the discussion here.

For named shadows, are you expecting all your client devices to have named shadows with the same name?

@cBiscuitSurprise
Copy link
Author

We're not currently using named shadows. But trying to put myself in someone's shoes that is, I'd imagine it could go either way.

{
    ...
    "synchronize": {
        "assignedDevices": {  # example: ["thingA", "thingB"]
            "classic": true,
            "namedShadows": ["commonNamedShadow"],
        }
        "shadowDocuments": [
            {
                "thingName": "thingB",
                "classic": true,
                "namedShadows": ["specialNamedShadowJustForB"]
            }
        ]
    }
    ...
}

So in that example whatever is in shadowDocuments would overlay on top of what's defined on assignedDevices. I guess the question you're asking though is then namedShadows a union or just an overwrite of whats in shadowDocuments... I can't answer that. Initially, I'd guess it's a union and if commonNamedShadow doesn't exist, that's already error-handled, so things would "just work" (?).

@jbutler jbutler added the enhancement New feature or request label Aug 26, 2022
@ArvinSpace
Copy link

请问这个功能增强发布了吗?
我现在需要配置一组不同物品名称的客户端设备影子同步,但是我不想指定每个物品名称,请问可以做到吗?

@MikeDombo
Copy link
Member

@ArvinSpace. This issue is still open, it is not implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants