Google-code-as-a-service: Go on App Engine

Python, Java, and a custom tailored suit


In beginning, you could only use Python with Google App Engine, the online service that lets you run applications atop Google's famously distributed infrastructure. Then, after countless requests from developers, Google added a Java runtime to the service. And now the company is adding a runtime tailor-made for the service.

The rub is that this runtime is used by almost no one. But that may change.

This week, at its annual developer conference in San Francisco, Google announced that App Engine will soon offer an "experimental" runtime for its own Go programming language, a less-than-two-year-old creation that seeks to reinvent programming in the most practical of ways.

Go was first conceived in 2007 by three big Google names: Unix co-creator Ken Thompson; Rob Pike, who worked on Unix at Bell Labs with Thompson; and Robert Griesemer, who helped build the Java HotSpot compiler at Sun. The idea was to create a language suited to building the sort of distributed applications that Google builds. "We realized that the kind of software we build at Google is not always served well by the languages we had available," Rob Pike recently told us. "Robert Griesemer, Ken Thompson, and myself decided to make a language that would be very good for writing the kinds of programs we write at Google."

This means that, like Erlang, Go offers built-in tools for concurrency. "The world is concurrent and parallel. But the programming languages we use to interact with the outside world – through users on the web and mice and keyboards on a local machine – they don't tend to support that way of thinking about things very well. There was a lot of interesting theory work on this, but very few practical languages."

And so, like C, Go is a statically-typed, compiled language. But it's also meant to "feel" like a dynamically-typed language along the lines of Python. "For large programming - programming in the large, like we do at Google, using large systems with many programmers working on them - static [typing] is a huge safety net. It catches tons of stuff early that would not be caught with all-dynamic typing," Pike told us. "Go is a real systems language, a compiled language. You can write really efficient code that runs closer to the metal. But you can use these higher-level ideas to build servers out of the pieces you put together."

At this week's conference, reporters seemed mystified by the addition of Go to App Engine. But Peter Magnusson, the Google engineering manager who oversees App Engine, explained that Go is particularly suited for use on a "platform-as-as-service" like App Engine, which operates very differently from an "infrastructure cloud" like Amazon EC2. Whereas an infrastructure cloud exposes raw virtual machines, a "platform cloud" operates at a higher level, attempting to share resources with even greater efficiency.

"When you're looking at platform-as-a-service versus infrastructure-as-a-service, there is a fundamental challenge in running arbitrary binaries. You can do this on infrastructure-as-a-service, but you can't really do it in the high-level, multi-tenant, shared environment of a platform. So we have to control the languages that run there. We have hundreds and thousands of apps, and we have to have very strict guarantees that there's no leaks and no impact between them," he said. "But at the same time, there's a need for a low-level programming language for compute-intensive tasks."

That language is Go. One of its chief strengths when running on a platform-as-a-service, Magnusson said, is that it was designed for quick compilation. "Go was designed from the outset to be quick to compile. ... It compiles really fast even with a really large application. That allows you to deploy it on a platform-as-a-service like App Engine, where you upload the source code and compile and link and run it," he said

"The compilation linking is so fast, that it's just as fast as uploading the binary, or arguably faster. So it allows you to provide a low-level programming language on a platform-as-a-service. That's why Go is an interesting addition, as opposed to a lot of other languages that we might add in the future. Go provides a fundamental benefit that Python and Java don't."

But Go isn't just fast at compile time. It's fast at runtime as well. Google says the speed is comparable to C. Martin Odersky – the creator of Scala, another language that focuses on concurrency – tells us that a research paper is in the works showing that C, Scala, and Go provide comparable speeds at runtime. Google says that on App Engine, Go is particularly suited to CPU-intensive apps because it compiles to native code.

Google has released a Go SDK for App Engine, but you can't yet deploy Go apps on the service. This will "soon" be an option for a limited number of beta testers.

The Go runtime arrives with the new 1.5.0 version of App Engine. This also marks the debut of Backends, instances that have no size limits or request deadlines. They're designed for applications that require long-running and high-memory processes, using between 128MB and 1GB of memory and a "proportional" amount of CPU power.

Magnusson calls Backends a "potential game changer" for App Engine. "Previously, instances had limited resources at runtime. They were very good for running scalable applications. But they didn't provide long-running scalable back ends that were good for compute intensive or persistent state applications," he said.

"Whenever you need long-running code or computational intensity or persistent state and it doesn't match directly to a combination of data store or memcache or even HTTP requests, then it becomes very cumbersome to express it. With Backends, you can very easily – in fact, delightfully easily – code that up."

The new version also improves on App Engines "Task Queues" by introducing "Pull Queues", which let you pull tasks from a queue as applications are ready for them rather than waiting for a push. But the real news is the arrival of Go. Reporters may be perplexed, but the move only stands to reason. App Engine is a means of building and running applications on Google's back-end infrastructure. And Go is specifically designed for that very back end. Google is already using Go for "several" systems internally, though it won't specify which. ®

Similar topics

Broader topics


