用户您好!请先登录!

10 open source projects proving the power of Google Go

10 open source projects proving the power of Google Go

Now 10 years in the wild, Google’s Go programming language has certainly made a name for itself. Lightweight and quick to compile, Go has stirred significant interest due to its generous libraries and abstractions that ease the development of concurrent and distributed (read: cloud) applications.

But the true measure of success of any programming language is the projects that developers create with it. Go has proven itself as a first choice for fast development of network services, software infrastructure projects, and compact and powerful tools of all kinds.

Here are 10 noteworthy projects written in Go, many of which have become more famous than the language they were written in. All of them have made a significant mark in their respective domains. All of the projects featured here are hosted on GitHub, so it’s easy for the Go-curious to take a peek at the Go code that makes them tick.

Docker

You would have a hard time finding a better success story for Go than Docker. In a little more than a year, this software containerization technology became the poster child for Go’s suitability to large-scale, distributed software projects. The Docker team liked Go because it offered a slew of benefits: static compilation with no dependencies, a strong standard library, a full development environment, and the ability to build for multiple architectures with minimal hassle.

Kubernetes

If Docker is written in Go, it stands to reason that other significant cloud-oriented container projects would also be written in Go. Kubernetes, Google’s container orchestration project, is a Go project, as are most of the Kubernetes subcomponents and ecosystem. Case in point: The super-lightweight Kubernetes spinoff, k3s, for folks who need only the basics of Kubernetes and not a jot more.

Google considered writing Kubernetes in other languages including C/C++, Java, and Python. But according to Joe Beda, co-founder and former technical lead for Kubernetes and currently principal engineer at VMware, none of these languages hit the “sweet spot” like Go. As Beda put it, “Go is neither too high level nor too low level.”

Fedora CoreOS

CoreOS (now a Red Hat project) uses Docker to turn Linux into a herd of loosely coupled containers, a possible path away from the tangled skein of dependencies that has become the sine qua non of Linux package management. It’s no surprise, then, that CoreOS leverages Docker to accomplish this magic—and that two of CoreOS’s fundamental services, Etcd and Fleet, are both written in Go. Fleet lets you “treat your CoreOS cluster as if it shared a single init system.” Etcd, a distributed key-value store, handles the synchronization of settings between Docker applications and CoreOS instances. Both were written in Go because of Go’s “excellent cross-platform support, small binaries, and a great community behind it.”

InfluxDB

InfluxDB is a “distributed time series database with no external dependencies.” The term “time series” means InfluxDB is mainly concerned with taking in metrics or events, and allowing them to be analyzed in real time. “No external dependencies” means you need no other software to use InfluxDB; it’s entirely self-contained (as Go apps tend to be). Data can be written to or read from the database by way of REST calls that submit JSON, and queries can be made via a simple SQL language that even allows regexes. InfluxDB is highly elastic and horizontally scalable, and it’s likely Go was chosen as the language to make those features possible and easy.

Istio

The Istio project, part of the Kubernetes universe, tackles a problem that is both understood and handled poorly in many enterprise application environments: How do you deal with the networking fabric that connects your services to one another and to the outside world? Istio provides a programmable “service mesh,” or layer of network proxies, between each container in a Kubernetes cluster and between those containers and the outside world, so that any changes to that network can be made programmatically via a shared control plane. Go was a good fit for this given Kubernetes was also written in Go, but also because of Go’s suitability for decentralized, distributed networking projects.

Traefik

Another network-related project written in Go is Traefik, a reverse proxy and load balancer for network services. Traefik is designed to work with a wide variety of orchestration options, from Kubernetes and Docker Swarm to Amazon ECS And Azure Service Fabric. Traefik automatically creates the routes needed by microservices running under those orchestrators to talk to the outside world. It also generates tracing data and statistics appropriate to your orchestrator.

Hugo

Static site generators are all the rage right now. After all, they offer a quick and convenient way to create a fast, secure website with only static HTML, CSS, and JavaScript. Hugo is a static site generator that takes advantage of many Go features to work swiftly and smoothly—namely, Go’s tools for rendering HTML, its networking libraries, its internationalization functions, and its ability to deploy as a single redistributable platform-native binary. All of these Go features make Hugo easy to unpack, run, and use to build sites quickly.

Terraform

HashiCorp—founded by the creator of Vagrant, the Ruby-based tool for managing development environments—drew on the speed and power of Go to build a bigger and more ambitious project: Terraform, a system for building IT infrastructure on premises or in the cloud by way of definition files turned into code. Any changes you make can be rolled forward or back, and you get a full rundown of what exactly will happen—i.e., an execution plan—before you invoke your code.

Go is used to build many kinds of distributed, cloud-native apps. CockroachDB, so named for its resiliency, is a distributed database designed to survive all manner of calamities (even data center failures) and yet continue to respond to your SQL queries. CockroachDB is written entirely in Go, save for a smidgen of C++ for performance-intensive core functions taken from predecessor project RocksDB.

Gravitational Teleport

Go has become the default language for many networking projects, and for the downstream projects that build on them. Case in point: Go’s implementation of SSH, by itself useful, serves as the foundation of projects like Gravitational Teleport. Gravitational Teleport allows users to securely access servers via a shell. It enforces security via single sign-on, but without requiring the kind of administrative overhead (e.g., key management and rotation) such things usually need.

https://www.infoworld.com/article/3442978/10-open-source-projects-proving-the-power-of-google-go.html

author: 

行走的code
行走的code

要发表评论,您必须先登录