[Discussion] structural refactor to make the source more like 'idiomatic go'
See original GitHub issueRight now, we have the components running (excluding modeldb):
- dlk-manager
- vizier-core
- vizier-db
- vizier-suggestion-[algorithm]
These are the binaries Iβve found after briefly scanning the code structure:
.
βββ cli
β βββ Dockerfile
β βββ main.go
βββ dlk
β βββ dlkmanager
β βββ dlkmanager.go
βββ manager
β βββ main.go
βββ suggestion
β βββ grid
β | βββ main.go
β βββ random
β βββ main.go
βββ earlystopping
βββ medianstopping
βββ main.go
Personally, I think there are two issues we can fix to improve the code base:
- component naming and source code naming is inconsistent
- structure can be improved to make it consistent with go projects in the wild π
Here is the structure off my head:
βββ cmd
β βββ cli
β β βββ cli.go
β βββ dlkctl
β β βββ dlkcli.go
β βββ dlkmanager
β β βββ dlkmanager.go
β βββ viziercore
β | βββ viziercore.go
β βββ earlystopping
β βββ medianstopping.go
βββ pkg
β βββ apis
| βββ v1alpha1
| βββ api.proto
β βββ db
β βββ dlk
β βββ mock
β βββ vizier
β βββ suggestion
β βββ earlystopping
βββ suggestion
| βββ random
| βββ grid
βββ docs
βββ manifests
β βββ conf
β βββ dlk
β βββ modeldb
β βββ vizier
βββ hack
β βββ build.sh
β βββ deploy.sh
βββ test
βββ vendor
Note that since we mostly want to write suggestion service in python, it should have its own root directory. If we want to write earlystopping service in other languages as well, then we can also move it out to top-level root.
@gaocegege @YujiOshima WDYT?
/improvement enhancement /area suggestion
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (20 by maintainers)
Top Results From Across the Web
Codebase Refactoring (with help from Go)
Gradual code repair creates additional compatible combinations, making it more likely that a versioning system can find a way to build a particular...
Read more >Codebase Refactoring (with help from Go)
The Go project's official blog. Go project. Get help and stay informed from Go. Get connected.
Read more >Idiomatic Go - Sourcegraph
Find and fix things across all of your code with Sourcegraph universal code search.
Read more >Introducing Clean Architecture by refactoring a Go project
This part of refactoring is simple: Create ports , adapters , and app directories. Move each file to the proper directory.
Read more >Writing idiomatic Go using Domain Driven Design ... - YouTube
GoWayFest 4.0, Online β July 11-12, 2020Writing idiomatic Go using Domain Driven Design, Damiano PetrungaroThere are plenty of articlesΒ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it is a separate issue, while I agree your idea π I will open an new issue for it.
We could close the issue.