Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dashboard] Refactoring requests related to web services #246

Closed
Cronyet opened this issue Apr 19, 2023 · 4 comments 路 Fixed by Crequency/KitX-Dashboard#24
Closed

[Dashboard] Refactoring requests related to web services #246

Cronyet opened this issue Apr 19, 2023 · 4 comments 路 Fixed by Crequency/KitX-Dashboard#24
Assignees
Labels
enhancement New feature or request fixed This problem has been fixed

Comments

@Cronyet
Copy link
Member

Cronyet commented Apr 19, 2023

馃 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 and DevicesServer.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 the KitX 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 accessing KitX 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 as Start(), 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

@Cronyet Cronyet added enhancement New feature or request help wanted Extra attention is needed labels Apr 19, 2023
@Dynesshely
Copy link
Member

You're right, this is actually a problem needs to be solve.

@Dynesshely
Copy link
Member

Tracked by #223 .

@Dynesshely 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
@Cronyet
Copy link
Member Author

Cronyet commented Apr 20, 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.

@Cronyet
Copy link
Member Author

Cronyet commented Apr 23, 2023

Crequency/KitX-Dashboard#19 has been merged, we can close this issue while changes in KitX/dev=main merged into KitX/main

@Dynesshely Dynesshely changed the title Refactoring requests related to web services (Dashboard) [Dashboard] Refactoring requests related to web services May 6, 2023
@Dynesshely 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
Labels
enhancement New feature or request fixed This problem has been fixed
Projects
2 participants