performance challenges for the open web
DESCRIPTION
Performance Challenges for the Open Web. Stanford CS193H 29 September 2008. Background: making the web work better. I’ve been abusing web browsers for 15 years http://josephsmarr.com I used to work on AJAX / JS performance - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/1.jpg)
Performance Challenges
for the Open Web
Stanford CS193H29 September 2008
![Page 2: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/2.jpg)
Background: making the web work better
I’ve been abusing web browsers for 15 years
- http://josephsmarr.com
I used to work on AJAX / JS performance- http://josephsmarr.com/2007/07/25/high-performance-javascript-oscon-2007- Video:
http://developer.yahoo.net/blogs/theater/archives/2007/08/joseph_smarr_highperformance_j.html
Now I’m helping open up the social web- http://josephsmarr.com/2008/09/22/tying-it-all-together-implementing-the-open-web-web-20-expo-
new-york- Weekly video podcast: thesocialweb.tv
Open Web has new performance challenges- Making multiple sites play well together- Privacy, transparency, flexibility, simplicity
![Page 3: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/3.jpg)
In a world with lots of socially-aware sites…
![Page 5: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/5.jpg)
…how do the pieces fit together?
…and what will the new
Social Web look like?
![Page 6: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/6.jpg)
![Page 7: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/7.jpg)
Reminder: The social web today is broken…
On each site, we still have to:-Re-create an account-Re-enter our profile info-Re-find our friends-Re-establish our relationships
New social apps have limited options:-Create yet-another-silo (and start from scratch)
-or--Make a widget inside an existing walled garden
![Page 8: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/8.jpg)
…but we know how to make things better!
![Page 9: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/9.jpg)
Create a portable, durable online identity
OpenID- Sign up / sign in with an existing
account- Link / share your profile data between
sites
![Page 10: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/10.jpg)
Example: Sign up for Plaxo with OpenID
![Page 11: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/11.jpg)
![Page 12: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/12.jpg)
![Page 13: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/13.jpg)
![Page 14: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/14.jpg)
Create a portable, durable online identity
OpenID- Sign up / sign in with an existing account- Link / share your profile data between sites
rel=me (XFN)- Consolidate your online identity with me-links
Social Graph API- See what your users said about themselves
![Page 15: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/15.jpg)
![Page 16: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/16.jpg)
![Page 17: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/17.jpg)
![Page 18: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/18.jpg)
![Page 19: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/19.jpg)
![Page 20: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/20.jpg)
![Page 21: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/21.jpg)
Build and maintain real relationships
Contact APIs- Find people from your current address book- Leverage previously established relationships
OAuth- Share private data between trusted sites
Friends-list portability- Continuous discovery across multiple sites
![Page 22: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/22.jpg)
![Page 23: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/23.jpg)
![Page 24: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/24.jpg)
“A periodic check of new people from your networks on other sites”
![Page 25: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/25.jpg)
Stay up-to-date with the people you know
OpenSocial- Build social apps that can run anywhere
![Page 26: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/26.jpg)
OpenSocial
![Page 27: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/27.jpg)
OpenSocial: Large and Growing Rapidly
![Page 28: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/28.jpg)
Stay up-to-date with the people you know
OpenSocial- Build social apps that can run anywhere
RSS / Atom- Syndicate your activity to share with others
Jabber (XMPP)- Real-time update stream between sites
![Page 29: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/29.jpg)
![Page 30: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/30.jpg)
![Page 31: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/31.jpg)
![Page 32: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/32.jpg)
![Page 33: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/33.jpg)
![Page 34: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/34.jpg)
Building blocks in action: contacts portability
User signs in with an OpenID- Site fetches OpenID URL looks for X-XRDS-Location- Site parses XRDS-Simple doc to discover available APIs
Site tries to access contacts API gets a 401- WWW-Authenticate response header specifies OAuth- OAuth Discovery (via XRDS) provides OAuth endpoints
Site sends user though OAuth flow to grant access- User returns to site with authorized access token- Site can now access users’ contacts data via API + token
![Page 35: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/35.jpg)
Performance Challenges
Minimizing round trips- Discovery, Association, OpenID, OAuth, etc.- Combining steps vs. small pieces loosely
joined- JSON-RPC in OpenSocial (batching API calls)
Caching: freshness vs. performance- Policies for how long to store personal data- Social Graph API: cached web crawl- Server-alerted notifications
![Page 36: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/36.jpg)
Performance Challenges (cont.)
Pull vs. push: aggregating activity- Polling is easy but inefficient & doesn’t scale
(1000 users every 15 min > 1 hit per sec)- XMPP & Gnip: receive update notifications
Integrating 3rd party content- Server-side (proxied) vs. client-side (JS
onload)- Iframe vs. inline- New techniques: XFBML, Caja, etc.
![Page 38: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/38.jpg)
![Page 39: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/39.jpg)
![Page 40: Performance Challenges for the Open Web](https://reader030.vdocuments.us/reader030/viewer/2022033103/568154b9550346895dc2c28b/html5/thumbnails/40.jpg)