Other stories you might like

  • Google has more reasons why it doesn't like antitrust law that affects Google
    It'll ruin Gmail, claims web ads giant

    Google has a fresh list of reasons why it opposes tech antitrust legislation making its way through Congress but, like others who've expressed discontent, the ad giant's complaints leave out mention of portions of the proposed law that address said gripes.

    The law bill in question is S.2992, the Senate version of the American Innovation and Choice Online Act (AICOA), which is closer than ever to getting votes in the House and Senate, which could see it advanced to President Biden's desk.

    AICOA prohibits tech companies above a certain size from favoring their own products and services over their competitors. It applies to businesses considered "critical trading partners," meaning the company controls access to a platform through which business users reach their customers. Google, Apple, Amazon, and Meta in one way or another seemingly fall under the scope of this US legislation. 

    Continue reading
  • Makers of ad blockers and browser privacy extensions fear the end is near
    Overhaul of Chrome add-ons set for January, Google says it's for all our own good

    Special report Seven months from now, assuming all goes as planned, Google Chrome will drop support for its legacy extension platform, known as Manifest v2 (Mv2). This is significant if you use a browser extension to, for instance, filter out certain kinds of content and safeguard your privacy.

    Google's Chrome Web Store is supposed to stop accepting Mv2 extension submissions sometime this month. As of January 2023, Chrome will stop running extensions created using Mv2, with limited exceptions for enterprise versions of Chrome operating under corporate policy. And by June 2023, even enterprise versions of Chrome will prevent Mv2 extensions from running.

    The anticipated result will be fewer extensions and less innovation, according to several extension developers.

    Continue reading
  • I was fired for blowing the whistle on cult's status in Google unit, says contractor
    The internet giant, a doomsday religious sect, and a lawsuit in Silicon Valley

    A former Google video producer has sued the internet giant alleging he was unfairly fired for blowing the whistle on a religious sect that had all but taken over his business unit. 

    The lawsuit demands a jury trial and financial restitution for "religious discrimination, wrongful termination, retaliation and related causes of action." It alleges Peter Lubbers, director of the Google Developer Studio (GDS) film group in which 34-year-old plaintiff Kevin Lloyd worked, is not only a member of The Fellowship of Friends, the exec was influential in growing the studio into a team that, in essence, funneled money back to the fellowship.

    In his complaint [PDF], filed in a California Superior Court in Silicon Valley, Lloyd lays down a case that he was fired for expressing concerns over the fellowship's influence at Google, specifically in the GDS. When these concerns were reported to a manager, Lloyd was told to drop the issue or risk losing his job, it is claimed. 

    Continue reading
  • UK competition watchdog seeks to make mobile browsers, cloud gaming and payments more competitive
    Investigation could help end WebKit monoculture on iOS devices

    The United Kingdom's Competition and Markets Authority (CMA) on Friday said it intends to launch an investigation of Apple's and Google's market power with respect to mobile browsers and cloud gaming, and to take enforcement action against Google for its app store payment practices.

    "When it comes to how people use mobile phones, Apple and Google hold all the cards," said Andrea Coscelli, Chief Executive of the CMA, in a statement. "As good as many of their services and products are, their strong grip on mobile ecosystems allows them to shut out competitors, holding back the British tech sector and limiting choice."

    The decision to open a formal investigation follows the CMA's year-long study of the mobile ecosystem. The competition watchdog's findings have been published in a report that concludes Apple and Google have a duopoly that limits competition.

    Continue reading
  • End of the road for biz living off free G Suite legacy edition
    Firms accustomed to freebies miffed that web giant's largess doesn't last

    After offering free G Suite apps for more than a decade, Google next week plans to discontinue its legacy service – which hasn't been offered to new customers since 2012 – and force business users to transition to a paid subscription for the service's successor, Google Workspace.

    "For businesses, the G Suite legacy free edition will no longer be available after June 27, 2022," Google explains in its support document. "Your account will be automatically transitioned to a paid Google Workspace subscription where we continue to deliver new capabilities to help businesses transform the way they work."

    Small business owners who have relied on the G Suite legacy free edition aren't thrilled that they will have to pay for Workspace or migrate to a rival like Microsoft, which happens to be actively encouraging defectors. As noted by The New York Times on Monday, the approaching deadline has elicited complaints from small firms that bet on Google's cloud productivity apps in the 2006-2012 period and have enjoyed the lack of billing since then.

    Continue reading
  • Google recasts Anthos with hitch to AWS Outposts
    If at first you don't succeed, change names and try again

    Google Cloud's Anthos on-prem platform is getting a new home under the search giant’s recently announced Google Distributed Cloud (GDC) portfolio, where it will live on as a software-based competitor to AWS Outposts and Microsoft Azure Stack.

    Introduced last fall, GDC enables customers to deploy managed servers and software in private datacenters and at communication service provider or on the edge.

    Its latest update sees Google reposition Anthos on-prem, introduced back in 2020, as the bring-your-own-server edition of GDC. Using the service, customers can extend Google Cloud-style management and services to applications running on-prem.

    Continue reading

Biting the hand that feeds IT © 1998–2022