Site icon Karneliuk

From Python To Go 000. Go as another automation language.

Dear friend,

It’s been a while since I’ve blogged for the last time. Probably it was too long since I’ve blogged. But, here I am back, with some new ideas and fresh perspectives. One of the key new idea is usage of Go, which I’m actively picking up now. And just shortly I will tell you why.

Do You Still Use Python?

We absolutely do. In fact, we not only using it, but also teaching it from the perspective of network automation. In our flagship training Zero-to-Hero Network Automation Training we guide you the whole way from having little to no theoretical knowledge and practical skills to a good level of developing automation software with Python. Python is at heart of many purpose-built network (and not only) automation systems, such as NetBox, StackStorm and many others. It’s ecosystem is vast and there are no signs of it slowing down. Therefore, getting good exposure to Python from Network Automation perspective is a good step to increase your own value and secure your job place looking forward. To be brutally honest, any network engineering role nowadays requires Python and/or Ansible knowledge, so don’t pass by.

Here is what we have to offer you.

We offer the following training programs in network automation for you:

During these trainings you will learn the following topics:

Moreover, we put all mentions technologies in the context of real use cases, which our team has solved and are solving in various projects in the service providers, enterprise and data centre networks and systems across the Europe and USA. That gives you opportunity to ask questions to understand the solutions in-depth and have discussions about your own projects. And on top of that, each technology is provided with online demos and labs to master your skills thoroughly. Such a mixture creates a unique learning environment, which all students value so much. Join us and unleash your potential.

Start your automation training today.

Why Go Now (in 2024)?

That’s a good question. From my perspective, there are a few dimensions, which are worth considering when talking about programming language for automation. Here are they in no particular order:

01. Certain Python Problems At Very Big Scale

We’ve been building network automation system of massive scale, managing thousands of devices simultaneously (not ex-aggregating). And as a result of building such systems certain Python pitfalls became very annoying, one of which is a Global Interpreter Lock (simply GIL).

Python is not the newest programming language. In fact, Python 1.0 was released 30 years ago, and earlier pre-1.0 releases were around since 1991. Back in those days CPUs used have only a single core. With the time, this has changed and it is not uncommon to have 4 physical cores / 8 hyper threaded cores on any modern laptop, not even mentioning massive servers having 64 core (128 hyper threads or even more). However, in the way how Python operates still to these days is that it uses only one core / one hyper thread by default. There are certain techniques, how you can improve that, such as multi-threading, multi-processing and asynchronous execution, which helps a lot, but they require code to be more complicated and they aren’t applicable in all the cases.

We cover all these techniques in our Zero-To-Hero Network Automation Training.

From my experience, you can use Python to manage even thousands devices, but you need to be aware of its specifics and what trade-offs you are to have, that is performance vs CPU/memory usage, etc.

So the first dimension for me was to explore what else exists in software development world, which can help me to develop and use more efficient automation tools. Although by this time I know that there is no Holy Grail, there may be tools for the job, which are more suitable.

02. Timing Means Ecosystem

When with my partners we started Network Automation Training back in 2019, we were thinking if we shall focus on Python or Go. After talking to experts in software development and automation areas we’ve chosen Python for a number of reasons:

  1. It had by magnitude bigger ecosystem for all relevant packages starting from modules to manage network devices via SSH/NETCONF to configuration templating and data processing.
  2. Entry level into Python is much lower compared to Go. It is possible to pick up Python and starting writing software very quickly, provided you have a right tutor, like us in Network Automation Training.
  3. Adoption of Python across industry is very broad and with Python skills engineers increase their chances for employment. That was one of the main motivations for us for creating our trainings.

At the same time, Go wasn’t just sitting there and doing nothing. It was being developed, a lot of great packages were created to simplify the development experience and allow people to focus on business logic rather than on heavy-lifting basic underlying libraries.

03. Overall Adoption

The latter statement is not just subjective. It is a reflection of what is happening with Go popularity worldwide. There is popular programming community index out there, which is called TIOBE Index.

Source: www.tiobe.com

According to this index, Go is 8th most popular programming language these days (although almost 10 times less popular than Python or 4 time less popular than C). It is even more impressive to take a look at a longer history of Go’s ascending:

Source: www.tiobe.com

Just in 10 years Go made into top 10 the most popular programming, bypassing many others. Arguable, its rise to popularity isn’t that meteoric as Visual Basic. The growth of the packages, from my perspective, is the main reason for that as explained above. Although, there two less obvious reasons, which I think is worth sharing:

  1. Google factor. This is very interesting angle, which myself I was not aware until 2022. That year I attended a great Nokia-organized event in London, where i had an opportunity (and associated pleasure) to talk to many senior engineers and executives from Nokia. One of them, good friend of mine, who is Brit but happen to live and work in US know, asked my opinion about GNMI and its utilization versus NETCONF. I was very enthusiastic about GNMI, and so I am today, so I broke down why I believed it is a great protocol. He listened to me and than shared that there are a number of his customers, big service providers, which at that time didn’t consider using GNMI just for a reason it is being developed by Google, rather than coming from IETF/IEEE type of organization. I was very surprised, but then I started analyzing it myself and I noticed similar notions in other cases, where products / tools coming from Google were polarizing people opinions: someone loved them someone hated them, there not often was a middle ground.
  2. Complexity. Go is way more complex than Python, so it is worth unpacking more.

04. Right Timing For Myself

I won’t say that Go is magnitude more complex than Python, but it is considerably more complicated in number of ways:

This list can be continued further. The good thing though about Go, is that it is easier than C, where you have to do an explicit memory management. Go in majority of cases does it for yourself automatically, so you don’t have to allocate/clean memory; although, in certain cases you have to.

As I learned C the last year, I’ve found many things in Go very similar to it, both syntax-wise and logic-wise. As such, the speed of my picking up Go is much quicker compared to if I didn’t have C knowledge before.

05. Thirst Of Knowledge

The final dimension is a thirst of knowledge. It is like a bug, which you cannot get rid of. It keeps your brain active to learn more to be able to solve business problems more effectively. It keeps you pushing frontiers of your capabilities further. And on top of satisfaction from accomplishment of business goals and tasks, it gives also satisfaction in academic plane as well.

Moreover, what I also witnessed is that once you progress with some new programming language, you inevitably improves in others as well. This synergy shall not be underestimated.

Alright, So What’s Now?

To a degree that I have time, I am aiming to create a series of blog posts about Go basics (and not only) with focus on network automation. That will be reflecting my own experience as I progress through Go myself.

A few more words

Don’t make a mistake, Python is here to stay, especially in infrastructure automation area. It is not a question of Python or Go. It is more Python and Go. So we suggest you to start with Network automation trainings with Ansible, Python, Docker, and many others today:

Summary

Go is a modern programming language. As such, many problems that has Python has it doesn’t have. It is simpler 2 times younger and it was created in era of multi-core CPUs by a company, which runs possibly the biggest IT infrastructure in the world, to manage this infrastructure. Many remarkable infrastructure tools, such as Docker and Kubernetes, are written in Go entirely. As such, I believe that having Go in your tool belt is a great advantage. Take care and good bye!

Need Help? Contract Us

If you need a trusted and experienced partner to automate your network and IT infrastructure, get in touch with us.

P.S.

If you have further questions or you need help with your networks, we are happy to assist you, just send us a message. Also don’t forget to share the article on your social media, if you like it.

BR,

Anton Karneliuk

Exit mobile version