If you’re planning to start some new project with high performance and scalability demands, this article is a must-read for you. Why? Here we talk about the language that allows high performance, impressive scalability and perfectly meets other demands of the modern distributed systems. Find out why use the Go language for your project and get ready for some stunning takeaways!
But before we start listing great Go features that should definitely incline you to use Golang, let’s learn a little bit of its history. Speaking in advance, it’s not out of academical reasons, but purely out of the practical ones. Diving into the Golang history will allow us to see the reasons why Go was created, what challenges it was to tackle and, consequently, what challenges it will help resolve in YOUR situation.
written by:
Alexey Hodakovsky
IoT Technical Lead,
Qulix Systems
If you’re planning to start some new project with high performance and scalability demands, this article is a must-read for you. Why? Here we talk about the language that allows high performance, impressive scalability and perfectly meets other demands of the modern distributed systems. Find out why use the Go language for your project and get ready for some stunning takeaways!
But before we start listing great Go features that should definitely incline you to use Golang, let’s learn a little bit of its history. Speaking in advance, it’s not out of academical reasons, but purely out of the practical ones. Diving into the Golang history will allow us to see the reasons why Go was created, what challenges it was to tackle and, consequently, what challenges it will help resolve in YOUR situation.
Contents
Go design
Golang was the synergy of the experience and knowledge of the engineers who created it (Ken Thompson - Unix, Robert Griesemer - V8 engine, Java Hotspot VM, Chubby, Rob Pike - Unix, Plan 9, UTF-8).
It was primarily designed to resolve some key tech challenges that Google - the cradle of the Go language - was struggling with in the 2010’s. Here we’d better quote the face of the Go movement - Rob Pike himself - as no one can explain the reason behind Go advent better than its creators.
So, those were the factors. What problems did they cause? These are:
- parallel execution
- load balancing
- data splitting (to support concurrent calculations)
- testing/debugging of multicore apps.
And now that we are aware of the app development and hosting problems that the IT community was struggling with back in 2010’s, let’s have a look at how Golang addresses them.
Advantages of the Go programming language
The advantages of using Golang - its features that help the language address the modern-day issues listed above - can be divided into two groups. These are the advantages for the project and the advantages for the programmer.
Why use Golang for the project
To give you a better idea why big projects benefit from the Go language, we have to go back again to Google's story.
Simplicity and Efficiency
Google favors young blood. Its staff includes thousands of young enthusiasts who are in their late 20’s or have just crossed the 30’s border. To help them all stay on the same page and enable them to generate top value for the company, a simple, yet efficient language was created. Go is #12 on the list of the easiest programming languages to learn and is among the most efficient in use nowadays (compiled, allows for massive multithreading, concurrency, and great performance).
This combo means you have higher chances to get a neatly written code that runs fast and reliably. Many praise Go’s code readability, which is half of success in complex systems that are designed, developed and maintained by hundreds, if not thousands of people. And that was the plan!
Takes advantage of new-age IT phenomena
Golang was built to take advantage of multiple cores, which allows parallelism.
Take a look at the time line. In 2006 Intel’s Dual Core CPU went kind of mainstream and a year later Google starts working on its new language to natively take advantage of multicore.
Go isn’t the only programming language that does great at the tasks implying parallelism. Among others are C=, C#, Emerald, Java, Rust and more, but apart from parallelism, Go was designed to deal with other new challenges of its time. As Rob Pike puts it, the language “...must be modern. C, C++, and to some extent Java are quite old, designed before the advent of multicore machines, networking, and web application development. There are features of the modern world that are better met by newer approaches, such as built-in concurrency.” (Language Design in the Service of Software Engineering)
Thus, the Go language was specifically created to show high performance given the realia of the modern-age tech world - multicore, networking, cloud services, large-scale web applications, etc.
Enables great scalability
This explains why Go is so popular in China, which serves 1,3 bln mobile Internet users alone. They need scalability, and Go meets that demand hands off!
However, what makes Golang a perfect choice for large projects that demand high scalability? Let's refer to the community for the answers.
In his article “How Go allows you to build a scalable system”, Duy Huynh lists the language features that make it complex systems friendly. The author dwells on the misconception of the fundamental principles of a system's scalability and gives you his tried and tested recipe for building a scalable system with Go.
The bottomline is - if your priorities list includes scalability, give Go a go. Simple to code = simple to read = simple to scale = simple to maintain.
What companies are using Golang?
The list is long and is constantly growing. Not that it should be a decisive factor for you, but it’s just good to know that a solution you’re planning to use is a popular one (aka reliable).
To start with, it's Google who was, is and will continue using Go. Giant, ambitious projects are delivered using Go here.
Next go Docker and Kubernetes. These are pretty complex projects that are written in this relatively simple programming language.
Netflix, YouTube, Twitter, Apple, Dropbox, BBC and many more. Take almost any large company nowadays and it’s highly likely they code in Go.
Actually, you can check out the list of the companies that choose Golang at this link. So, yes, Golang is gaining momentum and is probably one of the most promising programming languages in the years to come.
Why should programmers use Golang?
Now as we’re done with the project part, let’s find out why programmers at your company will be happy to work with Go. This is far more important than many may think, as the success of your endeavours is highly correlated to the happiness/commitment of your talents. So, let’s go through the reasons why developers say ‘yes’ to Go.
Learning curve and community
Learning curve is #1 on our list.
Golang is a statically typed, cross-platform compiled, garbage-collected, open-source programming language. It comes from the C family of programming languages, which makes it easy to learn for everyone familiar with C, Java or JavaScript.
The semantics of Golang resembles that of the C programming language, although it does have its specifics. There is tons of useful info about it nowadays (golang.org, for a start), so there should be no problem among your employees with learning this powerful, yet relatively easy-to-use tool.
Another piece of good news is that Golang is an open source project. Currently, it has over 2000 contributors. Open source projects boast great transparency along with ultimate commitment of its contributors. Your developers can always join this huge team to learn from the others and polish new skills.
Moreover, the language community is large and growing - Gopher slack, Golang mailing lists, Global conferences, WomenWhoGo. Golang.org also provides updates on the community events on its dedicated page. This promotes active knowledge sharing and commitment. Developers are never left alone with their Go-related problems, that’s for sure.
Go’s concurrency
Concurrency can also go to the previous section, which is about the Go advantages for the project. So why did it end up here?
They say “mastering concurrency can make you a much more in-demand developer on the job market”... Hm. Pretty mercantile statement, but it has its grain of truth. Concurrency is one of Go’s absolute killers, as Go was specifically designed to support concurrency. In her great talk about Go, Aarti Parikh mentions that developers choose to study Go to master concurrency.
Furthemore, as multicore processors are conquering the world, this skill isn’t going to become redundant in time. So, learning a programming language with great concurrency features is definitely a great idea for a developer.
High performance
There are few things in day-to-day developer’s life that give as much satisfaction as a lightning-fast performing code.
Have a look at the chart below for programming language performance comparison. Although Go isn’t #1, it shows great performance scores.
See the complete list of tests at the original link.
Some other notable features of Go
Go is a garbage-collected language, which may seem a bit controversial to some tech experts, but Golang creators have an explanation to that. Along with controversy around garbage collection, Golang is known as the programming language that has no exceptions but does have some exceptional tooling (Gofmt).
Coding in Go guarantees flexibility of hosting and developing platforms, as Golang is cross-platform compilable. It is easy to run the app written in Go on any modern platform.
Read about all these things and many others in a great article by Rob Pike mentioned above. No one will depict his brainchild better.
Career opportunities
Golang opens up a lot of doors in front of software developers. As we’ve already mentioned above, Go is a programming language of choice for many tech giants of our time. Although it is a relatively young one, employers are ready and willing to even pay extra for the Go developers (median salary of a Go developer is $74,000 globally and $140,000 in the US).
If that sounds good enough for you, it will definitely be the same for your engineers. Go for it!
The applicability of the Go language
Nowadays Go’s application area includes:
- web apps
- network servers
- mobile apps
- machine learning
- image processing
- crypto
- load balancers
- system admin
- hardware scripts.
Some also claim Go is a perfect match for microservices, which gives it some extra points as microservices are on its top nowadays.
That being said, the range of the developer’s activities will be pretty diverse. Moreover, as Go is becoming more and more widespread, its application area is going to grow too.
Wrapping it up
In this article we discussed why using Golang would be great for your project (and for your developers).
Now you know why businesses can benefit from it (simplicity, efficiency, scalability, modern-age) and why programmers in particular would want to code in it (learning curve, notable features, career opportunities).
To use it or not in your project is definitely up to you to decide. Nevertheless, what we already know for sure is that Go has stood the test of time and is 100% here to stay.
The language is developing in a healthy and consistent manner. All its versions are backwards compatible, no significant changes were added that would make the life of a developer harder. Is it going to outperform its predecessors - programming languages like C or Java? We are yet to see (and frankly speaking, looking forward to it).
Stay with us on our blog. Find more great articles about modern programming languages, frameworks, software development trends and what’s not.
Contacts
Feel free to get in touch with us! Use this contact form for an ASAP response.
Call us at +44 781 135 1374
E-mail us at request@qulix.com