dsrvlabs / vatz

Node management integration tools in purpose of maximizing node's uptime for any protocols
https://www.dsrvlabs.com/
GNU General Public License v3.0
30 stars 15 forks source link

Refactoring (default) Module Structures #186

Closed xellos00 closed 2 years ago

xellos00 commented 2 years ago

Checklist


Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. such as Ex. I'm always frustrated

I'm very frustrated current module's structures that doesn't have layers for its purpose and we don't have default structure for module that anyone can easy to copy and develop. I assume that structure should be limited with its structure to find where each module goes.

As previously discussed with @hqueue @rootwarp current module doesn't have layers that divide for purpose

This issue refer to

Describe the solution you'd like| Ex

A clear and concise description of what you want to happen

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you have considered.

Here's example for our module notification

Child Issue

rootwarp commented 2 years ago

@xellos00 If you wanna set templates for internal service, I leave little comment here.

xellos00 commented 2 years ago

@xellos00 If you wanna set templates for internal service, I leave little comment here.

  • type: seems reasonable. many 3rd party packages(e.g google protobuf) separate model structures into type directory.
  • route: could not be necessary. go-zero package is web-framework, so it separates url routing features into submodule. You may understand this route as "routing" instance to our choosen structure's. This may possible in Java Spring framework because it has IoC pattern, but in Golang we use just Factory pattern.

@rootwarp New refactoring won't be created as exactly same as above. I mentioned go-zero framework because it reflects the direction I am pursuing for VATZ. I am also looking at fiber framework as well to find optimize structure for our module and service. I want a top layer that only serves as an access point to redirect external requests, but on the other hand, there is still the question of whether this access layer must be applied to the module.

xellos00 commented 2 years ago

refactoring for module has done.