Go
Go dev summary
-
Code
- low cognitive
- low chance mistake by use linter to help
- Code structure
- help navigate
- easily understand
- convention can help a lot
- easily test
- easily making change
- DDD style
-
System Architect
- maintainable
- cab easily make small change with confident
- don't put logic in the db
- unique constraints
- auto gen id
- auto timestamp
- use db as helper but not the business logic
- as integrity checking helper
- secure
- use rate limit to reduce, prevent and detect
- scalable
- how to do 1 million WS connection
- DB proxy/pool
- monolith/microservices
- Try not to make it big ball of mud
- CI/CD ready
- must have team and tools ready to use
- to reduce deployment/change complexity
- API/Service independent
- Try not to call each other via synchronous API
- using message queue/broker, pubsub
- Data independent
- Try not to use shared DB
- if need do shared view as open spec for that
- do it via FDW
- do it via logical replication
- client can detect schema change
- can PGSQL detect this
- is there a tool to detect this
- client can detect schema change
- Try not to manually implement data syncing
- it will be buggy and eat/waste the dev resources and time
- Try not to use shared DB
- API design
- Restful
- Domain Driven style
- OpenAPI spec
- Data as source of truth
- code can change but (past) data shouldn't
- eg. store Fee percentage, fee amount so we can do the calculation again
- and queri-er can use data without do unnecessary calculation
- eg. store Fee percentage, fee amount so we can do the calculation again
- Historical or Temporal data
- can query state at point in time
- code can change but (past) data shouldn't
- DDD
- event storming
- Data privacy, sensitive, gov, leak prevent
- think twice before implement GET API
- don't leak sensitive data via url
- think twice before implement GET API
- Deploy
- # Migrating Critical Traffic At Scale with No Downtime — Part 1
No note with name Pasted image 20230911095458.png found
- maintainable
-
Workflow
- in dev
- advocate TRUE CI
- use Linters to reduce coding mistake and vulnerability
- CI test new code compatible with existing db migration
- try not to make incompatible db change
- CI test new db migration compatible with existing code
- new column should not break
- Vuln libs scan
- Deploy
- DB Migration
- in dev
-
To not do
- git flow - diverge change
-
architectural style (LinkedIn) link
- performance vs. modularity, simplicity vs. flexibility, or security vs. usability.
Backlinks