

Opinion
Day two at Google I/O - fast web apps, IoT and machine learning
Published on 18 May, 2017 by Jemma
There is so much to see at Google I/O across so many product lines, so for day two I have focussed on three main areas:
- Building fast web apps including Accelerated Mobile Pages AMP and Progressive Web Apps PWA
- Internet of Things including Google Core IoT and the latest on Android Things
- Machine learning, looking at TensorFlow, building models and using them in the cloud or within Android Thing
Fast web apps
Fast web apps are important, with Google reporting that a significant proportion of mobile sites can take longer than 10s to load over 3G. They also have conducted research that says after 10s most users have given up, so fast mobile pages are important and also a factor of page rank.
You may have seen the AMP and lightning logo next to a page in Google Search or Facebook and then experienced that instant load experience. That is what AMP delivers. The downside is AMP pages are static, but sometimes we want rich dynamic experiences, e.g. to buy something from an AMP page we have been redirected to. Progressive Web Apps help here (offering push notifications, home screen support etc) and Google discussed tools for combining these to deliver fast pages with great user experience. These stats from a Rakuten Recipe site speak for themselves:

Internet of Things
Internet of Things is a large scale compute problem. Imagine all homes providing power usage data every minute to allow machine learning, to predict energy usage and optimise power generation. This is just one example of many. Google IoT core is designed to support small or enterprise scale IoT deployments in a fully managed and scalable manner.
It comprises a number of elements including:
- device support and management, allowing devices to send data into the platform using MQTT and providing rich management of those devices via APIs and a dashboard all backed by security using IAM.

- data ingestion at Google scale delivering any data pushed in via MQTT as topics within pub/sub allowing an application to do what it wants with the data, for example, writing to BigQuery, doing some immediate analysis and responding via a Cloud Function.

- and given that all of this data and infrastructure is running on Google Cloud Platform you get full exposure to any technology present there, for example, machine learning allowing very rich applications to be built.
IoT is also supported at the device end by Android Things, in summary a secure platform with access to key Android APIs to make implementing any sensor straightforward. There are also some initial application and device partners so you can build test devices straight away.

TensorFlow and machine learning
The third area is TensorFlow and machine learning – Google have done two key things here. Firstly they have open sourced a huge amount of code to get developers going. Secondly, TensorFlow allows you to train on a variety of platforms from mobile through to TPUs (Google’s custom hardware for accelerating machine learning), and also to infer (get results) on anything from an Android Thing to a cloud TPU.
Why is any of this important? In the case of open source it means anyone with Python skills can in a few number of lines use existing TensorFlow models to recognise images and infer information about this. This is work which 6 years ago would have taken months of research and programming and now this can be done by anyone who can write Python. There are even tools for visualising the model you have produced.

So, if you can build machine learning models you move on to the second item and decide where to run your model. On stage a demonstration was given of a raspberry pi with a camera with a trained model for recognising dog breeds and a speaker which could say which dog breed was shown. All of this possible without any internet connection.
This allows new applications to be built, consider being able to count queue depth in supermarkets. Sending the images back to a central server may have privacy and regulatory issues, but simply building that model into the Android Thing enables just the number of people in the queue to be sent to the server. Google terms this federated learning, and it will open up many new applications.
Look out for tomorrow’s summary of the final day at Google I/O 2017!

