490 likes | 650 Views
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
E N D
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
Speaker: Vic Gundotra (VP of Engineering, Google), Sundar Pichar (Google) , … Wave:https://wave.google.com/wave/#restored:wave:googlewave.com!w%252B_yNbYytzA • People is spending more of their time on the web! Keynote 1 2009 2004 +117% 0% -6% -17% -18%
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, … • VideoThere’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 • CSS3 • WebFonts, 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.)
Speaker: Kelly Norton. knorton@google.com. @kellegous Talk Video:http://www.youtube.com/watch?v=73IyVBMf2uY Measure in milliseconds redux: Meet Speed Tracer • 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 delays • Check out Fitts Law (http://en.wikipedia.org/wiki/Fitts's_law)
Measure in milliseconds redux: Meet Speed Tracer (cont.) • 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
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 • call rendering functions too many times or too soon • case of too much data • eg. of 600ms of connection and 500ms of parsing Measure in milliseconds redux: Meet Speed Tracer (cont.)
Measure in milliseconds redux: Meet Speed Tracer (cont.) • New features: • GWT: call stack info points to Java code! • in Eclipse, "Profile as Speed Tracer" • Server traceability in App Engine and Springsource TC server • Enhance for regression testing and CI • Regression Dashboard
Speakers: Chrome - Ian Fette, Jeff Chang • HTML5 and Google are workingon: • 2D / 3D Rendering (WebGL) • Sharedworker + MagicIFrame • Filedragging • Voice input (recognitiion + TTS) • Webcam + Micaccess • Positional / 3D audio • Geolocation • Nowseparatespec: clientdatastore + filesystem (1 FS per origin) • Networking: Web Sockets • LessonsLearned • WebStore vs. Bookmarks • Database: no sql • Geolocation: accuracyvaries per device ; sec. issues HTML5 status update
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
Speakers: AppEngine - TobyReyelts, Don Schwarz Talk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/whats-hot-in-java-for-app-engine.html What’s HOT in Java for Google App Engine? • 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, ...
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)
Speaker: David Erb, Michael Schwartz Talk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/google-storage-for-developers.html Google Storage for Developers • BasedonBuckets + Objects • VERY similar to S3 but has strongconsistency • Allowssharing and authentication • Access via REST + Browser • Related • Google Big Query (code.google.com/apis/bigquery) • Prediction API (code.google.com/apis/prediction) • gsutilcommand line toolallowstoworkwith S3 and GS at thesame time - unixstylesyntax • Demo: cloudreader-demo.appspot.com
Speakers: App Engine - Amit Agarwal, Max Lin, Gideon Mann, Siddartha Naidu Talk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/bigquery-prediction-apis.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
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)
Speakers: Vic Gundotra (VP of Engineering, Google Inc.), Eric Schmidt (CEO, Google Inc.), .. • Android • Momentum • 60 compatible devices in 18 months • 21 OEMs • 48 countries • 59 carriers • Android 2.2 (Froyo) • Speed • JIT (2X to 5X faster) • Enterprise • 20 new features • Devs • App data backup • Android API Keynote 2 • 5x more searchs! • 50K apps • 180K devs • WiFi AP: tethering and portable hotspot
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)
Speaker: Reto Meier Talk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/beginners-guide-android.html A Begginer’s Guide to Android • 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
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)
Speakers: VirgilDobjanschi Talk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/developing-RESTful-android-apps.html Developing Android REST Applications • 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
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)
Speakers: Tech Talks - Matt Cutts, Greg Grothaus, Evan Roseman Wave: https://wave.google.com/wave/#restored:wave:googlewave.com!w+-Xhdu7ZkBLf SEO site advice from the experts • 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
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)
Speaker: John Panzer, Joseph Smarr Talk Video: http://code.google.com/intl/es-419/events/io/2010/sessions/building-fluid-social-experiences-across-websites.html Bridging the islands: Building fluid social experiences across websites • 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: • provide WebFinger • produce Activities • consume activities • Going real time: PubSubHubbub
Speakers: Google APIs - Zach Maier, Joseph Schorr, Mark Stahl Wave: https://wave.google.com/wave/waveref/googlewave.com/w+9rTSb7ZkBm1 How Google builds APIs • 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 • Corebuiltaround... • AtomSyndicationFormat (RFC4287) • Atom Publishing Protocol (RFC5023) • Overtime, support has beenaddedfor: • Concurrency, QueryParameters & Batch
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: marktask as DONE • TheRESTfulway: • GET /tasks/@me/{taskId} • modify resource on client, set the "done" bit • PUT /tasks/@me/{taskId} • Usingcustomverbs • POST /tasks/@me/{taskId}?method=markDone How Google builds APIs (cont’d)
Future Google API’s – Things to Improve • Calling Styles • Somepeopledoesn’tliketheRESTfulway, theyjustwant JSON-RPC How Google builds APIs (cont’d)
Future Google API’s – Things to Improve • Client Libraries • ClientLibrariesdon’tstayonthecuttingedge • Solution • DynamicDiscovery • Discovery Document: JSON, describes URLs, verbs, params, … • Always up to date • It’sjustanother API • “Generic” ClientLibraries • Discover resources, no more scrappingURL’sfromdoc • Use simple classestorepresentresources: POJOsJSON • Works onmultipleplatforms: servers, GAE, Android, Web, … • Release Once, workswithany API How Google builds APIs (cont’d)
How Google Really builds API’s • Define / Implement Service: • Define abstract resources w/Protocol Buffers • Define collections and verbs w/Protocol Buffers RPC • Configure API stack with Google’s API Tool: • REST paths, RPC methods, query parameters • Add functionality • Write external representation: JSON, Atom, XML, … How Google builds APIs (cont’d)
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 Post I/O: some comments