You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
3.6 Programming language and software choice<br />
3.6 Programming language and software choice<br />
Main programming language<br />
Since this work is based on the existing codesearch tools published by Russ Cox [2] , which are<br />
written in Go [16] , it is a very natural decision to choose Go for building the web service, too.<br />
Additionally, Go was designed in the first place to be used as a language for building server<br />
software, especially for the web. This is not surprising given that the origin of the language<br />
is Google, where Go is used in production 2 . Other companies have generally found their<br />
experience with Go to be positive 3 and the author of this work has done several successful<br />
projects with Go himself.<br />
Despite being a relatively new language, Go’s performance is good enough for the volume<br />
of requests expected in the near future for <strong>Debian</strong> <strong>Code</strong> <strong>Search</strong>: a typical HTTP service<br />
implemented in Go handles about 1500 to 2000 requests/second [19] .<br />
Note that not every little tool used within this project has to be written in Go. Where<br />
appropriate, other languages such as UNIX shell script have been used, for example for<br />
unpacking the <strong>Debian</strong> source mirror.<br />
Software building blocks<br />
The webserver nginx is used to ease the load on the search backend by serving cached<br />
or static assets, to terminate HTTP connections for end users and to distribute the load<br />
between multiple servers. nginx has very compelling performance [8] with a small memory<br />
and CPU footprint even for thousands of connections. While there are alternatives with<br />
similar performance such as lighttpd, the author prefers nginx for its simpler and cleaner<br />
configuration. Also, nginx seems to be the fastest most popular webserver [18] .<br />
To store computed information like the per-package ranking without inventing a custom<br />
file format for every little piece of information, the relational database PostgreSQL is used.<br />
Again, this choice is because of personal preference and familiarity with the software.<br />
Development of the software uses git as the source control management system (SCM).<br />
Experience has shown that it is the most popular SCM for Open Source projects and thus<br />
removes another barrier for contributors.<br />
2 http://golang.org/doc/go_faq.html#Is_Google_using_go_internally<br />
3 https://developers.google.com/events/io/sessions/gooio2012/320/<br />
13