google i/o 2010 review julián klas. what was i/o about? day 1 – wed, may 19 keynote 1 5 session...
TRANSCRIPT
Google I/O 2010 Review
Julián Klas
• What was I/O about?
• Day 1 – Wed, May 19• Keynote 1• 5 Session Highlights
• Day 2 – Thu, May 20• Keynote 2• 5 Session Highlights
• Post I/O: some conclusions
Agenda
• Google I/O is about: "Innovation in the Open"
• Google I/O consisted in 11 tracks:
• Android
• App Engine
• Chrome
• Enterprise
• Geo
• Tech Talks
• All sessions available on YouTube!http://code.google.com/events/io/2010/sessions.html
What was I/O about?
• Google APIs
• GWT
• Social Web
• Wave
• Fireside Chat
People is spending more of their time on the web!
Keynote 1
Speaker: Vic Gundotra (VP of Engineering, Google), Sundar Pichar (Google) , …Wave: https://wave.google.com/wave/#restored:wave:googlewave.com!w%252B_yNbYytzA
+117%
-18%-17%-6%
2009
2004
0%
• After 2004, there were no new massive Desktop apps• Office, Photoshop, Skype, MSN All pre-2004
• Facebook, Gmail, Tweeter, YouTube post-2004
Keynote 1 (cont.)
AJAX +WEB 2.0
• We need WebApps to become as powerful as Desktop Apps
…but how??
HTML 5
Keynote 1 (cont.)
HTML 5 has arrived!
Keynote 1 (cont.)
HTML 5 news:
• Browser SupportCompletely supported by all modern browsers by the end of the
year
• New Features• Drag n’ Drop (Gmail)• Multimedia: Mic & Camera, Sound, 2D / 3D API, native clients• Offline Features: local storage• Notification API (Clicker.com, Gmail)• Try out: MugTug, clicker.com, …
• Video There’s need for a HQ, open and free alternative
• Google acquired On2 VP8 and released it as OpenSource• WebM Project (http://www.webmproject.org/) = VP8+Vorbis
• CSS3WebFonts, Transitions, for mobile, tablet & desktop layout
Keynote 1 (cont.)
• Some problems w/HTML5:
• Apps are hard to find• Reviews for this app?• # People using this app?
Chrome Web Store: open market place for web apps (like Android Market or iTunes Store)
Coming soon!+ Chrome & Chrome OS+ Paid & Free Apps+ 40 languages+ 70 countries
Keynote 1 (cont.)
Legacy, New Apps & Cloud
• Context: people is using apps on cabs, hotel lobbys, airport, etc…
• Applications must be everywhere, be location aware, based on open standards, etc.
• You choose how develop and were you deploy• Internal & External Clouds
• Legacy Apps: VMWare
• New Apps:• Dev Env.:
• SpringSource ToolSuite• Spring Roo• GWT
• Profile• SpeedTracer• Spring Insight
• Cloud• AppEngine
Keynote 1 (cont.)
Why performance?
• Affects users’ ability to use your app.(check out Golf Demo at http://io-mims.appspot.com/golf.html)
• Users are VERY sensitive to delaysCheck out Fitts Law (http://en.wikipedia.org/wiki/Fitts's_law)
Measure in milliseconds redux: Meet Speed Tracer
Speaker: Kelly Norton. [email protected]. @kellegousTalk Video: http://www.youtube.com/watch?v=73IyVBMf2uY
Goal as a developer:
HandleClick + Process + ShowResults < 100ms
This is the max amount of timeyou can block browser’s UI queue(in fact, average must be much faster!)
Why is difficult to do things in 100ms?
• Most people don't even measure
• Browsers are event/callback like, are complex and impossible to reason about hard to diagnose
Measure in milliseconds redux: Meet Speed Tracer (cont.)
Speed Tracer plugin for Chrome• sluggishness graph (time you’re keeping the browser busy)
• details for XML-HTTPRequests
• hint lid
• best practices (eg. use of cache)
• save as HTML and send to a team mate
• show javascript line that is causing trouble
Common problems• case of too much layout
o call rendering functions too many times or too soon
• case of too much datao eg. of 600ms of connection and 500ms of parsing
Measure in milliseconds redux: Meet Speed Tracer (cont.)
New features:
• GWT: call stack info points to Java code!o in Eclipse, "Profile as Speed Tracer"
• Server traceability in App Engine and Springsource TC server
• Enhance for regression testing and CIo Regression Dashboard
Measure in milliseconds redux: Meet Speed Tracer (cont.)
HTML5 and Google are working on:
• 2D / 3D Rendering (WebGL)• Shared worker + Magic IFrame• File dragging• Voice input (recognitiion + TTS)• Webcam + Mic access• Positional / 3D audio• Geolocation• Now separate spec: client datastore + filesystem (1 FS per origin)• Networking: Web Sockets
• Lessons Learned• WebStore vs. Bookmarks• Database: no sql• Geolocation: accuracy varies per device ; sec. issues
HTML5 status update
Speakers: Chrome - Ian Fette, Jeff Chang
• Modern browsers now fetch JS in parallel
• When latency increased 400ms• Google had 0,6% less searches• Yahoo had 5%-9% traffic decrease
• When Shopzilla decreased 5 sec in total render time saw 12% revenue increase
• Lots of great tips!• Tips like “send static content first and dynamic later…”• PageSpeed for Ads & Analytics• PageSpeed SDK
Please check out PDF: http://dl.google.com/googleio/2010/tech-talks-page-speed.pdf
HTML + PageSpeed
• Hosting 100k apps
• Task Queues• allows background works• up until 50 req/s
• Channel Service:• channel / connection oriented based• right now sends Strings only, no format• bidirectional (server can send and receive messages)• client can send and receive messages via JS and callbacks
• AppStats: profiling of API calls, servlet renders results & timing statsb
• Blobstore: big files, streaming, images, ...
What’s HOT in Java for Google App Engine?
Speakers: App Engine - Toby Reyelts, Don SchwarzTalk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/whats-hot-in-java-for-app-engine.html
• No more 1000 rows/query limit
• Datastore will allow weak consistency for performance
• Cursors over HTTP
• You can do unit testing on app engine (check out complete session about that on YouTube)
• Performance optimizations:
• Precompilation
• Reflection caching (Grails made 11k reflective calls on startup, mostly to 3 methods)
• There will be dedicated instances
• Compatibility lists
• added a lot of stuff
• there will be much progress
What’s HOT in Java for Google App Engine? (cont’d)
• Based on Buckets + Objects
• VERY similar to S3 but has strong consistency
• Allows sharing and authentication
• Access via REST + Browser
• Related• Google Big Query (code.google.com/apis/bigquery)• Prediction API (code.google.com/apis/prediction)
• gsutil command line tool allows to work with S3 and GS at the same time - unix style syntax
• Demo: cloudreader-demo.appspot.com
Google Storage for Developers
Speaker: David Erb, Michael SchwartzTalk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/google-storage-for-developers.html
• Why Google?• Big data is challenging • Google has tools for data analysis• Scalability, Security, Sharing, Integration w/GAE + GDocs
• Prediction API• It’s “Machine Learning as a Web Service”
• Supervised classification:
• must be trained with examples (offline)
• then predicts the class of some input (online)
• Use cases: language identification, spam detection, sentiment analysis, etc…
• Automatically selects algorithms & features on training data
• Accepts numeric & unstructured text
• Classifies up into 100 discrete categories
Big Query and Prediction API
Speakers: App Engine - Amit Agarwal, Max Lin, Gideon Mann, Siddartha NaiduTalk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/bigquery-prediction-apis.html
• BigQuery API• Manages huge datasets• No indexes, data sharding, partitioning, provisioning
• So… how does it works?• SQL like language (math functions, group by, order by, …)
• Restful API
• Table scheme endpoint (fields & types)
• Query endpoint for answers
• Answers within few seconds
• Tables are objects in Google Storage
• Security: Google Auth + HTTPS + ACL’s
• Query Building: web frontend or shell command line
• Integration w/Gdocs: populate graphs with query results
Big Query and Prediction API (cont’d)
Keynote 2
Android• Momentum
o 60 compatible devices in 18 months
o 21 OEMso 48 countrieso 59 carriers
Android 2.2 (Froyo)• Speed
o JIT (2X to 5X faster)• Enterprise
o 20 new features• Devs
o App data backupo Android API
o 5x more searchs!o 50K appso 180K devs
o WiFi AP: tethering and portable
hotspot
Keynote 2
Speakers: Vic Gundotra (VP of Engineering, Google Inc.), Eric Schmidt (CEO, Google Inc.), ..
Browser
• 2X to 3X better javascript performance (V8 for Android)• HTML5 and beyond• Orientation, Camera and Speech in the browser• Voice recognition• Flash• Intents: can receive Music & Maps!
Market
• Easier Find and search• Move apps to SD card• App auto-update, bug report track
Keynote 2 (cont’d)
Mobile Advertising
• must be able to measure (where is my $ going to?)
• multiple formats: browser, youtube, dropdown ads
• try not to get you out of context
• local ads
• More: www.google.com/mobileads
• Biggest market a developer can reach
• 4 Billion users
Keynote 2 (cont’d)
• Basics: developer.android.com
• We have 3 HTC EVO 4G available!
• Do's and Dont's
• Don't allocate memory if not needed
• Don't do something that's not needed
• Avoid modal dialogs and activities
A Begginer’s Guide to Android
Speaker: Reto MeierTalk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/beginners-guide-android.html
• Users perceive lags > 100-200 ms
• If app doesn't reacts in 5" or broadcast receiver didn't complete in 10": "Application X is not responding“ BAD
• Use threads and async tasks
• Be careful about memory consumption
• Be careful about power consumption
• Don't discriminate old phones & OS
• Use i18n
A Begginer’s Guide to Android (cont’d)
• REST stands for "Representational State Transfer"
• REST isn't necessarily sent over HTTP
• Why REST?• broadly adopted• large # REST API's available
• Why develop if mobile web friendly sites already exists?• native can run on background• can implement intents• run on limited connectivity• be consistent with the rest of the OS
Developing Android REST Applications
Speakers: Virgil DobjanschiTalk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/developing-RESTful-android-apps.html
• Patterns for correct implementation (check talk slides for Do's and Dont's)
• Use Apache HTTP Client, not Java URL object
• Never execute DB queries on the main thread or you'll probably get "App X is not responding“
• Use SQLlite
• Things to take into account:
• OS can shut down your process if needs memory
• Be careful about persistence.
Developing Android REST Applications (cont’d)
• Google doesn't trusts keywords meta tag because people spam
• Googlebot executes JS
• If you can't generate original content by yourself put people to work for you: user reviews!
Be careful not to be hacked!Be concerned about having original content, no copies!
• Put a descriptive title
SEO site advice from the experts
Speakers: Tech Talks - Matt Cutts, Greg Grothaus, Evan RosemanWave: https://wave.google.com/wave/#restored:wave:googlewave.com!w+-Xhdu7ZkBLf
• Check out:• Webmasters Tool• GWT and AJAX can be SEO friendly, see AppBrain.com
• Indexing tips:• Put the more interesting content first• a_b is one term for googlebot• a-b are two terms for googlebot• use meta description• build original content: be careful about encoding! it tells the bot that the
content is not original!• When printing addresses use FULL address including city, country, etc.
• Natural URLs: important but not critical (mmm...)
SEO site advice from the experts (cont’d)
• Check out:• Links that are at the begining of the page• ninebyblue.com
• .com vs .org domain names? doens't changes a lot, but be careful about .info since they've been free and spam is expected
• Last but not least:• For accents and spanish characters: google indexes main term and
variants. Variants get less weight.
• Having one H1 or H2 in a page doesn't changes a lot.
SEO site advice from the experts (cont’d)
• People is talking about "Bridging islands“ feeds must be consumed by any site contact lists must be unified Webfinger, Salmon, XAuth, OpenID+OAuth (Plaxo)
• Avoid fragmentation of messages, profiles and contact lists
• Emerging Standards: OAuth, Microcontacts, OpenSocial
• Now: sites have to pull data from each other. Everybody has it’s own data format check ActivityStrea.ms
• Steps to publish on multiple sites:1. provide WebFinger2. produce Activities3. consume activities
• Going real time: PubSubHubbub
Bridging the islands: Building fluid social experiences across websites
Speaker: John Panzer, Joseph SmarrTalk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/building-fluid-social-experiences-across-websites.html
• Google API’s 101• “Since Google is a web based company, all of our API’s use REST”
• Client and servers transferring resource representations• Good for cached and layered systems (like the web)• In HTTP, this means verbs acting on resource URIs
• Up until now:
• Right now you MUST understand Atom to use the APIs
• Core built around...Atom Syndication Format (RFC4287)Atom Publishing Protocol (RFC5023)
• Overtime, support has been added for:• Concurrency, Query Parameters & Batch
How Google builds APIs
Speakers: Google APIs - Zach Maier, Joseph Schorr, Mark StahlWave: https://wave.google.com/wave/waveref/googlewave.com/w+9rTSb7ZkBm1
• Right now• 25 API’s• 2B hits per day across all API’s
How Google builds APIs (cont’d)
• Future Google API’s
• Google is moving to a new API infrastructure
• Already available in:
•
•
•
How Google builds APIs (cont’d)
• Future Google API’s – Things to Improve• Output formats
• xml is not easy on all platforms
How Google builds APIs (cont’d)
• Future Google API’s – Things to Improve• Output formats
• resources can be verbose (really.. a lot of data)• allow operations on partial data
Partial Response for GET’s Partial Updates (PATCH)
More info on Partial Operations: http://bit.ly/partialops
How Google builds APIs (cont’d)
• Future Google API’s – Things to Improve• Calling Styles
How Google builds APIs (cont’d)
• Future Google API’s – Things to Improve• Calling Styles
How Google builds APIs (cont’d)
• Future Google API’s – Things to Improve• Calling Styles
TaskList API: mark task as DONE
• The RESTful way:1. GET /tasks/@me/{taskId}2. modify resource on client, set the "done" bit3. PUT /tasks/@me/{taskId}
• Using custom verbs1. POST /tasks/@me/{taskId}?method=markDone
How Google builds APIs (cont’d)
• Future Google API’s – Things to Improve• Calling Styles
• Some people doesn’t like the RESTful way, they just want JSON-RPC
How Google builds APIs (cont’d)
• Future Google API’s – Things to Improve• Client Libraries
• Client Libraries don’t stay on the cutting edge
• Solution
• Dynamic Discovery• Discovery Document: JSON, describes URLs, verbs, params, …
• Always up to date
• It’s just another API
• “Generic” Client Libraries• Discover resources, no more scrapping URL’s from doc
• Use simple classes to represent resources: POJOsJSON
• Works on multiple platforms: servers, GAE, Android, Web, …
• Release Once, works with any API
How Google builds APIs (cont’d)
• How Google Really builds API’s
1. Define / Implement Service:
• Define abstract resources w/Protocol Buffers
• Define collections and verbs w/Protocol Buffers RPC
2. Configure API stack with Google’s API Tool:
• REST paths, RPC methods, query parameters
• Add functionality
3. Write external representation: JSON, Atom, XML, …
How Google builds APIs (cont’d)
How Google builds APIs (cont’d)
Post I/O: some comments
• HTML 5• Fully supported by all modern browsers• WebApps Marketplace: coming soon
• Android• momentum: second in sales behind RIM, 200k act/day• open, multi carrier & vendor, free SDK
• API’s• In 2010: are mandatory to be in the business• REST broadly adopted, support every need
?