1 / 67

Implementing an OpenSocial Container

Implementing an OpenSocial Container. Lou Moore, hi5.com. hi5. The Truly Global Social Network. hi5 — International Leader. #1 social network in 26 countries:. Africa Cote d'Ivoire Ghana Tunisia Asia Thailand Mongolia. Europe Portugal Romania Greece Cyprus Malta Albania

Download Presentation

Implementing an OpenSocial Container

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.


Presentation Transcript

  1. Implementing an OpenSocial Container Lou Moore, hi5.com

  2. hi5 The Truly Global Social Network

  3. hi5 — International Leader #1 social network in 26 countries: Africa Cote d'Ivoire Ghana Tunisia Asia Thailand Mongolia Europe Portugal Romania Greece Cyprus Malta Albania Macedonia Luxembourg Latin America & Caribbean Mexico Venezuela Costa Rica Honduras Ecuador El Salvador Guatemala Peru Nicaragua Dominican Republic Cuba Jamaica Barbados • 80M+ registered members • 40M WW monthly uniques

  4. hi5 — Truly Global Social Network hi5 Traffic Across the Globe 25% 15% 20% 10% 30%

  5. Offered in 23 Language Options English 한국어 Español (3 dialects: Español, España & Argentina) Português (2 dialects: Portugal & Brasil) 中文 (traditional & simplified scripts) Français Italiano Nederlands ภาษาไทย 日本語 Русский Deutsch Ελληνικά Türkçe Polski Română YkpaÏHCbKa Česky Magyar Coming soon: hi5 tool to translate your application!

  6. hi5 User Demographics

  7. Opportunity to Reach New Users ~20% users overlap ~40M WW hi5 unique users ~20% users overlap ~30% users overlap

  8. Motivation Why Platform? Why OpenSocial?

  9. Why Platform? • Tap talent and creativity of the developer community • Provide engaging experience for our users • Obtain locally relevant content, provide a locally relevant experience

  10. Why OpenSocial? • Standards-based platform for deep integration within hi5 • Decreases our time to market • Leverages open standards • Strong opensource community • Draw for developers because OpenSocial apps are easily portable

  11. Defining Your Platform How will applications integrate with your social website?

  12. Views - Profile • User profiles are the center for self-expression on hi5 and are a common feature of social sites • A profile page may have many applications

  13. Views - Profile

  14. Views – Profile • Considerations • Performance: Many applications with dynamic content will impact page load times. • Styling: hi5 Profiles can be heavily styled so application profile views need to be able to seamlessly blend. • Customization: Allow users to control their profile pages via features like module re-ordering. • Common Actions: Provide links to View, Share, and Remove applications. • What apps can’t do on hi5 Profiles • Use viral channels • Advertise or cross-promote

  15. Views - Canvas • Dedicated page for applications • Monetization opportunity – advertisements allowed

  16. Views - Canvas

  17. Views - Canvas • Considerations • Vanity URLs for application canvas pages • Canvas page should detect if user has installed the application • Provide links for users to manage application settings • Provide method for users to give feedback to developers

  18. Views - Preview • Non-standard view • Way for users to interact with an application without installing it • Option for installing application • Privacy settings to be applied • Displays information about the application • Metadata such as summary and description • Friends with the application • Other apps by the developer • Rankings & ratings

  19. Views - Preview

  20. Views - Preview • Considerations • Non-standard view, another size for developers to conform to • Permissions model is complex if viral channels allowed, but allows for a richer pre-install experience (beware the blinking red arrow)

  21. Views – Anywhere you choose! • Homepage? Photos? Albums? Define your own views in the context of your social site.

  22. Permissions • Access profile data • Add profile module • Allow friend updates (activity) • Allow notifications • Allow email

  23. Viral Channels - Activity • hi5 Friend Updates are displayed on the user’s profile and their friends’ homepages

  24. Viral Channels - Notifications • Lightweight message sent to a user notifying them of some event. • No action required, expire after 2 weeks, and limited to 5 per app/user/day

  25. Viral Channels - Email • Limited to 1 per user/app/day

  26. Viral Channels - Invites • Invites are requests sent from a user to a friend inviting them to install an application. Requests do require action on the part of the recipient.

  27. Directory • Applications must be approved to be added to the hi5 directory. • Randomized at launch to maintain a level playing field. • Engagement-based metrics will be introduced to rank applications. • Sorting by most recent applications and applications that are locally relevant or support the user’s language will also be introduced.

  28. Directory

  29. Applications Homepage

  30. Implementing a REST API Creating the web services necessary to support OpenSocial

  31. Publishing the hi5 Web Service • Enunciate • Opensource java web service framework • Publishes endpoints in REST, JSON, and SOAP formats • Auto-documenting, annotation-based • http://enunciate.codehaus.org • Authentication • auth tokens generated based on valid API Key and hi5 user/password combination • Auth token may be obtained via REST call, but is always made available within OpenSocial applications

  32. hi5 REST APIs

  33. REST API • OpenSocial core APIs • People • Activity • Persistence • hi5 REST endpoints • profile/foaf • feed/activity • profile/appdata • Example call • http://api.hi5.com/rest/profile/foaf/23777773

  34. REST API • OpenSocial request* APIs • requestSendMessage • requestCreateActivity • hi5 REST endpoints • notifications/send • message/sendEmails • friendUpdates/friendUpdate • Example call • http://api.hi5.com/rest/notifications/send?toIds=23777773&body=Hey&Hi5AuthToken=xxxxx

  35. OpenSocial REST API • Currently no standard REST API across containers • OpenSocial REST API spec in progress • hi5 will migrate to support this in future

  36. Implementing the OpenSocial API Tying it back to your social data

  37. Shindig • Opensource Apache project – implementation of OpenSocial and Gadgets specifications. • Gadget Container JavaScript -- core JavaScript foundation for general gadget functionality. • Gadget Server – renders the gadget XML into JavaScript and HTML • OpenSocial Container JavaScript -- OpenSocial specific functionality (profiles, friends, activities, datastore)

  38. Shindig Structure

  39. Shindig - Features

  40. Shindig – opensocial-reference

  41. Shindig – opensocial-0.7

  42. Shindig – feature.xml

  43. Data Requests • opensocial.newDataRequest • newFetchPersonRequest • newFetchPeopleRequest • newFetchActivitiesRequest • newFetchPersonAppDataRequest • newUpdatePersonAppDataRequest • Map to hi5 REST endpoints and convert results to OpenSocial objects • opensocial.Person • opensocial.Activity • Persistence returns Map<PersonId, Map<String, String>>

  44. jsoncontainer.js – Fetch People

  45. jsoncontainer.js and the SocialData Servlet • Request Batching • Java servlet handles batched requests and returns one large JSON response • All data fetches routed to SocialData servlet via jsoncontainer.js

  46. Viral Requests (request*) • opensocial.requestCreateActivity • supported fields include TITLE, BODY, MEDIA_ITEMS, URL • a and br tags allowed in TITLE and BODY • opensocial.requestSendMessage • NOTIFICATION and EMAIL implemented • PRIVATE_MESSAGE and PUBLIC_MESSAGE return NOT_IMPLEMENTED response • opensocial.requestShareApp • implemented as rpc call to navigate to invite page • Map requests to hi5 REST api, return opensocial.ResponseItem

  47. hi5container.js – Create Activity

  48. hi5container.js – Share App

  49. Gadgets – Core • Prefs • user data including country and language injected into applications • io • gadgets.io.makeRequest for remote fetching • signed requests using OAuth

  50. Gadgets – Other Features • Views • gadgets.views.requestNavigateTo • rpc call to navigate to a desired View • gadgets.views.getCurrentView • gadgets.views.getParams • view-params • params in json format to be passed into applications • Skins • gadgets.skins.getProperty

More Related