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

Add delta support to orchestrator #1489

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lawik
Copy link
Contributor

@lawik lawik commented Sep 5, 2024

The primary point of this change is that it re-enables firmware delta
support.

It also tries to alleviate the need for generating a ton of unused
delta files.

It tackles this by doing something that has already been discussed
and which I think is generally agreed upon which is give the
orchestrator the job of telling a newly connected device to update.
That removes the instant update on connect. We could reintroduce a
mechanism for the orchestrator to react to new devices if we like.

When a device joins the channel it will report it's firmware version
to the orchestrator. This gives the orchestrator the chance to fire
off Oban jobs for new firmware deltas. At the same time it will store
a list of firmware versions that have been processed or are
processing. This alleviates the need for repeated lookups.

Firmware versions that are in processing are excluded from registry
lookups to distribute updates.

When deltas are done generating the orchestrator will receive an
event causing a refresh of the delta status state.

The primary point of this change is that it re-enables firmware delta
support.

It also tries to alleviate the need for generating a ton of unused
delta files.

It tackles this by doing something that has already been discussed
and which I think is generally agreed upon which is give the
orchestrator the job of telling a newly connected device to update.
That removes the instant update on connect. We could reintroduce a
mechanism for the orchestrator to react to new devices if we like.

When a device joins the channel it will report it's firmware version
to the orchestrator. This gives the orchestrator the chance to fire
off Oban jobs for new firmware deltas. At the same time it will store
a list of firmware versions that have been processed or are
processing. This alleviates the need for repeated lookups.

Firmware versions that are in processing are excluded from registry
lookups to distribute updates.

When deltas are done generating the orchestrator will receive an
event causing a refresh of the delta status state.
@lawik
Copy link
Contributor Author

lawik commented Sep 5, 2024

This can be the start of discussion. I think this approach would work. My biggest concern is really that I didn't find any Orchestrator tests?

And that makes groking how it operates difficult.

@oestrich
Copy link
Contributor

oestrich commented Sep 5, 2024

Yeah the orchestrator was created with a lot of nerves vms going and tested manually, along with the integration level of testing in websockets_test.exs.

This is all going to be rewritten very shortly anyways, it's my next step once we get #1476 in. There's a lot of people in smartrent that would like all of this queue shaped so that's what I was going to do next. I'm not sure if it makes more sense to get this in now or wait until after this has been rewritten 🤷

@lawik
Copy link
Contributor Author

lawik commented Sep 5, 2024

Here is where I think we need to coordinate. We have a lot of plans for deployments with NervesCloud and the health information from devices.

If we actually synced up about what you are trying to do for SmartRent right now we could take a load off you and you from us potentially. Rather than what I think will happen now which is arguably working redundantly on the same stuff.

@lawik lawik removed the request for review from oestrich October 24, 2024 09:47
@lawik
Copy link
Contributor Author

lawik commented Oct 24, 2024

@jjcarstens this is delta support for the current orchestrator, is this worth updating and getting done or should we be focusing on the new variant of firmware orchestration you think?

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

Successfully merging this pull request may close these issues.

2 participants