X

Google hopes Go will give a browser boost

The Net giant is working to integrate its new Go programming language with its Chrome browser and Native Client technology to speed Web-based programs.

Stephen Shankland Former Principal Writer
Stephen Shankland worked at CNET from 1998 to 2024 and wrote about processors, digital photography, AI, quantum computing, computer science, materials science, supercomputers, drones, browsers, 3D printing, USB, and new computing technology in general. He has a soft spot in his heart for standards groups and I/O interfaces. His first big scoop was about radioactive cat poop.
Expertise Processors, semiconductors, web browsers, quantum computing, supercomputers, AI, 3D printing, drones, computer science, physics, programming, materials science, USB, UWB, Android, digital photography, science. Credentials
  • Shankland covered the tech industry for more than 25 years and was a science writer for five years before that. He has deep expertise in microprocessors, digital photography, computer hardware and software, internet standards, web technology, and more.
Stephen Shankland
4 min read

Google, ever eager to renovate the computing industry for the benefit of the Web and its own business, is working to link two nascent but potentially significant projects, its experimental Go programming language and its Chrome Web browser.

Gordon, Go's gopher mascot

Specifically, the company is building a foundation to let programs written in Go run directly within a Web browser endowed with Google's Native Client software. Native Client is designed to let browser-based programs run faster than is possible with today's widely used JavaScript; though it's still in its early stages, it's built into Chrome and available as a plug-in for other browsers.

A little poking around the Go source code reveals a reference to NaCl, the abbreviated name for Native Client. And Native Client is indeed on the Go agenda, said Rob Pike, one of the five core members of the Go team, in a Wednesday interview.

"We have an embryonic implementation of the NaCl support for Go using 8g," a compiler that produces code for x86 chips such as Intel's Core line, Pike said. "It's restricted by a couple of details of NaCl's implementation, but we hope to see changes to NaCl one day that will make Go a full-fledged language in that environment."

The Native Client compiler--the tool that converts what people write into software a computer can run--is specially modified to screen out a variety of software instructions that could expose a computer to an attack from a Native Client module downloaded off the Web. And the Native Client software itself checks such modules before they run. The result, if the security approach stands up to security scrutiny, is browser-based software that runs close to the speed of ordinary software that runs natively on a PC.

Google's Rob Pike
Rob Pike discusses the Go programming language at a Google Talk Google

Native Client has been maturing, the most recent stage being inclusion of NaCl within Google's Chrome browser, though disabled by default for now. Google is using Chrome as a vehicle to distribute other Web technology, too, including Gears, which can let people use Gmail while offline, and WebGL, which gives hardware acceleration to 3D graphics in the browser.

Go is only experimental at this stage, but Google hopes to use it to produce some of the software running on its vast array of servers. Google's scale makes even academic projects potentially commercially relevant, which is enviable to many companies who've tried to get projects off the ground.

Indeed, an episode earlier in the Go team's history is illustrative. Pike, Unix co-inventor Ken Thompson, and Russ Cox all worked on the Plan 9 operating system project that, like Unix, began at Bell Labs. (Yes, Plan 9 is named after Ed Wood's famously bad movie, "Plan 9 from Outer Space.")

Unlike Unix, Plan 9 didn't have much commercial success, although Vita Nuova does sell a version called Inferno. Getting a mainstream operating system off the ground is hard: you must convince programmers, software companies, and hardware makers to embrace it; you must convince people to use it in the real world; and you must keep pace with the evolution of entrenched operating systems.

A bit of Plan 9 lives on inside the Go project, with various Plan 9 tidbits appearing in the Go source code. Pike, though, says there's not much.

Glenda, the Plan 9 bunny mascot, looks similar to Gordon, Go's gopher mascot. Both were drawn by Rob Pike's wife, illustrator Renee French.
Glenda, the Plan 9 bunny mascot, looks similar to Gordon, Go's gopher mascot. Both were drawn by Rob Pike's wife, illustrator Renee French. Bell Labs

"The 6g/8g/5g compilers are almost completely new but are tied to the open-source Plan 9 compiler suite's C compilers and linker," Pike said. "That's really about it except for the obvious historical connection for some of the protagonists: Ken, Russ, and myself."

Programming languages face similar challenges as operating systems in getting off the ground: A lot of interdependent elements in the ecosystem must all be built simultaneously. It's what's known in the trade as the chicken-and-egg problem: you can't make a chicken without an egg or vice versa.

But Google makes things different for Go. It's devoting real resources to the project and believes it could be useful on its own servers to run software such as the Gmail service Web browsers tap into. It's got the chicken and the egg under its own roof.

And with the money Google could save by increasing the performance or efficiency of its servers even just a fraction of a percent, it has abundant financial incentive to make things work.

Marrying Go to browsers is just another aspect of the same issue.

Assuming Go and Native Client mature enough to be useful, Google can't mandate that Web developers embrace them; indeed, they generally haven't embraced Gears even though it can help with some Web site matters. But again, Google has a browser and some awfully big Web sites it can use to get the ball rolling.