Go language struggles in the OpenStack community

Source: Internet
Author: User

1 Background Introduction

Almost all of the code before Swift was implemented in Python, but performance has been unsatisfactory,

Community to solve performance problems, tried many methods, and later found in the Golang language for a part of the code rewrite,

Performance has been improved somewhat, and the community has named this partially rewritten branch hummingbird.

But the current OpenStack infrastructure is not yet able to support the Golang language,

such as running unit tests, integration testing tools support.

As a result, the Hummingbird Branch community cannot be completely combined and managed in accordance with the general Python code.

The community was then asked to apply for the OpenStack community to provide support for the Golang language, which sparked intense community debate.

2 Golang the pros and cons

(1) Benefits to OpenStack:

performance: directly compiled into machine code, do not rely on other libraries, the operating environment is not limited to a certain CPU core, can effectively utilize multi-core, than native Python in the processing of bottlenecks in the business performance of an order of magnitude.

Concurrent Processing: Go routine and channel greatly reduce the difficulty of writing high concurrent servers, in many cases do not consider the locking mechanism too much.

(2) Problems for OpenStack:

A project in two languages requires multiple branches to be maintained at the same time, and it is difficult to find people who are proficient in Python and Golang.

The community may face a split between Python and Golang, and all projects may be rewritten by go.

The need for infrastructure support is also a small expense for the community.

3 Community Core views

(1) Pro-faction:

Think that Golang can solve the performance problem for the community, but also is the technology development trend, the industry has many cloud platform is based on the Golang development,

The most popular Docker is also developed with Golang, and the community has no reason to stop innovation.

(2) Opposition:

Think that in fact Python can also write high-performance code, from the current Golang language requirements are mainly from the data surface,

OpenStack is primarily positioned as a control plane. At the same time, in order to support a new language, the community needs to invest a lot of work, the cost of introducing too much.

4 Various solution proposals

(1) OpenStack introduces Golang

The coexistence of two languages poses many challenges to the work of the OpenStack community: the need for community-based infrastructure support,

At the same time, the various Kua project team to add a lot of work, such as documentation, release management, etc.;

Need experts who are both proficient in Python and proficient in Golang.

Introducing Golang as the official language, the community feared someone would rewrite OpenStack's project with Golang.

At the meeting, it was suggested that if Golang became the official language, he would first come out and rewrite OpenStack with Golang.

(2) OpenStack does not introduce Golang and OpenStack is positioned as a control plane.

Split Swift into two parts: the control surface and the data plane.

Control polygons are managed in the OpenStack community (similar to Cinder, Manila), while data surfaces are managed in other external communities.

Some people think this approach makes OpenStack incomplete, and if OpenStack follows only the control plane,

Then OpenStack is like a rest Wrapper, with no technical content and no technical innovation.

This extends the positioning of OpenStack: Whether it is positioned only as a control plane.

(3) Clarify the use of the respective language

Python is positioned to do most of the functions, and JS positioning is used to implement Web,golang for some functions related to native.

5 Some voices in the community

Some people think that the introduction of go, so many features need to be completely rewritten, not in line with the open source spirit, even if go accepted as the official language, he will first start with Go rewrite OpenStack project.

Some people say that before Python and Perl, C also argued, then some people think C can also write any function of code, but finally python became mainstream, and now should not hinder Golang.

Some people think that for go to maintain a branch, infrastructure requirements, costs are very large, but also release management, document management and other aspects of work, the introduction of the cost is too high.

Some people think that innovation cannot be refused because it is difficult to say.

Some people think that if OpenStack is just a control plane, then OpenStack is a rest Wrapper, there is no innovation, need to have data surface, should support Golang.

There is no concrete verdict in the community, and the discussion will continue ...

Editor's note: This article comes from OpenStack Open Source Team engineer Li Zhonghua

Battle of the Go language in the OpenStack community

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.