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
Use the h3dex to find gateways in the selected hex for poc notifications #58
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a597941
Use the h3dex to find gateways in the selected hex for poc notifications
Vagabond dd427ec
pubsub POCs based on the hex GWs belong too
andymck 6632219
handle asserted gw msgs, resub to new location hex
andymck d9c98cf
Merge pull request #59 from helium/andymck/adt/find_poc_gateways_better
evanmcc File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see where you are going with this...the list here though will contain active and inactive GWs. As the inactive GWs wont likely have a streaming connection that is prob fine. Even if they do have a streaming connection but have not yet been reactivated via the HBs, it should still be fine as should they check with the challenger they will just get the usual not target response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said, we will be potentially sending a lot of additional notifications....via gateways for zone, we would be dropping hundreds of notifications over this...at most in the old way we would have 20 notifications per hex, now we will have many hundreds for the more populated hexes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we'd pub-sub on the h3 index, can we switch to doing that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah thats perfectly doable, the sub takes place in helium_stream_poc_impl:subscribe_to_events/1 whilst the pub takes place in sibyl_poc_mgr:run_poc_targetting/5. I can make that change later if you dont get to it
Going to reiterate the price for this is that end up sending potentially hundreds of extra notifications which themselves will result in same amount of additional API calls to durable validators and then all the same to the challenger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but don't we need to do this anyway? only the challenger knows what the entropy to pick the challengee is, we need to notify everyone in the hex?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at this I see why my PR was so confusing/hard to incorporate.
seems to me like we could make it a lot cheaper by doing cheap checks first. That said, here the cost isn't that bad, we're mostly concerned about expensive thing happening at validation time, so if we don't need to do this there, it's probably OK even if it's expensive. I might misunderstand, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously the target would have been selected from the filtered subset of 20 ( 20 being the max value, actuality much less). Only that same subset would have been notified here, whereas with this change we will be notifying all hotspots in the hex.
Maybe its worth it too take the hit here and reduce the critical path of the validations or maybe there is another option that reduces the cost on both sides...