-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat(filter): reliability monitor as a separate class to handle reliability logic #2105
Conversation
size-limit report 📦
|
c7767dc
to
ca44b9c
Compare
@@ -0,0 +1,4 @@ | |||
export const DEFAULT_KEEP_ALIVE = 30 * 1000; |
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.
nit: let's move filter
folder to src
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.
it is under src/protocols
- do you mean root of src
?
this.pubsubTopic = pubsubTopic; | ||
this.subscriptionCallbacks = new Map(); | ||
|
||
this.reliabilityMonitor = new ReliabilityMonitor( |
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.
based on the original design - we'd need to use it in lightPush
too
or do you have another idea how to make retry there happen?
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.
correct. i want to split the PR such that there is cleaner diff and this PR can be followed up with lightpush changes similar to filter (this PR)
} | ||
} | ||
|
||
public resetPeerStats(peerIdStr: string): void { |
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.
nit: let's have public
methods on top of the file
Have you tried it in |
b6de656
to
4d20c67
Compare
superseded by #2117 |
Problem
Based on #2075, the logic to detect messages that were missed from the Filter protocol were being detected inside of the Filter SDK implementation. This leads to a tight couple of primary objective of FilterSDK, and reliability goals.
This obstacle also extends to adding further actions that might be taken with additional protocols such as Store pings, and LightPush retries for certain messages.
Solution
Decouple reliability logic into a new ReliabilityMonitor class.
Notes
Contribution checklist:
!
in title if breaks public API;