-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Dashboard] Refactoring requests related to web services #246
Labels
Comments
Cronyet
added
enhancement
New feature or request
help wanted
Extra attention is needed
labels
Apr 19, 2023
You're right, this is actually a problem needs to be solve. |
Tracked by #223 . |
Dynesshely
added
working on
We are working on this issue
tracking
This issue is tracking by another issue
and removed
help wanted
Extra attention is needed
labels
Apr 19, 2023
Considering that some surrounding facilities are inconvenient to migrate, I suggest rebuilding on the basis of the original project first, rather than creating a new project, just like what you are doing now. |
Crequency/KitX-Dashboard#19 has been merged, we can close this issue while changes in KitX/dev=main merged into KitX/main |
Dynesshely
changed the title
Refactoring requests related to web services (Dashboard)
[Dashboard] Refactoring requests related to web services
May 6, 2023
github-project-automation
bot
moved this from In Progress
to Done
in KitX Project Todo-Lists
May 6, 2023
Dynesshely
added
fixed
This problem has been fixed
and removed
working on
We are working on this issue
tracking
This issue is tracking by another issue
labels
May 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🪦 Is your feature request related to a problem? Please describe.
Talk about
KitX Dashboard
.Currently, the code related to network services exists in the
Servers
directory.There are only two files:
PluginsServer.cs
DevicesServer.cs
Among them,
DevicesServer.cs
also contains the code of two parts, the device self-discovery network and the master-slave device communication network.All these codes jumbled together, as a result, there is no way to expand new functions easily at the same time.
The state control of network services can only be distinguished by
PluginsServer.cs
andDevicesServer.cs
.Restarting the device service must restart the device self-discovery network and the master-slave device communication network at the same time, instead of simply restarting one of them.
So, I opened this issue.
I am going to have a discussion with you about refactoring the code related to network services
🪧 Describe the solution you'd like
The following is my refactoring idea:
We need a new library project, for example:
KitX.Web.Core
, placed in theKitX Dashboard Helper
repository.Migrate all network related code to this project.
Use more closure semantics to refactor network-related logic to prevent code in
KitX.Web.Core
from accessingKitX Dashboard
.We need a network server interface design, for example:
IKitXNetworkServer
and it is required that the class that implements this interface must implement methods such asStart()
,Stop()
, etc. for better state control.In addition, we need to separate the device self-discovery network from the master-slave device communication network, so that one of the networks can be controlled independently
🧾 Describe alternatives you've considered
It's going to be a lot of work, but it's still worth it.
📎 Additional context
No response
The text was updated successfully, but these errors were encountered: