error code vs exception

error-code OR exception, it’s a question. 然而答案是,you should use both,难点在于确定在什么场景下用什么 适合用 exception 的情况 发生的错误无法处理时 In some situations you can’t do anything with the error code, and you just need to

Golang工程最佳实践

examples Building Go Web Applications and Microservices Using Gin 有实现,有测试,有重构 项目分层 model 所有的数据模型,被其它层所依赖 repo 数据层,屏蔽所有数据存取的细节 它的底层可以是数据库,也可以

sarama源码分析Part I

Shopify / sarama 以下代码分析基于此快照的代码:2a5254c26ef606cd9a587 生产者如何发送消息 这一篇帖子已经分析的非常好了:Sarama生

designing data intensive applications part1

Part I - Foundations of Data Systems Chapter 1 - Reliable, Scalable, and Maintainable Applications Reliability / 可用性 The system should continue to work correctly (performing the correct function at the desired level of performance) even in the face of adversity (hardware or soft‐ ware faults, and even human error). Note that a fault is not the same as a failure [2]. A fault