[openstack-dev] [tc] supporting Go

Eric Larson eric.larson at rackspace.com
Wed May 18 22:42:35 UTC 2016


Dmitry Tantsur writes:

> This is pretty subjective, I would say. I personally don't feel 
> Go (especially its approach to error handling) any natural (at 
> least no more than Rust or Scala, for example). If familiarity 
> for Python developers is an argument here, mastering Cython or 
> making OpenStack run on PyPy must be much easier for a random 
> Python developer out there to seriously bump the 
> performance. And it would not require introducing a completely 
> new language to the picture.

In one sense you are correct. It is easier for a Pythonista to 
pick up Cython and use that for performance specific areas of 
code. At the same time, I'd argue that OpenStack as a community is 
not the same as Python at large. There are packaging requirements 
and cross project standards that also come into play, not to 
mention operators that end up bearing the brunt of those 
decisions. For example, Debian will likely not package a PyPy only 
version of Designate along with all its requirements. Similarly, 
while 50% of operators use packaged versioned, that means 50% work 
from source control to build, test, and release OpenStack 
projects.

You are correct that my position is subjective, but it is based on 
my experiences trying to operate and deploy OpenStack in addition 
to writing code. The draw of Go, in my experience, has been easily 
deploying a single binary I've been able to build and test 
consistently. The target system has doesn't require Go installed 
at all and it works on old distros. And it has been much faster.

Coming from Python, the reason Go has been easy to get started 
with is that it offers some protections that are useful such as 
memory management. Features such as slices are extremely similar 
to Python and go routines / channels allow supporting more complex 
patterns such as generators. Yes, you are correct, error handling 
is controversial, but at the same time, it is no better in C.

I'm not an expert in Go, but from what I've seen, Go has been 
easier to build and deploy than Python, while being 
faster. Picking it up has been trivial and becoming reasonably 
proficient has been a quick process. When considered within the 
scope of OpenStack, it adds a minimal overhead for testing, 
packaging and deployment, especially when compared to C 
extensions, PyPy or Cython.

I hope that contextualizes my opinion a bit to make clear the 
subjective aspects are based on OpenStack specific constraints.

--

Eric Larson         | eric.larson at rackspace.com Software Developer 
| Cloud DNS | OpenStack Designate Rackspace Hosting   | Austin, 
Texas



More information about the OpenStack-dev mailing list