Golang: A Programming Language for Modern Enterprise Applications

DZone 's Guide to

Golang: A Programming Language for Modern Enterprise Applications

Golang is quickly gaining adherents. In this post, one Golang convert explains why he believes it's the next big thing.

· Web Dev Zone ·
Free Resource

A year ago, I never envisaged myself writing this kind of an article. However, any state in life is temporary and opinions change, positions can change, relationships can change, and so perspectives on programming language can change. An avid computer expert, I have coded in different higher level programming languages such as C, C++, Python, Java, Scala, JavaScript, and now Golang. Even though there was a time when I used low level programming languages (assembly languages), I never felt a propensity towards them. When I started using Java, it just clicked. It started with Java 1.2 and continued till Java 1.8. That remained the impression for many years of my life and throughout these years somehow I made a formidable opinion that Java is the best language for enterprise level applications.

The use of concurrent processes that communicate by message-passing has its roots in operating system architectures studied in the 1960s. The first widespread distributed systems were local-area networks such as Ethernet, which was invented in the 1970s. I have witnessed the change in era from monolithic architectures to microservices architectures and now to serverless architecture. A decade and half ago, a monolithic architecture was the key to make enterprise level applications. Distributed systems made their way to the market with the advent of AWS, Hadoop, and Facebook-type applications. Yes, Google and a few organizations were already there as page rank algorithm was already in production. However, distributed systems in enterprise level applications were not that common. Then there was an era of service oriented architecture and component-based architecture. ESB was a buzz during that time. During all of these years, Java’s market increased significantly and many enterprise applications preferred Java as the primary programming language. Obviously, other languages like Python, C++, and Ruby were always there and were significant enough to capture the remaining market share. As Python and Ruby could not really address the system performance issues, many enterprises migrated their code base to Java, which was performance centric and addressed aspects like concurrency and parallelism. The advent of the multi-core processor also helped Java, as Java made itself a front runner for the enterprise level system. For those who could not find the preferable language, the JVM-based languages such Scala, Kotlin, Groovy, and Clojure were chosen as alternatives.

However, things were changing behind the scenes. Virtualization came into the world and then containers. On-premise, private cloud deployments started moving to public cloud ones. Today, most of the systems generally employ hybrid deployment (a mix of both the worlds – public and private cloud). Many enterprise applications have become giant distributed systems. Because of different crucial driving forces, such as size of the application, atomicity, quicker go to market, and improved fault isolation, microservices architectures and serverless architectures have become very common. At the same time, Java has gone though many changes, including adding support for lambda functions, functional paradigm support, and features to support of streams.

On the top of such enormous changes in the syntax of Java, many frameworks such as Spring, Spring Boot, JSF, and Play have become the part of the language. Because of so many options and a drastic differences in between the NFRs such as security, availability, and performance these frameworks offer, it has become a tedious job to choose a framework, as experts market their framework as the best. So, building an enterprise application with Java is a challenge in today's world. Because of such things, it has become a challenge to write an application from scratch without giving a lot of attention to the language syntax and semantics. With lambda functions, it’s not as easy to debug Java-based systems as it was at one point in time. When I look back, I notice that many of the developers who claimed to be Java experts were reluctant to use advanced features of Java. Here I am talking about Java 1.8 onwards. I noticed such a mindset was common among many of the developers reporting to me when I was an engineering manager and many of the architects, developers, and technical leads to whom I provided my consultation and guidance when I was working as chief architect. And this was neither a stereotype nor a phenomenon specific to a particular region. This was common across different geographies including Pune, Tel Aviv, Houston, Sydney, London, and other locations. Those who used futures, lambda functions, and streams found themselves making very slow progress. There is a survey that indicates that there is a common fear among Java developers that when they write Java code (with new features), they cannot speculate what will happen to the other parts of the system. At the same time, technical debt and maintenance are highly questionable. For me, the last nail in the coffin was new licensing changes imposed by Oracle. There is a heightened confusion and anxiety around Java users about when organizations are required to purchase a commercial license. Ever since the announcement came out, small business owners and developers all over the world are worried sick. These were the different driving forces which forced me to look for an alternative for Java, especially in the enterprise applications. At the same time, I do want to emphasize that few languages have established themselves as the best in different arenas, such as Python and R in machine learning and AI, JavaScript in front-end, Java in big data tools (such as Cassandra, Kafka, Spark, etc.). This will continue for at least a decade or so. I experimented with Scala, Groovy, Closure, and so on. The sole reason for trying out these JVM-based languages was their similarity with Java. Finally, my exploration ended when I tried Golang.

Those who are not aware of Golang, here is a short history. Golang is a C-family language that was designed by Google. The designers of Golang are Robert Griesemer, Rob Pike, and Ken Thompson. By the way, these are the people behind UTF-8 abd Unix — one can sense that super genius brains are involved in the design of Golang.

What Was the Motivation for Creating Golang?

"Go was designed at Google in 2007 to improve programming productivity in an era of multicore, networked machines and large codebases." - Source

Release History

"Go was publicly announced in November 2009 and version 1.0 was released in March 2012." - Source

Advantages of Golang

  • Static typing and run-time efficiency (like C++ or Java)

  • Readability and usability

  • Shallow learning curve

  • High-performance networking and multiprocessing

Golang’s design is based upon three pillars

  • Simplicity
  • Performance
  • Robustness

Google has one of the largest cloud infrastructures in the world and it is scaled massively. Go is designed by Google to solve their problems of supporting scalability and effectiveness. Those are the same issues you will face while creating your own servers. On a personal front, after almost two years of developing Golang-based microservices in production that get deployed on Kubernetes (AWS EKS and standalone K8s), I can confidently say that for Golang is the future of enterprise applications. As a chief architect, it was my job to ensure that whatever programing language I choose for the new architecture of the system addressed the different architectural quality attributes including performance, security, resiliency, time to market, agility, developer productivity, and so on. For me, Golang is going to be a star of enterprise applications at least for a decade.

Each programming language has numerous connotations; however not all of them are significant in the enterprise applications world. If you are interested in growing your familiarity with Golang, then you are welcome to visit my GoLang sessions on Youtube. I have made sessions to cover the aspects that are absolutely essential in the enterprise application. For my Golang projects and tutorials, visit my GitHub.

concurrency ,enterprise applications ,go ,golang ,java ,web dev

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}