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

Event-stream API for consumer state #1844

Closed
tadaskay opened this issue Mar 4, 2020 · 2 comments
Closed

Event-stream API for consumer state #1844

tadaskay opened this issue Mar 4, 2020 · 2 comments

Comments

@tadaskay
Copy link
Member

tadaskay commented Mar 4, 2020

Rationale

  1. Lots of polling needed to get the current state
  2. Lots of redundant endpoints (connection/ip, connection/location, etc)

Suggestion

Implement event-stream based API, similar to the one we have for the provider mode (/events/state). We might re-use existing https://github.com/mysteriumnetwork/node/blob/master/core/state/state.go#L56 by adding consumer state to it.

@tadaskay
Copy link
Member Author

We could also consider graphql: it supports queries and subscriptions using the same model. I think it would fit our use case perfectly.

@chompomonim
Copy link
Contributor

Let's do it in a similar way as event-streaming for providers. GraphQL is good idea, but it is expensive to rewrite all tequila and related packages that are using it. And supporting two different APIs doesn't sound as proper solution.

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

2 participants