Devworx talks to Gautam Rege about Gophercon India
The second Gophercon in the world was held in India this February. Gautam tells us why Golang is the next big thing.
Mithun: How did Gophercon come to be?
Gautam: Last year 2014, we had one of our directors at Josh Software, Satish Talim who had gone to Gophercon, Denver, that is the first Go(programming language) conference in the world. When he was there, he realized that there is a lot of boost for this and since Josh Software was already making some kind of foray into Go at that time, but we were just experimenting. He came back and said that we should do this conference here. We were already organizing conferences in India like RubyCon India, DevOpsDay and Deccan Ruby Conf, he said let’s do this. Now, Go Conference in India was a big risk because we had no idea what the response would be. But we took on the challenge and we got that going. It took us about eight months into preparing and it was the second conference in the world that happened after Gophercon in Denver, at this scale of about 350+ people coming in.
Mithun: Did you have developers only or companies were there as well?
Gautam: We had a platinum sponsorship from Google and all the other companies were either Indian or MNCs, who had a base in India. So, the conference was a mix of a lot of developers and company owners. Go is a language where if you don’t get the top management of the company promoting it, it’s not going to happen. A lot of people there were from funded start-ups. We had people from Couchbase, Phoenix, Josh, etc., attending as well. There were a lot of gold and platinum sponsors with their owners who were there at the conference. Of course, this was a techie conference so we expected a lot of developers there. In fact, I think there must have been one or two sales, marketing and PR non-technical people in attendance.
Mithun: I’ve heard that you are interested in developing talent yourself, so what was about Go that you decided to devote resources towards this particular language?
Gautam: Go as a language is like going back to the 70’s. In the hardware industry, Moore’s Law states that every few years, the size of the microprocessors are going to get smaller and they are going to get faster. But in the software line this never really happened because the hard-core systems which we are actually talking about today are still based on C at the lowest level. We talk about JAVA, JAVA runs on JVM which is written in C, also the same case with .Net, where the runtime is again written in C/C++ and C++ has evolved from C. These concepts go back to the 70s, so ultimately all our software is running on stuff that was built on C in the 70s.
One of the founders of Go, Rob Pike, was part of the late 80s-90s consortium which was talking about languages. He spoke about different things and finally he is working in Google now and at around 2006-07 he started saying that it was time to build something new. The hardware infrastructure is so big but the software infrastructure is still not geared towards this. So, Go as a language boasts about speed and core-concurrency. For example, if I’m running a program on a dual-core or quad-core machine, can you guarantee that my program is actually concurrent, am I getting better speed because of the hardware? Suppose I run a program on a dual-core and I run the same program on a quad-core, it’s not just dependent on the way the software was written but it is also dependent on the way the operating system treats the JVM.
In Go, you can run the same software on a dual-core and it can be twice as powerful on a quad-core and it can be almost eight times faster in octa-core. I’m saying “almost” since there would be a little latency. So, imagine as my hardware scales, so does my speed of the program that I’m running on. That was the one core thing that bought Go into the limelight. Google started building tools for implementing large scale deployments and ensuring that they can do a lot of deployments, lot of infrastructure management using Go. Soon, however, that started becoming the go to language, and if I want to do something that uses Go which is easier and faster. I see the biggest fear of a layman C programmer is when it comes to pointers, memory management and stuff. Go can do memory management, give you the power of pointers, it can give higher data structures of hashes which are native, instead of threading there is a concept called Go routines.
Go routines are not threads, they are not lightweight threads, they are somewhere in the middle. Basically, they will call system threads but I can multiplex millions of Go routines over system threads. Which means if I can run, say 20 million Go routines and the system isn’t consuming a lot of resources and they are harnessing the power of multi-core. So I can have two Go routines running on two cores at the same time, which is a huge boost for me. The other brilliance that comes in is that it starts off with going towards the language construct and they removed all the garbage that came along with the older languages, everything we built had many negatives. Unfortunately, the higher level languages had to live with the lower level language’s idiosyncrasies. Go doesn’t need to do that since it goes to the basics. For example, it is not object-oriented but it supports interfaces. Go has errors but no exceptions. It doesn’t have classes but it can very easily simulate it by having functions for structures. It is also very modular since I can go modelling things from bottom up rather than top down.
Mithun: Is the simplicity guaranteed? As programming languages age there will be functions that get deprecated and a lot more bloated unwanted code is bound to get it.
Gautam: That’s the beauty of it. The core team of Go which is pretty large, and simplicity is the major word of Go. So, they go slowly and add features if required otherwise we land up with a lot of clutter and because we have to ensure backward compatibility you cannot remove things. Most of the languages go with a lot of additional features but then you get stuck with a lot of deprecations and a lot of redundancies. Go says go slow, and Go doesn’t support many generics, in fact there are hardly any generics in Go. It also enforces a programmer to think like a programmer. We are so used to higher languages like Python and Ruby that nobody knows whether to use an array or a hash. But it is critically important for a programmer to know when to use an array and when to use a hash. If you try to iterate a hash, you are never guaranteed the order in which you inserted. So if you write a hash or iterate a hash, the program is going to crash and it is going to tell you that you are doing something wrong, so it notifies you to avoid the errors. This is a cool part of Go, that by the time you finish writing the program and if it compiles, not interprets, chances are that your program is going to run without an error.
Now even though it’s a compiled language, I don’t need an interpreter or any other dependency on the operating system. I can virtually take the binary on my machine, give it to you without any dependency to turn around in the machine of course with the same architecture. The reason of the size of the binary being huge is because Go decided to take the route of being statically compiled. Most of the other languages use the dynamic linked libraries (DLLs) on Windows and shared objects (SOs) on Linux/Unix based operating systems. So, what Go does is when it makes the binary, it takes all the static objects and puts them into one big binary.
When we started computers in the late 70s or 80s, there was no concept of shared libraries and static library binaries were big. The reason why shared libraries came into the picture was because the disk space, memory was very expensive at that time. But today the low-grade machines that you see have 4 to 8GB of RAM, the lowest grade laptop that you buy will have a 1TB hard drive.
Mithun: So wouldn’t this affect incremental updates?
Gautam: Yeah, in fact it is faster because loading 50MB in the memory is a breeze. To give you an idea about how processes work in an operating system, even when you have shared objects, a copy of the shared objects are linked in the memory. So you’re not reducing your actual memory space, you are reducing it marginally, after all I need my address space. Even when I’m loading a full binary, that entire binary being loaded into the address space in my memory is not going to reduce or hamper my memory in any way. Because 50MB loaded in the memory is actually going to be 60MB in memory space when you’re loading in the process. It’s fine even with embedded operating systems, which is the reason why many people are looking at Go being used on devices as a switch. A lot of IoTs use Go because it is so easy to deploy and it takes nothing to transfer a binary of 50MB.
I don’t need to think about upgrading the operating system, the runtime, any XML library or anything. I just need to bother whether the binary works. There is an entire operating system called CoreOS which is built on Go and it is meant for large scale system deployments. So if I update a package in some space, it automatically uses a library called Docker used for deployments, where we push all these updates over an entire cluster. So imagine an entire shared data center with say, a thousand servers running this operating system on CoreOS and if I have one server patch and I wish that OS patch to go seamlessly across the cluster, update it everywhere successfully without any issues. It is not peer-to-peer. The CoreOS infrastructure for deployment is slightly different though it is based on Docker so, once something is updated, it will pick it up from anywhere randomly. So, it’s not like BitTorrent but based on the same protocol of having a central repository. So there won’t be any central source where people will be leeching that would lead to low latency and delay. So, effectively it’s a torrent system. This is where Go is becoming so mainstream that there are a lot of companies which are moving away from their traditional technologies including Python and Ruby.
Go is excellent for heavy lifting. For example, if I have to send a million emails, like a newsletter for our services, I can use a third party tool which is expensive or suppose I am a mail delivery service like SendGrid which sends about 10-15 million emails a day. Now for them to scale on their existing infrastructure, it is really difficult. You have to think about heavy duty infrastructure and still it takes time. They upgraded to Go and now they have scaled down their hardware infrastructure and they are able to send all these emails in less than 30% of the time it took previously. Utilization of the CPU was 70% lesser. So, we have reduced server resources, time and infrastructure and increased the productivity, that’s what we call heavy lifting.
As a services company, we see a huge benefit, since most of the applications you build requires to be web-based, requires the internet and mobile. Doing all the front-end work where you look at how you render, how quickly you model data and build things and letting Go do the heavy lifting is like a win-win situation in terms of time, resources, cost and everything. That’s why we started getting into Go in the last few years. Initially what was an experiment is now becoming the larger part. But it is not going to replace traditional languages. I refer to Go as ‘C on steroids’, because any C programmer falls in love with Go directly. And because of the fact that even though Go is not object-oriented it can do everything an object-oriented language can do and also can do it faster, giving you more control on the memory due to pointers.
Mithun: Do you see a lot of C programmers getting converted into Go programmers?
Gautam: No, we are looking at a lot of programmers who are willing to experiment to fall in love with Go, which is pretty easy. You don’t have to be a C programmer to learn Go, you need to be a programmer to learn Go. So, we at Gophercon saw a different breed of programmers. We had people from the Ruby, Python and C backgrounds. There was a speaker who was seeing the centre for excellence in wireless technologies and we were amazed that they were using Go to simulate wireless substations and entire wireless topologies. They are using Go because it reduces the build time which was earlier done in MATLAB from like eight days to a few hours. And we were ecstatic. We had people talking about Go in building embedded systems and web applications. So people from various different technologies are getting to Go because they see a lot of benefits from the language itself.
Mithun: So is Google the primary entity that’s actively developing this language and the community?
Gautam: Google started it, but this is a community driven thing. So, you won’t see Google promoting Go, they will be supporting Go which is entirely different. They support the development and now the current team is completely open source driven. For the first two years, they had a Google team which was part of the community effort that was controlling it. But now it is a largely community driven thing and Google is there to support it. In fact, the other important advancements that they made with Go is that the entire Android platform is now going to have Go support in a future release, and there is already something called Go Mobile which is building Android applications. In my personal opinion, it will just be a matter of time before the entire Android platform which is currently a JAVA based OS, shifts to Go. And when that happens maybe in the next 5-7 years, Go is going to be the mainstream language everyone wants to get into, which is one of the reasons why we hopped on the bandwagon early, ahead of the curve.
Mithun: Is there any concern on Google showing its commercial interest in Go that might steer the development in a particular direction?
Gautam: Google has no control over the language, they support it and can’t control it. It is open source now.
Mithun: Are there any more conferences for Go in 2015?
Gautam: The next conference of Gophercon is happening in Denver on 8-9 July 2015 and in India it is going to be there next year and it is going to be bigger. This was the first time we were doing it, so we were actually worried. There was me and three other people organizing this conference, and we were wondering whether people will buy tickets, whether we’ll get sponsors and we got an overwhelming response from everyone. We even tried to limit the seats to 200, there was a request to increase it to 300, the tickets were sold out two months before the conference, we got a plethora of sponsors coming in, people asking us that they want to be sponsors and we got a surplus.
Mithun Mohandas
Mithun Mohandas is an Indian technology journalist with 10 years of experience covering consumer technology. He is currently employed at Digit in the capacity of a Managing Editor. Mithun has a background in Computer Engineering and was an active member of the IEEE during his college days. He has a penchant for digging deep into unravelling what makes a device tick. If there's a transistor in it, Mithun's probably going to rip it apart till he finds it. At Digit, he covers processors, graphics cards, storage media, displays and networking devices aside from anything developer related. As an avid PC gamer, he prefers RTS and FPS titles, and can be quite competitive in a race to the finish line. He only gets consoles for the exclusives. He can be seen playing Valorant, World of Tanks, HITMAN and the occasional Age of Empires or being the voice behind hundreds of Digit videos. View Full Profile