Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon

Why is Go the go-to language for cloud native development? - An interview with Mina Andrawos

Save for later
  • 16 min read
  • 30 Mar 2018

article-image
Golang is currently one of the fastest growing programming languages in the software industry, finding its way into almost every nook and cranny of application development. Its speed, simplicity and reliability make it the perfect choice for all kinds of developers.

We recently interviewed Mina Andrawos, an experienced Go engineer and the author of the book, Cloud Native programming with Golang.  Mina explains why Go is being rapidly adopted in various development areas and by leading projects like Docker and Ethereum, how it is evolving as a language and what makes it great for cloud development. He shares expert insights into Go’s adoption for mobile development, embedded systems and the serverless web. He has also thrown light on the new directions of cloud computing and how Go makes development a piece of cake.

Author’s Bio


Mina Andrawos is an experienced engineer who has developed deep expertise in Go by using it personally and professionally. He has written numerous Go applications with varying degrees of complexity. Other than Go, he has skills in Java, C#, Python, and C++. He has worked with various databases and software architectures and is skilled with the agile methodology for software development. Besides software development, he has working experience of scrum mastering, sales engineering, and software product management.

cloud-native-go-programming-img-0

Key Takeaways

  • The 3 most notable features of Go are its concurrency model that sets it apart from mainstream languages, the fairly mature standard package which covers a wide range of use cases and its ease of deployment.
  • Go is designed to be simple and intuitive, yet reliable and robust for application development.
  • There are currently several mature tools to write Go programs, like VSCode, Vim, Atom or Sublime text.
  • Mina’s book Cloud native programming with Golang helps you build production level cloud native microservices and covers a wide range of important topics in the space such as types of message queues, docker containers, how to monitor microservices, perform continuous integration and much more.
  • Go can be viewed as a hybrid between mainstream statically typed languages like Java, and popular dynamic scripting languages like Javascript.
  • Go was built with the goal of being fully cross-platform in mind, and it can work in smaller mobile processors like ARM.

Full Interview


Go is one of the most popular and fast growing programming languages. What according to you, are the 3 notable features of Go?
Go is a very remarkable programming language. Numerous articles were written about the advantages of the language. Trying to gather notable features in Go can actually produce enough material to fill a number of white papers. However, having said that, let’s try to squeeze three out of them:

1. Concurrency: Go’s unique concurrency features are legendary. The language offers a concurrency model that stands apart from most mainstream programming languages. Go advocates a different way of thinking about concurrency problems in modern software. In one of the articles I wrote, I have described what concurrency means in the Go language.
2.  The Standard package: Go has the advantage of being coupled with a fairly mature standard package, which covers tons of key features for building modern software. This means that once you install Go, you can build production level software that can cover a wide range of use cases from Restful web APIs to encryption software, before needing to consider any third party packages.

3.  Ease of deployment: A program written in pure Go code typically compiles to a single native binary, which basically makes deploying an application written in Go as easy as copying the application file to the destination server. In other words, there is no special software needed to run Go applications in production servers like language runtimes \ virtual machines (As an example, for Java programs, we need to install the Java runtime environment in our production servers to run our programs) . Go is also cross platform, so you can target an operating system of your choice when compiling a piece of code.

You have been developing software for quite some time now. What tools do you use on a day-to-day basis?
Programming is a very fun craft, and the tools we use in our development are integral to making the environment enjoyable. For me, because I work with multiple programming languages, I use different tools based on the project.

My current tool of choice for the Go programming language is VSCode, combined with its Go Plugin by lukehoban.  This is just my preference however. There are lots of other tools that could be used to write Go programs. Some developers prefer Vim with all it’s popular features, while others prefer Atom or sublime text. There is also a Go plugin for the IntelliJ IDE, which I had used in the past and really liked.

What kind of learning plan would you suggest to web developers who are interested in using Go as their main development tool to build Cloud Native Applications? What aspects do you feel are tricky to get past?

The plan would include three steps:

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $19.99/month. Cancel anytime
  1. Get comfortable with Go.
  2. Learn the design patterns, the software tools, and the technologies of cloud native applications.
  3. Get familiar with a cloud service provider (like AWS, Azure, or Google cloud)


Go is designed from the grounds up to be simple and intuitive. This makes learning Go a better and more straight forward experience compared to many other languages. For developers new to Go, one of the best resources to start learning Go, is the Go tour.

Once the developer is familiar with Go, then they are ready to move to the next step of the learning plan, which is to learn the design patterns of cloud native applications, as well as the software technologies needed to build and deploy such applications. A good way to start is to check out my newly published book: Cloud Native Programming with Go. One major advantage of the book is that it not only covers the technologies and design patterns associated with cloud native applications, but it also connects these technologies and design patterns with Go, which makes it an excellent resource for Go developers looking to build cloud native software. This, in my opinion, is the trickiest aspect a software professional needs to get past to acquire the necessary skills to build cloud native applications.

