Google IO 2013: Day 2

Misja Alma

Quite a few interesting sessions today:

Google Knowledge Graph

With the Knowledge Graph, Google is trying to give a new dimension to its flagship product: Search.
Users should be able to have a conversation with search, and search should anticipate on a user's interests by showing related topics.
So search needs to understand the context of searches, in other words: it needs to understand the world. This is where Knowledge Tree comes in handy.
Knowledge Tree is a hugh graph with semantic data about real world entities and their relations. This data has been gathered from Wikipedia, Google+ and many other sources.
The complete tree is viewable and downloadable at freebase.com.

Freebase Api

If you don't feel like writing your query logic by yourslef, Google also offers a (free) Rest api:
Freebase Api
The following services are offered, many of them have their own JQuery plugin as well:

  • autocomplete
  • semantic tagging
  • entity collections
  • geosearch collections
  • topical weblinks

Dart: new features

The Dart programming language has been around a few years already. It is Google's scalable and typesafe alternative for Javascript. It can run in its own VM, in a special version of Chrome, or it can be compiled into Javascript.

During the last year quite a couple of new features have been added. Here are some highlights:

Mixins
Metadata
Lazy loading of libraries
Futures
streams

Also nice: you can try out Dart in realtime on try.dartlang.org

Dart's performance has been enhanced: native Dart now runs many times faster than Javascript, thanks to, amongst others, utilization of SimD instructions by the Dart VM.

"Chrome DevTools Revolution"

The DevTools in Chrome Canary have been updated with quite a few cool features. It should even be possible now to use Chrome DevTools as your only IDE: inline editing of Javascript and styling was already possible, but now it is also possible to save the edited code to disk (using Ctrl-S).

If you are using an IDE and have edited a source file, Chrome can now detect file system changes and refresh automatically.

Sass support has been added to Chrome DevTools. So you can trace a styling all the way to the Sass reference that defines it, inside Chrome Devtools.
And also here it is possible to automatically reload the page when a sass file has been changed.

A lot of support was added for profiling Javascript:

  • Timeline: a view to quickly see which method takes the most cpu cycles
  • FlameChart: a view with the same purpose but a different layout
  • Canvast profiling: a view showing which paint actions take the most time
  • Object allocation tracking: a memory profiler for javascript
  • Layout trashing details: a tool that can show inefficiencies or redundant Dom tree building
  • and more ..

Portable Native Client

This is Google's solution to let you run C++ code inside your browser. Actually that was already possible with Native Client, but Portable Native Client makes it easier to create C++ apps that will run on both Arm and x86 architectures.

Obviously Google needed to do a lot to prevent this from being a security risk. So the C++ code needs to be compiled with a custom compiler, which will create a .pexe file; this file runs inside a 'native client process' with 'software fault isolation'. What this means is that Chrome will scan the code before running it, to check for illegal instructions and for illegal access of certain memory regions.
Apart from that, native client code can only be used in applications inside Chrome Webstore.
This all should make Native Clients safe to use.

The advantage of Native Clients is obviously their performance: they run at 80% or 90% of the speed of a fully native application.

But the question is of course: why go through so much trouble, why not just download a fully native application to your cellphone or laptop?
I guess the answer is that such a thing is not possible on Chromebooks. Google is trying hard to make Chrome the universal platform to run all your applications. And with Native Client, you can now get enough performance to run games as well.

Comments (0)

    Add a Comment