Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

YouTube scales MySQL with Go code

Joab Jackson | Dec. 17, 2012
YouTube engineers are developing a set of software, called Vitess, that will help open-source MySQL databases work more efficiently in very large-scale production environments. To write the code, they are using Google's programming language Go.

Using Go has allowed YouTube developers to be more productive than they would have been using a more traditional language, Sougoumarane said.

Go code compiles quickly, he said. The 30,000 lines of code in Vitess can be compiled into binaries in about 30 seconds. And, thanks to a rich set of libraries, many tasks do not require that much programming. For instance, Sougoumarane wrote a 105-line routine that periodically trims log files, functionality that couldn't have been written in as few lines by using C or C++.

"That's how expressive Go is," Sougoumarane said. "The language features are well-thought-out. They help you compose things in a much more elegant way than traditional languages." Sougoumarane also praised Go's concurrency support, vital for use in multicore processors. "You don't have to worry about managing threads. Go manages them for you," he said.

The language also has some downsides, too, Sougoumarane admitted. Error handling could be improved, for instance. Scheduling and garbage collection could use some work as well.

Solomon said that, over time, Vitess will take on additional duties, such as database replication and automatic sharding, so a database can grow across multiple servers with no intervention from administrators.


Previous Page  1  2 

Sign up for Computerworld eNewsletters.