Google Cloud Storage

High Performance that Just Works

Marc Cohen
May 2, 2012
Google Developers Live Hangout
Submit questions here

Google Trivia

About Me

Google Cloud Storage


not so easy.

Google faces some of the world's most demanding storage challenges:

We've met those challenges by inventing internal storage solutions that are:

Now you can take advantage of the same technology with Google Cloud Storage

Google has data centers all over the world to serve data, providing fast response times.

Controlling access to your data

Google Cloud Storage provides powerful and flexible sharing primitives based on Access Control Lists (ACLs).

Google Cloud Storage != Google Drive

Google DriveGoogle Cloud Storage
OwnershipEnd user owns dataApplication ownws data
Billing/QuotasEnd UserApplication
User ExperienceConsumer (desktop/synch/drag & drop)Developer (command line tools and RESTful API)
Resource LimitsReasonable per user constraints (e.g. 10GB/file)Massive scalability (5TB/object)
MiscellaneousBuilt-in App Engine support (Files API) and integration with big data services

Usage Scenarios

Google Cloud Storage Manager (Web UI)

gsutil (Command Line Utility)

Continuous Innovation: recently added features...

Google App Engine Integration

# Create an object and write some data.
path ='/gs/my_bucket/my_object')
with, 'a') as f:
  f.write('Hello World!\n')

# Read data back out and display to web client.
with, 'r') as f:
  data =

Challenge: find the OAuth logic. :)

More extensive example here.

Detour: XMLHttpRequest (XHR)

function testGet() {
  var callback = function() {
    if ((this.readyState == 4) && (this.status == '200')) {
      alert("received: " + this.responseText);
  xmlHttp = new XMLHttpRequest();
  var url = "/marc-pres/GDL_050212/test.txt";
  xmlHttp.onreadystatechange = callback;"GET", url, true);
<a href="#" onclick="testGet();">Get content using XHR</a>
Get content using XHR

Cross-Origin Resource Sharing (CORS) Demo

Accessing GCS items from the GAE images.Image class

class Transform(webapp.RequestHandler):
  _BUCKETNAME = 'your-bucket-name'
  def get(self):
      if self.request.get("itemname"):
        fname = '/gs/%s/%s' % (self._BUCKETNAME, self.request.get("itemname"))
        img = images.Image(filename=fname)
        if img:
          if self.request.get("thumb"):
          if self.request.get("rotate"):
          transform = img.execute_transforms(output_encoding=images.JPEG)
          self.response.headers['Content-Type'] = 'image/jpeg'


Monthly StoragePrice (per GB)
First 0 - 1TB$0.12
Next 9TB$0.105
Next 90TB$0.095
Next 400TB$0.085
Additional StorageContact Us

Additional charges apply for network/request usage. See our Pricing and Support page for further details.

Formulating your storage strategy...

If you remember only one thing from this talk...

Google manages many petabytes of data on a planet-wide scale, securely, with sub-second response times, for hundreds of millions of users every day.

Focus on your customers and what you are good at and take advantage of Google's world class cloud computing services (rather than trying to build your own).

Choose a partner that does these sort of things, routinely, every day:

Image Credits

By the way, you're already using Google Cloud Storage - it's serving these slides. :)

Thanks for your attention!