Your SlideShare is downloading. ×
0
and Apache Shindig



Chris Schalk, Google Developer Advocate

FaceBook and OpenSocial Developer Meetup - 12/10/2008
Agenda


    • OpenSocial Concepts
    • Apache Shindig
    • The OpenSocial Specification Process




2
Agenda


    • OpenSocial Concepts
    • Apache Shindig
    • The OpenSocial Specification Process




3
Too many platforms!
Standards based
 OpenSocial



Write once…
   Deploy everywhere
Massive exposure for
    your apps!
OpenSocial Concepts




                 What is OpenSocial?

    “OpenSocial defines a common set of APIs based on Open S...
OpenSocial Concepts




          Who own’s OpenSocial?
                                 ?     No!

         OpenSocial is...
Some OpenSocial Partners
In one year: has over 600 Million user reach!
More OpenSocial numbers




  315M+ app Installations

  85M+ daily canvas page views

  7,500+ applications

  20+ li...
Where is OpenSocial live today?
     Applications live to Users:          Initial Developer Sandboxes:

      •   LinkedIn...
Not just Social Network Sites



 • Social network sites - Profiles and home pages
     ex: MySpace, Hi5


 • Personal das...
OpenSocial Roadmap



     • Version 0.5 was released in a “developer release” on Nov
     1st.
         • First “sandbox”...
OpenSocial Roadmap


     • Version v0.8 is current

     • Latest evolution of OpenSocial as defined by the
     OpenSoci...
OpenSocial v0.8.1 spec is here


     • Specification is now published
     • Updates include:
        • RESTful Protocol ...
OpenSocial 0.9 - Future Directions

     • Goal:
        – Enable a faster development experience that is both secure and
...
To follow the progress of the Spec…




     http://groups.google.com/group/opensocial-and-gadgets-spec




20
Demonstration:
     Building OpenSocial Applications




21
Agenda


     • OpenSocial Concepts
     • Apache Shindig
     • The OpenSocial Specification Process




22
How do you host OpenSocial Applications?



     1. Can build your own server that implements
     OpenSocial specificatio...
Hosting OpenSocial Applications

     What is Shindig?
        • Apache Incubator Project

        • Currently available i...
Why use Shindig?

     • Strong Open Source community

     • High quality production-ready code
        • Used by: hi5, o...
How Shindig works
     • Gadget Server
     • OpenSocial Data Server


                                 Shindig
       You...
Java Shindig components
     • Gadget Server
     • OpenSocial Data Server


                                 Shindig
    ...
Shindig success at hi5


     • Big Traffic
        • 10k req/sec Edge
        • 6k req/sec Origin


     • Hundreds of De...
Demonstration: Trying out Shindig




29                                       29
Adapting Shindig
     •   Adapting Shindig to your own social data


               Shindig

              Gadget Server

...
Demonstration: Shindig with MySQL




31                                       31
RESTful and RPC protocols
     Shindig now supports both REST and RPC protocols as of v0.8!

     Opens new development mo...
