Google APIs Discovery Service

Tuesday, May 10th, 2011

Before Google I/O Google released Google APIs Discovery Service. The propose of this API (or meta-API) is to expose machine readable matadata about other Google APIs.

You can get a list of all APIs (of course this is just part of the all Google APIs ;) ) supported by Discovery Service:

GET https://www.googleapis.com/discovery/v1/apis

and as the response you will get JSON object with API list. See apis.json.zip, and here we have an example about Buzz API:

{

“kind”: “discovery#directoryItem”,

“id”: “buzz:v1″,

“name”: “buzz”,

“version”: “v1″,

“title”: “Buzz API”,

“description”: “Lets you share updates, photos, videos, and more with your friends around the world”,

“discoveryLink”: “./apis/buzz/v1/rest”,

“icons”: {

“x16″: “http://www.google.com/images/icons/product/buzz-16.png”,

“x32″: “http://www.google.com/images/icons/product/buzz-32.png”

},

“documentationLink”: “http://code.google.com/apis/buzz/v1/using_rest.html”,

“labels”: [ "labs" ],

“preferred”: true

}

Next we can get more information about particular API by using discoveryLink value. This is called “Discovery Document” which includes:

  • All the API schemas that describe the API usage.
  • Description of methods and parameters.
  • OAuth scopes and Authentication information.
  • Inline documentation with description of schemas, methods, parameters and parameters values.

Let’s try to get more information about Buzz API:

GET https://www.googleapis.com/discovery/v1/apis/buzz/v1/rest

There are ton of information there. So you may ask “what for?”, the answer is to build tools around the Google APIs. Currently Google use this API to build such great tool as API Explorer and Google Plugin for Eclipse also is using Discovery Service to show you information about API.

Happy Discovers

Native Client SDK from Google

Friday, March 11th, 2011

Native Client allows us to build web applications that execute native compiled code inside the
browser. The Native Client SDK includes API, documentation, and examples and it is available to OSX, Linux and Windows platforms. Last version was released on 17 February 2011 (this update force you to use at least Chrome 10.x).

Native Client is available in Chrome Browser.

The first question in my head was: Why? Possible answers are:

  • Games – I’m not really sure if this is the main case, because we have Canvas and of course Flash is still in the game.
  • Existing Software – that is nice, instead of installing on every computer we can run our app in browser (or part of it).
  • Low level – Codecs, communication with OS (it’s limited to special API)

One picture is worth more than thousand: This picture comes from Google’s Technical Overview.


Native Client consist of: HMTL/JS, bridge between JS and native module, plus native module.

 

Example

 

First at all you have to enable Native Client feature in Google Chrome, enter “about:flags” into url address and than find “Native Client” option, you have to enable it and restart the browser.

First at all try some of the examples provided by Google: Native Client Examples, for me Life game was really cool.

I wrote simple hello world application, but it is nothing more than Google tutorial, and of course one more link to Pepper API.

 

Summary

 

I don’t consider Native Client as something that will change the world, but it may be useful in some situations. One additional plus is that we can distribute our application through Chrome Web Store. We will see how much effort Google will put in Native Client development.


about me

My name is Sebastian Pietrowski. I've finished Warsaw University as Master degree. During my studies I started work for merlin.pl. The primary language I use is Java but I have also programmed in Python, Ruby and Scala. I worked as a technical solution architect at merlin.pl. infrastructure when we were moving from PL/SQL to J2EE. I engineering a great performance optimized solution that made the application 10 times faster than requirements and 85 times faster as original solution.

Currently, I am working as a Senior Expert at F.Hoffmann-La Roche to help define future roadmap in design and development of Enterprise software at Roche and Genentech and build adoption for new technologies. I'm continuously mentoring new developers, helping them understand how important test driven development is and empowering them to get better at their daily job. I'm involved in many activities which brings new technologies for better and faster development. You can find more details on my LinkedIn profile.

But don’t get me wrong, I am not your typical nerd. I'm a pleasant guy that you can drink a glass of wine with me and talk about a range of topics with. My leisure activities include playing basketball, soccer and listening to music. I try to be pragmatic while staying focused on application performance and tuning with success in my daily work.

My favorite quote from Yoda's and my life’s motto is: Do, or do not. There is no try.