Add ServiceRegistry to help migration - #6222
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6222 +/- ##
=======================================
Coverage 79.9% 79.9%
=======================================
Files 839 840 +1
Lines 65546 65548 +2
Branches 7269 7266 -3
=======================================
+ Hits 52346 52348 +2
Misses 13200 13200
🚀 New features to boost your workflow:
|
|
@vvysokikh1 how does this look to you? |
vvysokikh1
left a comment
There was a problem hiding this comment.
I don't have any concrete numbers on how this will affect performance, but this change adds another layer of virtual dispatch into the picture. Considering functions from application being called multiple times anywhere in a hot path, I'd suggest we consider something like CRTP to design the registry (that should accept app as a template param).
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
524d1fc to
7c5faca
Compare
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
7c5faca to
09b52e4
Compare
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
|
There's an unrelated file, I would suggest to revert the modification to the empty file in this PR, and then to delete it later as part of a modularization PR. |
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
Currently we're passing the `Application` object around, whereby the `Application` class acts more like a service registry that gives other classes access to other services. In order to allow modularization, we should replace `Application` with a service registry class so that modules depending on `Application` for other services can be moved easily. This change adds the `ServiceRegistry` class.
Currently we're passing the `Application` object around, whereby the `Application` class acts more like a service registry that gives other classes access to other services. In order to allow modularization, we should replace `Application` with a service registry class so that modules depending on `Application` for other services can be moved easily. This change adds the `ServiceRegistry` class.
Currently we're passing the `Application` object around, whereby the `Application` class acts more like a service registry that gives other classes access to other services. In order to allow modularization, we should replace `Application` with a service registry class so that modules depending on `Application` for other services can be moved easily. This change adds the `ServiceRegistry` class.
High Level Overview of Change
This PR adds a service registry class.
Context of Change
We're passing
Applicationaround and theApplicationclass acts more like a service registry that gives other classes access to other services. In order to allow modularisation, we should replaceApplicationwith a service registry class so that modules depending onApplicationfor other services can be moved easily.This PR is part of the modularisation of the transactors. See all PRs here:
#6222
#6223
#6224
#6225
#6226
#6227
#6228
Type of Change
.gitignore, formatting, dropping support for older tooling)