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

Subscribe to Events #6643

Open
MariusVanDerWijden opened this issue Nov 3, 2020 · 0 comments
Open

Subscribe to Events #6643

MariusVanDerWijden opened this issue Nov 3, 2020 · 0 comments
Labels
Component / API Issues that relate the the APIs Raiden provides. Flag / Usability Type / Enhancement

Comments

@MariusVanDerWijden
Copy link

Abstract

It would be great to get notified of incoming payments or other important events.

Motivation

Setting up subscriptions is currently not possible which is unfortunate.
It would be great to get notified by incoming payments.
Ideally this would be done over websockets, as they support subscriptions.
I know that this is not possible in REST API's but I thought of the following scheme:

Specification

User could set up subscriptions by calling a rest endpoint setup with the filters that they want to set up.
The call returns a unique id. The user can then call the /all/id endpoint or something similar to query everything that matches their filter.
They can also call /new/id to get all the new transactions/events that matched the filter since the last call.
Doing so would greatly improve the UX of the REST API.

Backwards Compatibility

Introducing two new endpoints setup and /all/id would not impact the REST API for any other methods. Internally all new events would need to be checked against a queue of filters which could probably impact performance a bit, but I think that's worth it for the support of subscriptions.

@konradkonrad konradkonrad added Component / API Issues that relate the the APIs Raiden provides. Flag / Usability Type / Enhancement labels Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component / API Issues that relate the the APIs Raiden provides. Flag / Usability Type / Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants