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

Mental note: Make API operations async #22

Closed
karalabe opened this issue Mar 26, 2020 · 0 comments · Fixed by #25
Closed

Mental note: Make API operations async #22

karalabe opened this issue Mar 26, 2020 · 0 comments · Fixed by #25

Comments

@karalabe
Copy link
Member

Most API ops only touch the local database, remote sync is independent and happens in the background. This is good, we want eventual consistency. There are a few API calls that may also be pushed into the background (gateway startup, pairing startup). Although it's simpler to block, I agree that it can be problematic on the UI side if it has to wait indefinitely. Better to return fast if things look good, and provide a way to poll subsequently for eventual failures. It avoids having to mess with timeouts on the UI.

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 a pull request may close this issue.

1 participant