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

Create a tracked "Session ID" and broadcast function to resolve 'multi-device state-races' #158

Open
Scottapotamas opened this issue May 24, 2019 · 1 comment
Assignees

Comments

@Scottapotamas
Copy link
Collaborator

This is some kind of ephemeral volatile value the UI sends after successful handshake.
When the microcontroller resets, this goes to zero, and the UI can then know if the device state needs to be refreshed.

There needs to be a function for event-based "wants to change the sessionID" which is called by a different instance of the UI (think mobile+pc at once).

When the even comes in, the new sessionID needs to be sent to all interfaces (and then handling disconnected interfaces is a developer side output problem).

@Scottapotamas Scottapotamas self-assigned this May 24, 2019
Scottapotamas added a commit that referenced this issue May 28, 2019
Session ID allows UI's to track 'who' holds the current session.
Broadcasts allow other interfaces to know when someone else has jumped on.
Covers functionality as part of #158
@Scottapotamas
Copy link
Collaborator Author

Questions that need to be resolved/cleared up:

  • How much entropy is needed in the session ID value
  • Does this work (untested)
  • How well does this solve the issues

Probably needs electricui-interface#569 to be partially implemented to evaluate.

@Scottapotamas Scottapotamas added this to the Pre-Release Polish milestone Jul 2, 2019
@Scottapotamas Scottapotamas removed this from the Fuck it, ship it milestone Nov 18, 2019
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

No branches or pull requests

1 participant