Skip to main content

Why Go became the standard language for DevOps engineers

Sometimes things are applied unexpectedly and not in what they were designed for. 

In the 1960's Ken Thompson, the programming legend, wrote a computer game Space Travel for the Multics operating system. The system was a Bell Lab project where he worked with Denis Ritchie. Later the project was closed and to continue playing in his Space Travel, Thompson decided to port it to the computer PDP-7. The tools that it created for the port then formed the basis of the Unix operating system. 

Thompson wrote the first three versions alone. Unix needed a system language, so B came up. Later, Denis Ritchie, a colleague and friend of Thompson, picked up the development and wrote C. That's how most of the modern technology was built, and there was a desire to play a computer game and pet projects for fun.

Ken Thompson has built a brilliant research career in computer science. In the mid-2000s, he joined Google, where he and Robert Pike and Robert Graysmer created Golang, one of the most popular languages of late.

Go was invented as a simple language for everything

By that time, Google was already growing into a giant corporation, and there were problems with the speed of development. There was a lot of code on C++, it became more difficult to support it. The task the company set itself seemed almost naïve, to invent a very simple language in which to do very difficult things.

The creators wanted to solve problems of slow assembly of programs, uncontrolled dependencies, complex development of tools and problems of inter-language interaction. They took C, Pascal and Oberton as the basis of the language and tried to collect from them all the best. As a result, they began to make a language with very simple syntax, strict static typing, automatic garbage collection, and simple tools to manage multi-threading.

Golang was announced in 2009, in 2012 there was a release. The language quickly gained popularity but faced criticism. The key feature of the language is simplicity, and many developers considered the main downside. 

"Because of the desire for simplicity in Go, there are no constructions that are perceived as something natural in other languages. At first, it may seem like a good idea, but in practice, a multi-verbal code comes out," Gary Wilouby wrote. — Go was designed to be simple, and it succeeded in this purpose. It was written for weak programmers, using an old language as a prefabrication. It comes with simple tools to do simple things. It's easy to read and use. It's extremely verbose, unexpressive and bad for smart programmers."

However, as early as 2012, many developers saw Go's prospects in areas for which it was not originally conceived.

That's what happened — almost at the same time that language was being created, the culture of DevOps began to develop rapidly in IT, where Go became the standard almost immediately.

DevOps was invented as agile for infrastructure

For many years, there was a strict hierarchy in the software development cycle, with programmers writing code, system administrators ensuring that what was written properly worked on the hardware — everyone was responsible only for their area. When some bugs surfaced, the battle of professions began. The programmers argued that the problem was somewhere on the servers and that was not their business; Administrators assured that the servers were doing well, they were simply given a code curve.

Sooner or later, the error was corrected (or not), and everything started again.

But in the industry everything changed very quickly, it grew at a terrible rate. Fich delivery time to users has decreased, the number of constant updates has increased, and the uncertainty of product development has become more apparent—some things have literally been collected and refined on the go by regular updates.

Under these conditions, division began to be badly damaged, and even the nearly ten-year agile - a manifesto of uncertainty and flexibility - did not help much.

In 2008, the database administrator Patrick Debua went to the Agile Toronto conference, where he met another admin, Andreu Clay Shafer. Both were interested in Ajail, and how to better integrate it into the Sisadmin business. At the same conference they saw a speech where one of the speakers spoke how in his team developers and admins try to work together.

A year later, the conference was held in Belgium. Literally immediately the name became the name of a new approach to work, which over several years has turned the concept of roles of developers and administrators in IT.

The essence was this — developers participate in the deft, administrators write scripts, everything is automated. From this began not only a shift in philosophy and attitude to roles in the team, but also software changes. The new practice required new tools. Docker, Kubernetes, Terraform and other things that are now closely associated with the work of a devopse engineer have appeared on this wave. And almost all of them were written on Go.

Why Go and DevOps are perfect

When Google started developing Kubernetes — the team already has a huge legacy of tools for containerization. But Kuber began to write from scratch, therefore the question of choice of language arose. Joe Beda, the main developer of the service, said that Google uses many languages — not just their own — and they chose between C/C++, Java and Python. 

They didn't take it, because it's a rather "scary" language for many developers, which grew up with a huge infrastructure. It is increasingly difficult for the community to agree on what, where and how to use it properly. 

Java didn't work because the developers wanted to make the installation simple on as many platforms as possible. Python was dropped because of dynamic typeization.

But Go was not too high-level or too low-level. The list of reasons why the Kubernetes team chose it is quite broad:
  • All the libraries are out of the box for almost everything they needed
  • Quick tools. "We've got them on the speed of development," Beda writes
  • Go doesn't have any complex code. "No one writes factories on it. It is quite possible to understand any part of the system simply by running a look at it."
  • Anonymous functions
  • A waste collection that you don't have to think about
  • Strict typedization
But it's a plus to develop the tool. When regular devopers tell us why Go has become the standard in their field, three main reasons are most often mentioned:
  • It's really very easy to teach and read. Many developers and devopes say it is enough to read the general documentation to go and use the code on the sale without any particular problems
  • It has the easiest threading to use. Hornets and Channels are fichi that are praised even by those who disliked Go
  • It's incredibly easy to use. And that's probably the main reason why language is so good for infrastructure engineers
Compared to Python, Ruby, or Node.js, installing a single executable file is the dream of the maintenance engineers. Of course, this is not such a big problem in view of the increasing use of Docker, but individual executable files also reduce the size of containers.

The source code is compiled into a binary file. Because of this, with the application, you don't have to pre-install the necessary dependencies, you can simply migrate and run anywhere.


Popular posts from this blog

The Slowest Programming Languages

Today, there are about 700 well-known programming languages ​ ​ in the world, while only 250 are used. If a task could be measured in days earlier, it is now a fraction of a second. Here are some of the slowest dynamic typing programming languages. In electronics, speed and performance depend on the number of transistors that a particular chip can have. According to Moore's law, their number doubles every two years. This is why a modern hand-sized mobile phone is much faster than a room-sized supercomputer of the 90s. When it comes to computer science, the difference between faster code and a faster PC is quite bike. Intel and AMD create powerful computing systems in terms of speed. The task of programmers is to write reliable and fast programs. One of the things to consider when creating software is programming languages . Each of them is implemented in different ways, therefore it has its own merits. And speed may simply not be among them. If you need to create a program for comp...

How to succeed in IT if you are not a programmer

There is a statement that only mathematicians are taken in IT. Is that so? Today's world of information technology answers: no. Successful in this area is not the one who quickly thinks in his mind, but rather the one who understands human psychology, knows languages and is quite ambitious. What is the secret to success and how to develop in IT if you are not a programmer? Develop communication skills and emotional intelligence Language, successful communication, the ability to "see and hear" the interlocutor are basic factors for those who want to succeed in IT. Linguistic inclinations are known to be more important for learning programming languages ​ ​ and understanding code than mathematics. That is, languages ​ ​ are a factor that allows ordinary people to develop in IT. The ability to find a common language and establish the necessary connections, easily communicate, the ability to feel and understand a colleague, subordinate, partner and client is something that is...