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

Make it possible to listen for events #345

Open
cryptobench opened this issue Sep 20, 2024 · 3 comments · May be fixed by #346
Open

Make it possible to listen for events #345

cryptobench opened this issue Sep 20, 2024 · 3 comments · May be fixed by #346

Comments

@cryptobench
Copy link
Member

For the Golem Stats page we're scanning the relay's list of nodes and querying each individual one to confirm whether or not they are still online.

This is done in intervals of 30 seconds currently because we want as accurate a measure as possible with minimal risk of not spotting if a node goes down for a few seconds and then connects back again.

The main issue here is that it's a "best possible scenario" rather than a foolproof solution. If the relay allowed us to listen for events (SSE) about changes in connections from nodes, then we would be able to instantly identify these changes and display them on our stats page and that would provide a very great experience for our users.

Another reason why this is a great idea is that instead of having the stats page + reputation system send thousands of requests to confirm if a node is still online, then it could simply just listen and monitor for changes in the relay. Instead of producing thousands of requests, then it would probably just be a few requests a minute given that 70% of our network has an uptime between 90-100%.

Furthermore the stats page would serve as a solution to a users request like this one below because it can immediately see this.
image

@frozenmafia
Copy link

Hi @cryptobench , Here are the changes I made solve the problem https://github.com/anchalshivank/ya-relay/tree/feature/add-sse-support

@frozenmafia
Copy link

I think I am removed from the community.

@cryptobench
Copy link
Member Author

@frozenmafia Hey bud, sorry about that. I see that one of the bots banned you for your links.

I have removed the ban and informed the team about the issue with the bot. You can join again using https://chat.golem.network

@cryptobench cryptobench linked a pull request Sep 26, 2024 that will close this issue
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.

2 participants