For the third step, the execution will depend on the cloud service provider that you or your business would like to work with. Some enterprises like to utilize their own private clouds, while others are tied to a mainstream cloud provider due to existing contracts or executive preferences. For AWS, my book should provide enough insights into  how to write Go cloud native applications, that are capable of making use of the cloud platform.

In the context of all the above, how does your book, Cloud Native programming with Golang, prepare its readers to be industry ready? What are the key takeaways for readers from your title and how does your book help with the learning curve?

The book was the product of great amount of research, sleepless nights, and focused effort. I am a coauthor of the book with Martin Helmich, who I enjoyed working with immensely. The book was designed from the get go to expose the reader to the practical experience needed to build production level cloud native microservices in Go, with the least amount of fat.

It takes the reader into an expanding learning journey, which starts from the ten thousands foot view of cloud native microservices, then dives deep down into all the different aspects that need to work together in harmony in order to produce production level cloud native applications.

It will prepare you to be industry ready by covering a wide array of topics that are vital in a production environment. Examples include: Different types of message queues found in production environments, docker containers, monitoring microservices via Prometheus, continuous integration, Restful APIs design, security and authentication, AWS Go APIs, NoSQL databases, ReactJS, and more.

What makes it so special that it doesn’t shy away from covering sophisticated and diverse topics from scratch. For example, if you look at the Restful API chapter, we don’t assume that you already have knowledge of the HTTP protocol or web services design. Instead, we build the concepts with you from point zero up. The only knowledge you need before reading the book is some familiarity with the Go language. Another example is our message queues chapter, you can start reading the chapter knowing nothing about message queues, but then finish the chapter with more than enough knowledge to be very effective in utilizing message queues in your applications.

The book is perfect for readers who want to begin learning how to build cloud native microservice applications. It will carry the reader from a beginner level to a point where they become capable of tackling advanced tools and design patterns in that space.

You've been working with several other languages like Java, C++, C# and Python. How does Go compare to the other languages you've worked with?

Go, in my opinion, could be viewed as a hybrid between mainstream statically typed languages (like Java), and popular dynamic scripting languages (like Javascript). That is because Go doesn’t require the same level of verbosity that you would need in a Java program. However it’s still a bit more verbose than an equivalent Javascript or Python implementation, luckily, Go makes up for this extra verbosity compared to dynamic languages, by delivering software that is much faster than the equivalent Python or Javascript implementation.

One very hotly debated feature that is missing in Go is generics. Some people in the community believe it’s a good thing Go doesn’t have generics, while others can’t wait till Go maintainers are convinced that generics need to be added. From my personal experience, I have come across situations where it would have been nice to have generics, however it never got to the point where I couldn’t complete the task at hand. Having said that, there are some situations where you can argue that a piece of Go code might be a bit more verbose than an equivalent piece of Java code that makes use of generics.

As mentioned earlier, Go’s concurrency model is different than almost all mainstream programming languages. Once you master the building blocks of Go’s concurrency model (namely, Go channels and goroutines), you can build very powerful concurrent software with relative ease. I always find writing concurrent software in Go to be a much more smooth experience for me than writing concurrent software in other languages.

Also another mention from earlier was the ease of deployment. I never tire from enjoying how easy it is to deploy my Go programs to production compared to other languages.

One last notable mention is the tooling. Since Go is a relatively new programming language, the tooling is not yet as fancy as what’s available for older languages like C# or Java for example. However, having said that, the Go ecosystem is maturing nicely every day, and we have more than enough tools right now to build fairly sophisticated software in Go. There is no more proof of this fact than the uprise of advanced software projects written in Go like Docker and Ethereum.

You've worked with JavaScript as well. What's your take on using Go for full-stack web development / Isomorphic web development, over JS?

That is a very interesting question.

For people not familiar with the term ‘isomorphic web development’, it basically means using the same programming language for most of the front-end and the back-end components of the web application (combined with CSS or LESS or some other front-end styling technology). There is an important distinction to make between ‘Isomorphic web development’, and ‘full-stack web development’. You can be a full-stack web developer, while using Javascript for the front-end in addition to another language like Go or Ruby for the backend. However, if you are building an ‘Isomorphic’ web application, the idea is that you make use of one language for almost all your code, whether it’s on the front-end or the backend.

