玩go下载教程 Go下载( 二 )


  • 稳定是短暂的,不稳定是必然和长期的;
一般业务会突飞猛进,特别是越偏上层的业务,需要后端处理的逻辑就越多,至于 UTest 和测试一般只存在于传说中,随着业务的发展,潜伏的狼人越来越多,甚至开源的库和服务器中的狼人也开始出来作妖 。夜路走多了,总会碰到鬼,碰到鬼了怎么办?当然是遇鬼杀鬼了,还能被它吓尿不成,所以就反思解决 Bug,费了老劲、又白了几根头发,终于迎来短暂安宁,然后继续写 Bug 。
  • 最普遍的问题还是内存问题导致崩溃,一般就是野指针和越界;
空指针问题相对很容易查,除零之类的典型错误也容易处理 。最完善的解决办法,就是实现 GC,让指针总是有效,无效后再释放,越界时能检测到,这样容易解决问题;其实 Go 早期的版本就和这个很类似了,要实现带 GC 的 C 的同学,可以参考下 Go 的实现 。
  • 线上的 CPU 和内存的问题,一般不方便使用工具查看,而线上的问题有时候很难在本地重现 。
如何能直接获取线上的 Profile 数据,需要程序本身支持 。比如提供 HTTP API 能获取到 Profile 数据,关键是如何采集这些数据 。
Go 的使命愿景和价值观:
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Go is a concurrent open source programming language developed at Google. Combines native compilation and static types with a lightweight dynamic feel. Fast, fun, and productive.>
Go is an attempt to make programmers more productive. The first goal is to make a better language to meet the challenges of scalable concurrency. The larger goal is to make a better environment to meet the challenges of scalable software development, software worked on and used by many people, with limited coordination between them, and maintained for years.
Go 语言的关键字:
  • 运行性能高: Statically typed. Native code generation (compiled). Efficiency. Fast development cycle.
  • 码农不苦逼: Memory safe. Garbage collected. Safety.
  • 云计算专享: Native concurrency support. Concurrency. Scalability.
  • 工程师思维: Composition via interfaces. Excellent standard library. Great tools.
参考 The Path to Go1: What is Go? 和 Another Go at Language Design 。
参考 > Go: a simple programming environment 。
Go 是面向软件工程的语言,Go 在工程上的思考可以读 Go at Google: Language Design in the Service of Software Engineering 和 Less is exponentially more 。Go 最初是解决 Google 遇到的大规模系统和计算的问题,这些问题如今被称为云计算,参考 Go, Open Source, Community 。
GITHUT上显示 Go 的项目和 PR 一直在上升,如下图所示 。
玩go下载教程 Go下载

文章插图

2014 云计算行业中使用 Go 的有:Docker, Kubernetes, Packer, Serf, InfluxDB, Cloud Foundry’s gorouter and CLI, CoreOS’s etcd and fleet, Vitess | YouTube’s tooling for MySQL scaling, Canonical’s Juju (rewritten in Go), Mozilla’s Heka, A Go interface to OpenStack Swift, Heroku’s Force.com and hk CLIs, Apcera’s NATS and gnatsd 。
2018 年全球使用 Go 的公司数目有:US(329), Japan(79), Brazil(52), India(49), Indonesia(45), China(32), UK(32), Germany(28), Israel(24), France(17), Netherlands(16), Canada (15), Thailand(14), Turkey(14), Spain(12), Poland(11), Australia(9), Russia(9), Iran(8), Sweden(7), Korea(South)(6), Switzerland(6), Ukraine(5) 。
参考 Go as the emerging language of cloud infrastructure、The RedMonk Programming Language Rankings: June 2018,还有 GoUsers 以及 Success Stories 。
参考 > "Go: 90% Perfect, 100% of the time" -bradfitz, 2014 。参考 > Nine years of Go: Go Contributors,社区贡献的代码比例 。


特别声明:本站内容均来自网友提供或互联网,仅供参考,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。