Why do we choose Go
There are many reasons to choose Go, and we have already covered many of the features and advantages of Go in previous documents. But the most important reason is based on the following two considerations:
-
performance
Shorten the API response time to solve the problem of batch request access timeout. In the business scenario of Uwork, a batch REQUEST of API often involves multiple calls to other interface services. However, under the previous PHP implementation mode, it is very difficult to achieve parallel calls, and serial processing cannot fundamentally improve the processing performance. But GO language is different, through the coroutine can easily realize the PARALLEL processing of API, to maximize the processing efficiency. Relying on Golang’s high-performance HTTP Server, the system throughput capacity has been improved from hundreds of LEVELS of PHP to thousands of miles or even more than ten thousand levels.
-
Development efficiency
GO language is simple to use, high efficiency of code description, uniform coding specification and quick to use. With a small amount of code, you can standardize the framework and quickly build API business logic with uniform specifications. It can quickly build various common components and public class libraries to further improve development efficiency and achieve mass production of functions in specific scenarios.
What can Go do
Since the release of version 1.0, Go language has attracted the attention of many developers and has been widely used. The simple, efficient and concurrent features of Go language have attracted many traditional language developers to join in, and the number is increasing.
In view of the characteristics and original design of Go language, Go language as a server programming language, is very suitable for processing logs, data packaging, virtual machine processing, file system, distributed system, database agent, etc. In network programming, Go language is widely used in Web applications, API applications, download applications, etc. In addition, Go language is also applicable to the field of in-memory database and cloud platform. At present, many foreign cloud platforms are developed by Go.
- Server programming, Go is a good place to do things you used to do in C or C++, such as logging, data packaging, virtual machine processing, file systems, etc.
- Distributed systems, database agents, middleware, etc., such as Etcd.
- Network programming, which is currently the most widely used, including Web applications, API applications, download applications, and Go built-in NET/HTTP package basically we use the network functions are realized.
- Database operations
- Development of cloud platform, at present, many foreign cloud platforms are using Go development
Iii. Which enterprises or projects at home and abroad use Go language
After the release of Go, many companies, especially cloud computing companies, began to use Go to reconstruct their infrastructure. Many of them directly used Go for development. Recently, the popular Docker was developed using Go.
There are many open source projects developed using the Go language. Early open source projects of Go language are only implemented by binding C language library with traditional projects through Go language, such as Qt and Sqlite. Many of the later projects were implemented natively in Go, which was easier than other languages, leading to the emergence of a large number of native development projects using Go.
-
Cloud computing infrastructure
Representative projects: Docker, Kubernetes, ETCD, Consul, Cloudflare CDN, Qiniu Cloud Storage, etc.
-
Based on the software
Representative projects: TIDB, InfluxDB, CockroachDB, etc.
-
Micro service
Representative projects: Go-Kit, Micro, TYPHON of Monzo Bank, Bilibili, etc.
-
Internet infrastructure
Representative projects: Ethereum, Hyperledger, etc.
Some foreign companies that use Go, such as Google, Docker, Apple, Cloud Foundry, CloudFlare, Couchbase, CoreOS, Dropbox, MongoDB, AWS, etc.
Domestic enterprises using Go development: such as Ali Cloud CDN, Baidu, Xiaomi, Seven Cattle, PingCAP, Huawei, Kingsoft software, Cheetah Mobile, Ele. me and other companies.
Docker
Docker is an operating system-level virtualization technology that can isolate operating systems and applications, also known as containers. Docker can quickly run one or more instances on a physical server. LXC based on a virtual packaging tool, to achieve the PAAS platform. For example, starting a CentOS operating system and executing commands from its internal command line ends the whole process as efficiently as if it were operating on its own.
Project links:
Github.com/docker/dock…
The go
Go’s own early source code was written in C and assembly language. Since Go 1.5, the Go language is written entirely by itself. Go language source code to understand the Go language scheduling has great reference significance, it is recommended that the Go language to have a deep understanding of the reader read.
Project links:
github.com/golang/go
Kubernetes
The container scheduling service developed by Google and built on Docker allows users to manage cloud container cluster through Kubernetes cluster.
Project links:
Github.com/kubernetes/…
etcd
A distributed, reliable KV storage system that can be quickly configured in the cloud.
Project links:
github.com/coreos/etcd
beego
Beego is a Python like Tornado framework, which adopts RESTFul design ideas and uses Go language to write a very lightweight, high scalability and high performance Web application framework.
Project links:
Github.com/astaxie/bee…
martini
A Web framework for quickly building modular Web applications.
Project links:
Github.com/go-martini/…
codis
Domestic excellent distributed Redis solution.
Project links:
Github.com/CodisLabs/c…
delve
The Go
Powerful debugger, integrated by many integration environments and editors.
Project links:
Github.com/derekparker…
Facebook is also using it, and they’ve created an open source organization on Github called Facebook Go, which you can visit at github.com/facebookgo…
Uber
tencent
Tencent as domestic companies, and dare to try, especially the Docker container that, in the 15 years they have made a Docker ten thousand sets the size of the practice, the concrete can refer to www.infoq.com/cn/articles… .
baidu
At present, baidu is known to be used in the operation and maintenance side. It is a BFE project of Baidu operation and maintenance, responsible for front-end traffic access. They have a share in 2016, the head of the, you can see the www.infoq.com/cn/presenta… .
The second is Baidu’s messaging system. Responsible for the server development and maintenance of the company’s mobile messaging system.
jingdong
Jingdong cloud message push system, cloud storage, and Jingdong Mall all use Go for development.
millet
Xiaomi’s support for Golang is so open for its operations monitoring system, known as open-falcon.com/.
In addition, Golang is used by teams such as Mi Interactive Entertainment, MI Mall, MI Video and MI Eco-Chain.
360
360 also uses Golang quite a bit. One is Poseidon, an open source log search system hosted on Github, github.com/Qihoo360/po… .
The 360 push team is also using it, and they wrote a post on Golang’s official blog at blog.golang.org/qihoo.
Seven NiuYun
Seven Niuyun used nearly half a million lines of code to implement the entire product. Seven Cattle cloud storage products website: qiniu.com/. Launch Time: 2011-… PV: confidential
Meituan
Meituan background flow support procedures. Application: Supports back-end traffic (sorting, recommendation, search, etc.), provides load balancing, cache, fault tolerance, conditional shunting, and QPS statistics.
drops
Basic service platform.
Jin Shanwei see
Application: service interface, background process service, message system, picture system
sogou
Sogou push system. The part of a Push system that maintains a connection to a client.
QOR — Modular e-commerce system
- QOR: e-Commerce & CMS SDK Written in Go
- Github address: qor/qor · Github
- Application: the whole product
weico
Product name: WeICO 3.0, server all code is implemented with Go.
XianXia way
- Product website: [Xianxia Road official website – enchanted game](Xianxia Road official website – enchanted game)
- Application: Game server (communication, logic, data storage)
Quick play games
- Website: quick play mini games, PC games, web games, quick play games, quick play game box
- Application: real-time message system, user authentication, user session, unified statistics interface
Grand cloud CDN
- Website: Shanda Cloud Computing
- Application: CDN scheduling system, distribution system, monitoring system, short domain name service, CDN internal open platform, operation report system and some other small tools
Bmob mobile back-end cloud service platform
- Product website: Bmob Mobile back-end cloud service platform
- Application scope: Restful apis (using Beego), statistical analysis platform, common services such as email sending, queue asynchronous processing, statistical user space and interface requests
Group policy
- Website: [Qunce – unified team communication, efficient completion of work](Qunce – unified team communication, efficient completion of work)
- Application: whole system
BiddingX DSP advertising system
- BiddingX_ Professional DSP solution provider
- Application: bidding, exposure statistics, click jump
The neighbors
- Website: Home page – Neighborhood
- Application: Background service
Leanote
- Address: Leanote
Bearychat
- Address: BearyChat
Curtilage beans
- Website: Zhidou network – build the most beautiful home, zhidou with you
Whiteboard – Design drawing discussion tool
- Website: Whiteboard
The lab building
- Website: Experimental building – the first experimental as the core of IT online education platform
Sina weibo
Middleware and elastic scheduling are written in Java and Go, while microblog video transcoding and storage service are written in Go.
iQIYI
VR background system middleware, HTTP interface of VR terminal.
Cheetah mobile
Being pushed
netease
Netease Honeycomb container public cloud.
Bi li bi
barrage
The giant network
Part of the mobile game server.
Today’s headline
Nsq: Nsq is a high performance, high availability message queue system developed by Go language. It has very high performance and can process billions of messages every day.
Packer: Image files used to generate different platforms, such as VM, Vbox, AWS, etc. The author is the author of Vagrant
Skynet: Distributed scheduling framework
Doozer: Distributed synchronization tool, similar to ZooKeeper
Heka: Mazila’s open source log processing system
Cbfs: Couchbase open source distributed file system
Tsuru: An open source PAAS platform that does exactly what SAE does
Groupcache: Memcahe is a caching system for Google’s download system
God: Similar to Redis’ cache system, but with distributed and extensible support
Gor: network traffic capture and replay tool
There are many others, such as Ali middleware, Jumei Youpin, Gaosheng Holdings, Tantan, Douyu Live, Renren Car, Asiainxin, Udesk, Fangtong, Fortune Cat, Sany Group, Meishan.com, etc. Generally, Golang chooses the appropriate product system for his company, such as message push, monitoring, container, etc. Golang is particularly suitable for network concurrent services, which is his strength, so it is also used in these projects first. Go language as a large project development language, in many large companies have been used, or even completely switch to Go development.
Write at the end
Of course, a technology can develop, the key to look at three points.
- Is there a good neighborhood? Ecospheres like C, C++, Java, Python, and JavaScript are rich and hot. Especially communities that have a lot of commercial involvement, like the Linux community.
- Is there a standard for industrialization? Things like C, C++, and Java are organized for standardization. Java, in particular, has developed enterprise-class standards such as J2EE in terms of architecture.
- There is no one or more killer apps. The killer applications of C, C++, and Java are needless to say, even though PHP is not a good programming language, because it was the key technology in the first killer solution of the Linux era, LAMP, and so on.
These three things are very important, and new technologies only need one or two of them to be good, and some technologies, like Java, have all three, which is why Java is doing so well. Of course, in addition to the above three important factors, there are some other influencing factors, such as:
- ** Is the learning curve low and fast? ** this is very important and C++ is getting worse and worse at this.
- ** Is there a good development framework to improve development efficiency? ** such as: Java Spring framework, C++ STL and so on.
- Is it backed by one or more giant technology companies? ** IBM and Sun behind Java and Linux…
- Does ** address pain points in software development? ** For example, Java solves the memory management problems of C and C++.
Using these scales to measure the Go language, we can clearly see:
- Go is easy to learn;
- Go language solves the pain points of concurrent programming and writing the development efficiency of low-level applications.
- Go has Google, the world’s leading technology company, behind it;
- The killer app for Go is Docker, whose ecosystem has exploded in recent years.
So the future of Go is limitless. Of course, I personally feel that Go will devour a lot of C, C++, Java projects. However, the main projects devoured by the Go language should be middle-tier projects, neither very low-level nor business-tier.
That is, the Go language does not devour projects down to the C and C++ levels, or at higher levels such as the Java business layer. Go language must swallow the projects on PaaS, such as some message caching middleware, service discovery, service proxy, control system, Agent, log collection, etc., there is no complex business scenario, nor can Go to the middle platform layer of software projects or tools, such as operating system. C and C++ will be pushed down to the bottom, and Java will be pushed up to the business layer.
Ok, let’s measure Go’s killer app Docker again with the above yardstick, and you’ll see the same thing.
- Docker is easy to get started with.
- Docker solves the environmental problems in operation and maintenance and the pain points of service scheduling.
- Docker’s ecosystem has big companies behind it. Such as Google.
- Docker produces the industry standard OCI.
- The Docker community and ecosystem are already showing the same momentum as Java and Linux.
- …
Therefore, although Docker a few years ago had many potholes at that time, compared with these big factors, those small potholes were not a problem. It just takes some time, and these holes will be completely filled in the next 5-10 years.
Also, we can see that Kubernetes will be the ultimate winner as a key technology for service and container scheduling.
Finally, I want to talk about why it’s important to get into these new technologies earlier rather than waiting for them to mature. There are several reasons.
The process of technological development is very important. Because you can clearly see the ecosystem of this new technology. What we gain most is not the technologies themselves, but a technological change and the development of the industry.
We see very specific thoughts and ideas that are more valuable than the technology itself. Because not only does it make us rethink the technology we already have and how we can better solve the problems we already have, but it also gives me a glimpse into the future. Not only do we have technical advantages, but this knowledge also makes our technical career more possible.
These key new technologies give you a head start on technology. These are all very important for an individual or company that needs technical leadership.
If one company or individual has a technological head start, it can have a greater impact than others. Once the industry demand explodes in the future, the influence of the company or individual will form a relatively large moat and generate economic benefits quickly.
Go’s application scope is expanding all the time, cloud computing, microservices, blockchain, where Go write heavyweight projects. The Docker/Kubernetes ecosystem, hundreds/tens of millions of lines of code, basically dominates the cloud native app market. Last year’s hot blockchain, Geth of Ethereum, BTCD of Bitcoin, LND of Lightning Network, are all developed in Go language. Again, take a look at the ecology of various languages and it may not be as bad as you think… Go isn’t “advanced” in its design, but it’s also “pragmatic” in a different way. In fact, go has been very popular both at home and abroad. Google is widely used in foreign countries and Uber is also used. There are famous headlines in China today, and the daily visits of hundreds of billions of people are no problem. Not many languages have such a large application scenario in their lifetime.