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

Asynchronous updates from API server #22

Open
bodom0015 opened this issue Apr 5, 2016 · 2 comments
Open

Asynchronous updates from API server #22

bodom0015 opened this issue Apr 5, 2016 · 2 comments

Comments

@bodom0015
Copy link
Member

Currently, when performing a start/stop the "Auto Refresh" functionality is enabled. This simply performs a GET on the following 2 URLs every 1-2 seconds:

  • /projects/{project-id}/stacks
  • /projects/{project-id}/volumes

While this usually works well enough, I have a strong suspicion that this is related to some of the quirks that the UI experiences (such as issue #21).

The current scheme also does not cover the case of multiple users editing the same project. For example: let's say users A and B are both logged into the same project. User A adds a stack slightly before user B adds their stack.

User A will only see the stack that they created, and not User B's stack, due to the race condition.
User B, however, will see both stacks since a successful POST leads to soft refresh that will retrieve both created stacks.

Ideally, we should investigate asynchronous technologies (i.e. WebSockets) to handle this behavior.

@bodom0015
Copy link
Member Author

gRPC was brought up as a potential technology that could handle this sort of communication. Unfortunately http://www.grpc.io/faq/ states the following:

Can I use it in the browser?

"Not yet. This is an area that's being actively explored and we welcome feedback and contributions. There is node.js support for server side JavaScript."

@bodom0015
Copy link
Member Author

Things like https://github.com/sercand/grpc-angular have been popping up lately... it's only a matter of time before we can find something suitable.

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

No branches or pull requests

1 participant