Bringing Go To The Cloud With The Gophercloud SDK

Filed in Product & Development by Sam Falvo | September 3, 2013 11:00 am

Go. It’s more than the opposite of stop and unless you’ve been living under a rock you’ve probably heard about this exciting modern language created out of Google by Rob Pike and Ken Thompson, both important names in the Unix community.

Rackspace is investing in Go by creating a multi-cloud software development kit (SDK) for the Go programming community called Gophercloud[1]. It will support OpenStack[2] first, Rackspace Cloud[3] second.

Rackspace firmly believes in a tool and API ecosystem where developers in any language aren’t locked-in on the API, or code level. This is why we actively contribute to packages such as Fog[4] (Ruby), jclouds[5] (Java), pkgcloud[6] (node.js) and libcloud[7] adding OpenStack support first, and then layering on Rackspace Cloud specific extensions.

The Gophercloud SDK aims to package OpenStack, Rackspace Cloud and other cloud provider APIs in a form more easily consumable by Go developers. Gophercloud uses Go’s unique support for structurally-typed interfaces to help isolate applications from any one specific OpenStack provider, and works hard to adhere to established Go-community standards.

Organizations of all sizes look to Go to improve their infrastructure in some way. Google, for example, successfully applied Go to both its central download server (dl.google.com) and to various subsystems in YouTube. Docker.io[8] uses it for implementing its virtual machine container software. Finally, Rackspace’s own Exceptional.io[9] has been using it for about a year now to help implement Airbrake[10].

For some users, Go offers the enhanced reliability that static typing promises. It’s like wrapping your code in Kevlar. For others, it offers cost-savings in the data center, as Go’s statically compiled binaries eliminate the overhead incurred through the interpretation of more dynamic languages. Small, highly efficient, single binary deployments mean more efficient utilization of existing infrastructure.

Go is a bit of a bridge between the performance of static-typed languages and the usability and ease of programming associated with dynamic languages. If you’re unfamiliar with what this means, it’s kind of like getting the good stuff from C and the good stuff from Python.

Go, as with Python, favors the “There should be one– and preferably only one –obvious way to do it.[11]” philosophy, which naturally leads to a well-factored standard library, testing and code formatting tools. While Go follows in the footsteps of C/C++ syntactically, it implements some sugar, which makes writing Go code almost as easy and compact as writing Python. This helps maintain code legibility without sacrificing the desirable properties of static typing. Everybody’s happy.

Gophercloud[1] is still very new and we welcome contributions, feedback, thoughts and ideas. We want to make an SDK that fits the needs of Go users everywhere. If you’re interested in getting started with or contributing to Gophercloud[1], check out our GitHub repository at https://github.com/rackspace/gophercloud[12]. You can also email the gophercloud[13] mailing list.

Endnotes:
  1. Gophercloud: https://github.com/rackspace/gophercloud
  2. OpenStack: http://www.openstack.org/
  3. Rackspace Cloud: http://www.rackspace.com/cloud/
  4. Fog: http://fog.io/
  5. jclouds: http://jclouds.incubator.apache.org/
  6. pkgcloud: https://github.com/nodejitsu/pkgcloud
  7. libcloud: http://libcloud.apache.org/
  8. Docker.io: http://www.docker.io/
  9. Exceptional.io: http://www.exceptional.io/
  10. Airbrake: https://airbrake.io/pages/home
  11. There should be one– and preferably only one –obvious way to do it.: http://www.python.org/dev/peps/pep-0020/
  12. https://github.com/rackspace/gophercloud: https://github.com/rackspace/gophercloud
  13. gophercloud: https://groups.google.com/forum/#%21forum/gophercloud-dev

Source URL: http://www.rackspace.com/blog/bringing-go-to-the-cloud-with-the-gophercloud-sdk/