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
New subscription manager #1071
New subscription manager #1071
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #1071 +/- ##
===========================================
+ Coverage 53.68% 54.09% +0.40%
===========================================
Files 191 203 +12
Lines 10150 10286 +136
Branches 5417 5452 +35
===========================================
+ Hits 5449 5564 +115
- Misses 3390 3399 +9
- Partials 1311 1323 +12 ☔ View full report in Codecov by Sentry. |
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 a really good imrovement, thanks! Just a few comments.
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 a really good imrovement, thanks! Just a few comments.
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.
Great job - huge improvement over the old version 🎉
I'm adding mostly minor comments 🔢
Also, as usual, JSON formatting can be improved in tests 🥇
Rebase Fix clang-tidy Fix format Fix compilation Fix Fix ut
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.
👍
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.
Looks good, even though not all suggestions got implemented in the end, i think this is so much better than what we started with that we should merge it now and improve further later if we so desire.
SubscriptionManager is puffy now, containing all the subscribers management and feed generation work. It is hard to implement api_version up to it.
This PR will:
1 Separate each stream to the different feed class for better maintainability and testability, each feed focus on its own feed generation.
2 SubscriptionManager is a dispatcher class now. The API keeps the same as before, except additional api_version parameter for transaction stream.
-RPC engine and web server remove the SubscriptionManager dependency.
-Executor is injected to SubscriptionManager, remove the waiting from unittests code.
3 Utilize boost/signal2 for sub/unsub/pub
4 Implement api_version
5 Remove cleanup from SubscriptionManager, the subscription will be removed as the web session gone.
6 Keep the original log + log when session removed to better track lifespan
7 Fix issue: Duplicated feed sent if multiple watched accounts get affected in same tx.