RESTful and RPC protocols
     Communication methods:
     •RESTful (Representational State Transfer)
     •RPC (Remote Pr...
RESTful and RPC protocols
     REST:
     •Resources are URLs.
     Example - People:
      • All people connected to the ...
RESTful and RPC protocols
     Querystring parameters customize requests:
      • Response format (JSON, XML, AtomPub)‫‏‬
...
RESTful and RPC protocols
     REST responses (Person):
      • JSON:
      {
          quot;idquot; : quot;example.org:34...
RESTful and RPC protocols
     REST responses (Person):
      • AtomPub:
      <entry xmlns=quot;http://www.w3.org/2005/At...
RESTful and RPC protocols

     REST has some disadvantages:

     •Batch support requires multiple HTTP requests, or a co...
RESTful and RPC protocols
     RPC:
     •One endpoint - parameters specify methods to call.
     •Batch support.
     •Sp...
RESTful and RPC Client libraries
     Client libraries are being created for PHP, Java, Ruby and Python.
        • Help yo...
RESTful and RPC protocols
     Sample: Fetch a user’s friends from Shindig:


      OpenSocialClient c = new OpenSocialCli...
Demonstration: Trying out the REST client library




42                                                       42
Example container applications


     Java
     • Socialsite
     • Created by Sun
     • Flexible social graph
     • Com...
Example container applications


     PHP
     • Partuza
     • Created by Google employee
     • Hosted on Google Project...
Agenda


     • OpenSocial Concepts
     • Apache Shindig
     • The OpenSocial Specification Process




45
The OpenSocial specification process




46
The OpenSocial specification process




47
The OpenSocial specification process




48
Useful Links

 Homepage & specification:             http://www.opensocial.org

 New Wiki! (Compliancy, Cross container de...
Questions




                 Q&A


50
Open Social Shindig Preso for FB and OpenSocial Meetup
Open Social Shindig Preso for FB and OpenSocial Meetup
Upcoming SlideShare
Loading in...5
×

Open Social Shindig Preso for FB and OpenSocial Meetup

6,684

Published on

This is a presentation on OpenSocial and Shindig given to a Facebook/OpenSocial developer meetup in Palo Alto on Dec 10, 2008

Published in: Technology
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,684
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
186
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide

Transcript of "Open Social Shindig Preso for FB and OpenSocial Meetup"

  1. 1. and Apache Shindig Chris Schalk, Google Developer Advocate FaceBook and OpenSocial Developer Meetup - 12/10/2008
  2. 2. Agenda • OpenSocial Concepts • Apache Shindig • The OpenSocial Specification Process 2
  3. 3. Agenda • OpenSocial Concepts • Apache Shindig • The OpenSocial Specification Process 3
  4. 4. Too many platforms!
  5. 5. Standards based OpenSocial Write once… Deploy everywhere
  6. 6. Massive exposure for your apps!
  7. 7. OpenSocial Concepts What is OpenSocial? “OpenSocial defines a common set of APIs based on Open Standards for building social applications across multiple websites” 9
  8. 8. OpenSocial Concepts Who own’s OpenSocial? ? No! OpenSocial is managed under the auspices of the “OpenSocial Foundation” - http://www.opensocial.org 10
  9. 9. Some OpenSocial Partners
  10. 10. In one year: has over 600 Million user reach!
  11. 11. More OpenSocial numbers  315M+ app Installations  85M+ daily canvas page views  7,500+ applications  20+ live containers 13
  12. 12. Where is OpenSocial live today? Applications live to Users: Initial Developer Sandboxes: • LinkedIn - New • iGoogle • MySpace • Yahoo! • orkut • Minglebox • Hi5 • imeem • Freebar • Viadeo • Friendster • CityIN • Webon from Lycos • IDtail • Tianya • YiQi • Ning • Netlog • Plaxo Pulse • Hyves • Lokalisten • … many more in the pipeline! • Ning • Fanbox • XiaoNei • Mail.ru • Socialtext • 51.com http://wiki.opensocial.org 14
  13. 13. Not just Social Network Sites • Social network sites - Profiles and home pages ex: MySpace, Hi5 • Personal dashboards – Widgets ex: iGoogle, My Yahoo • Sites based around a Social Object ex: Flickr, YouTube • Enterprise, Professional ex: LinkedIn, Oracle, SalesForce.com • Any web site 15
  14. 14. OpenSocial Roadmap • Version 0.5 was released in a “developer release” on Nov 1st. • First “sandbox” was made available on Orkut • Version 0.6 was released in December • Initial version of Shindig server software was launched as Apache incubator project • Other sandboxes came live - Hi5, Ning, Plaxo … • Version 0.7 (production) was released in January • MySpace, Hi5, Orkut currently running with 0.7 16
  15. 15. OpenSocial Roadmap • Version v0.8 is current • Latest evolution of OpenSocial as defined by the OpenSocial development community • Updated JavaScript API • Now contains a RESTful API • hi5, MySpace, orkut, iGoogle now support 0.8 • Specification: http://www.opensocial.org/Technical-Resources/opensocial-spec-v08 17
  16. 16. OpenSocial v0.8.1 spec is here • Specification is now published • Updates include: • RESTful Protocol updates • JSON RPC Protocol • Specification: http://sites.google.com/a/opensocial.org/opensocial/Technical- Resources/opensocial-spec-v081 18
  17. 17. OpenSocial 0.9 - Future Directions • Goal: – Enable a faster development experience that is both secure and efficient • Solution: “Opensocial Templates”! OS Templates core principles: • Client-side and server-side processing • Standard set of tags with extensibility model – Example: <os:ShowPerson> • http://groups.google.com/group/opensocial-and-gadgets- spec/web/opensocial-templates – Demo: http://ostemplates-demo.appspot.com/ 19
  18. 18. To follow the progress of the Spec… http://groups.google.com/group/opensocial-and-gadgets-spec 20
  19. 19. Demonstration: Building OpenSocial Applications 21
  20. 20. Agenda • OpenSocial Concepts • Apache Shindig • The OpenSocial Specification Process 22
  21. 21. How do you host OpenSocial Applications? 1. Can build your own server that implements OpenSocial specification… 2. Or can use “Shindig” - Reference implementation for OpenSocial 23
  22. 22. Hosting OpenSocial Applications What is Shindig? • Apache Incubator Project • Currently available in Java and PHP • Shindig Components: • Gadget Server •Parses gadget XML, renders as HTML/JS/CSS • OpenSocial Data Server • Plugs into social graph data • RESTful, RPC protocol services • Downloaded JavaScript libraries •Core gadgets, OpenSocial client JavaScript environment http://incubator.apache.org/shindig 24
  23. 23. Why use Shindig? • Strong Open Source community • High quality production-ready code • Used by: hi5, orkut, iGoogle, Netlog, Hyves … • Synchronized with specification • Language neutral (Java, PHP, …) • .Net coming soon! 25
  24. 24. How Shindig works • Gadget Server • OpenSocial Data Server Shindig Yoursite.com Gadget Gadget Server OpenSocial DataServer 26 26
  25. 25. Java Shindig components • Gadget Server • OpenSocial Data Server Shindig Yoursite.com Gadget Gadget Server OpenSocial DataServer 27 27
  26. 26. Shindig success at hi5 • Big Traffic • 10k req/sec Edge • 6k req/sec Origin • Hundreds of Developers • 1800+ Apps • 1 Billion hits/day … on 42 Shindig servers 28 28
  27. 27. Demonstration: Trying out Shindig 29 29
  28. 28. Adapting Shindig • Adapting Shindig to your own social data Shindig Gadget Server OpenSocialDataServer ActivityService Social Graph PersonService Data AppDataService 30
  29. 29. Demonstration: Shindig with MySQL 31 31
  30. 30. RESTful and RPC protocols Shindig now supports both REST and RPC protocols as of v0.8! Opens new development models • Background processing. • Easier Flash integration. • Mobile applications. 32
  31. 31. RESTful and RPC protocols Communication methods: •RESTful (Representational State Transfer) •RPC (Remote Procedure Call)‫‏‬ Formats: •XML •JSON •AtomPub 33
  32. 32. RESTful and RPC protocols REST: •Resources are URLs. Example - People: • All people connected to the given user: /people/{guid}/@all • All friends of the given user: /people/{guid}/@friends • Profile of the given user: /people/{guid}/@self • Profile of the authenticated user: /people/@me/@self • Supported Person fields: /people/@supportedFields 34
  33. 33. RESTful and RPC protocols Querystring parameters customize requests: • Response format (JSON, XML, AtomPub)‫‏‬ format={format} • Request extra fields fields={-join|,|field}. • Filtering: filterBy={fieldname} filterOp={operation}filterValue={value} updatedSince={xsdDateTime} networkDistance={networkDistance} • Paging: count={count} sortBy={fieldname} sortOrder={order} startIndex={startIndex} 35
  34. 34. RESTful and RPC protocols REST responses (Person): • JSON: { quot;idquot; : quot;example.org:34KJDCSKJN2HHF0DW20394quot;, quot;displayNamequot; : quot;Janeyquot;, quot;namequot; : {quot;unstructuredquot; : quot;Jane Doequot;}, quot;genderquot; : quot;femalequot; } • XML: <person xmlns=quot;http://ns.opensocial.org/2008/opensocialquot;> <id></id> <displayName></displayName> <name> <unstructured>Jane Doe</unstructured> </name> <gender>female</gender> </person> 36
  35. 35. RESTful and RPC protocols REST responses (Person): • AtomPub: <entry xmlns=quot;http://www.w3.org/2005/Atomquot;> <content type=quot;application/xmlquot;> <person xmlns=quot;http://ns.opensocial.org/2008/opensocialquot;> <name> <unstructured>Jane Doe</unstructured> </name> <gender>female</gender> </person> </content> <title/> <updated>2003-12-13T18:30:02Z</updated> <author/> <id>urn:guid:example.org:34KJDCSKJN2HHF0DW20394</id> </entry> 37
  36. 36. RESTful and RPC protocols REST has some disadvantages: •Batch support requires multiple HTTP requests, or a contrived URL scheme. •Specifying multiple users via querystring is difficult. Is ?uid=1234,5678 the same resource as ?uid=5678,1234 ? 38
  37. 37. RESTful and RPC protocols RPC: •One endpoint - parameters specify methods to call. •Batch support. •Specify collections of users through passed arguments, not URLs. Example - Fetch current user: • Request • Response POST /rpc HTTP/1.1 HTTP/1.x 207 Multi-Status Host: api.example.org Content-Type: application/json Authorization: <Auth token> { Content-Type: application/json quot;idquot; : quot;myselfquot;, { quot;resultquot; : { quot;methodquot; : quot;people.getquot;, quot;idquot; : quot;example.org:34KJDCSKJN2HHF0DW20394quot;, quot;idquot; : quot;myselfquot;, quot;namequot; : { quot;unstructuredquot; : quot;Jane Doequot;}, quot;paramsquot; : { quot;genderquot; : quot;femalequot; quot;useridquot; : quot;@mequot;, } quot;groupidquot; : quot;@selfquot; } } } 39
  38. 38. RESTful and RPC Client libraries Client libraries are being created for PHP, Java, Ruby and Python. • Help you connect to OpenSocial containers, and work with social data on your server. http://code.google.com/p/opensocial-java-client/ http://code.google.com/p/opensocial-ruby-client/ http://code.google.com/p/opensocial-php-client/ 40
  39. 39. RESTful and RPC protocols Sample: Fetch a user’s friends from Shindig: OpenSocialClient c = new OpenSocialClient(quot;myhost.comquot;); c.setProperty(OpenSocialClient.Properties.REST_BASE_URI, quot;http://localhost:8080/social/rest/quot;); try { OpenSocialPerson p = c.fetchPerson(quot;john.doequot;); System.out.println(p.getDisplayName()); Collection<OpenSocialPerson> friends = c.fetchFriends(quot;john.doequot;); for (OpenSocialPerson friend : friends) { System.out.println(friend.getDisplayName()); } } catch (Exception e) { } 41
  40. 40. Demonstration: Trying out the REST client library 42 42
  41. 41. Example container applications Java • Socialsite • Created by Sun • Flexible social graph • Completely Open Source https://socialsite.dev.java.net/ 43
  42. 42. Example container applications PHP • Partuza • Created by Google employee • Hosted on Google Projects • Based on PHP Shindig http://code.google.com/p/partuza/ 44
  43. 43. Agenda • OpenSocial Concepts • Apache Shindig • The OpenSocial Specification Process 45
  44. 44. The OpenSocial specification process 46
  45. 45. The OpenSocial specification process 47
  46. 46. The OpenSocial specification process 48
  47. 47. Useful Links Homepage & specification: http://www.opensocial.org New Wiki! (Compliancy, Cross container development …) • http://wiki.opensocial.org Get on the forums: • http://groups.google.com/group/opensocial Subscribe to the Shindig mailing list: • shindig-dev-subscribe@incubator.apache.org Help shape the specification: • http://groups.google.com/group/opensocial-and-gadgets-spec/ Check out Shindig: • http://incubator.apache.org/shindig OS Templates: • http://groups.google.com/group/opensocial-and-gadgets-spec/web/opensocial-templates 49
  48. 48. Questions Q&A 50
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×