I think Go enjoys being in the sweet spot where simplicity meets performance. That is because, Go comes included with out-of-the-box packages, that make web development relatively smooth. Not to mention a growing third party ecosystem, that complements the standard package and further facilitates writing web applications in the Go programming language. Having said that, Javascript was built initially for the sole purpose of front-end web pages, but then grew in scope after the Node.Js project came into existence, which made Javascript a more than capable backend language as well. So for the sake of being neutral and impartial, I would like to cover some advantages and disadvantages of using Go for web development vs Javascript.

Let’s start with the disadvantages of using Go for web development compared to Javascript: Javascript is a language that could natively be used in the frontend and the backend components of web applications, this will always be an advantage of using Javascript over any other programming language, when it comes to web development. However, in case of Go, this disadvantage is countered to some extent, by the existence of GopherJS . GopherJS converts Go code to Javascript code. This means that you can write front-end code in Go, then have it converted to Javascript in order to work on the browser, which will get you very close to the isomorphic web development experience you obtain from using Javascript on the frontend combined with Node.JS on the backend. GopherJS is a very popular project, with more than 6000 stars on Github. People use it and it delivers them results. Having said that, the disadvantage of GopherJS is that it’s not native, since it converts your Go code to Javascript code, which means that when tricky issues happen, you may need to troubleshoot the auto-generated Javascript code, which is not always a fun experience, especially if your reason for using GopherJS is to avoid Javascript in the first place. Your experience will vary based on your projects, and the goals you are trying to achieve.

Where do you see the future of Go's development going? What changes or improvements can the community expect in future releases?

Go is growing in popularity every day. I see an immensely positive outlook for the future of development in Go. I think the sky's the limit. Go currently powers some of the most exciting projects in the industry, like Docker, Kubernetes, and Ethereum, among many others. Not only that, but Go also became integral to the operations of major players in the software industry Like Google and Uber, among many others as well.

All of this richness of the user base, provides Go unprecedented opportunities for growth and adoption. Engineers and maintainers who experienced Go first hand, tend to use it in their future endeavors, further enriching the ecosystem.  The language had been fairly stable and consistent for a while now, and no substantial language changes are to be expected in the near future. So if you start learning Go now, you skills will stay relevant for a long time. Most of the improvements currently getting added to Go are more related to it’s runtime performance as well as standard package enhancements.

Are there any interesting areas of implementation you've noticed Go finding its way into? Do you think the language would be best fit for any specific kind of development?

One interesting area for me that Go is starting to find it’s way into is mobile development. Since Go was built with the goal of being fully cross-platform in mind, it can work in smaller mobile processors like ARM for example. This means that programs written in Go not only can work in server and desktop operating systems -like Linux, MacOS, and Windows- but they also can function in mobile environments like Android and IOS.  Having said that, it is important to mention that the ecosystem for developing Go apps on mobile devices is still young and maturing. If curious, you can check https://github.com/golang/mobile for Go’s mobile tools. There is also an interesting Go framework that is still in early development but looks extremely promising as a tool to write mobile applications in Go, you can find it here: https://gomatcha.io

Regarding best fit use cases for the language, I see Go as a powerhouse for backend software development. Especially the kind of modern backend that relies on microservices and distributed architectures. The power that Go gives you in the world of the server backend is indisputable.

Can you give developers 3 reasons why they should pick up your book?

  1. This book Cloud Native programming with Golang covers a diverse set of practical topics from scratch, that can help the reader build production level cloud native microservices. We did a lot of research to put all these topics together. I honestly doubt you would find another resource that would cover all those topics in one place. Example of topics covered are: Restful APIs, Secure microservices, message queues (Kafka, RabbitMQ, and AWS SQS), ReactJS, MongoDB, DynamoDB, Docker, Kubernetes, AWS, microservices monitoring with Prometheus, and continuous delivery, among others.
  2. Additionally it covers the topics in a logical top-down order, which solidifies the learning process. So we start the journey by covering the 10,000 foot view about how a cloud native architecture looks like, the design, the thinking process, the scalability, and more. From there, we take satisfying deep dives into the different aspects of cloud native applications.
  3. Towards the end of the learning journey, we don’t just leave the reader with no direction. Instead, we offer a path forward to where they should take their learning journey to the next level.


Amazon recently added Lambda support for Go. What's your opinion on Serverless Go? Would it go hand in hand with Cloud Native development?
It was a very exciting announcement indeed. I believe serverless support is a powerful tool in the developer’s toolbox to build cloud native applications in Go. The option to include a serverless component in your application, allows you to automate very focused triggered tasks that are not supposed to run forever. This ability helps you build better cloud native applications in the long run. Microservices, on the other hand, are better suited for tasks and operations that are expected to run continuously.

If you enjoyed this interview, do head over to check out Mina’s book, Cloud Native programming with Golang.

cloud-native-go-programming-img-1