67
Implementing an OpenSocial Container Lou Moore, hi5.com

Implementing an OpenSocial Container Lou Moore, hi5.com

Embed Size (px)

Citation preview

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

Implementing an OpenSocial Container

Lou Moore, hi5.com

Page 2: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5

The Truly Global Social Network

Page 3: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5 — International Leader

Africa

Cote d'Ivoire

Ghana

Tunisia

Asia

Thailand

Mongolia

#1 social network in 26 countries:

80M+ registered members

40M WW monthly uniques

80M+ registered members

40M WW monthly uniques

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

Page 4: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5 — Truly Global Social Network

15%25%

30%

20%10%

hi5 Traffic Across the Globe

Page 5: Implementing an OpenSocial Container Lou Moore, hi5.com

Offered in 23 Language Options

Coming soon: hi5 tool to translate your application!

Coming soon: hi5 tool to translate your application!

English Español (3 dialects: Español, España & Argentina)

Português(2 dialects: Portugal & Brasil) Français

Italiano

Ελληνικά

Русский

中文(traditional & simplified scripts)

Deutsch

Nederlands

Türkçe

Română

日本語 ภาษาไทย

Polski

Magyar ČeskyYkpaÏHCbKa

한국어

Page 6: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5 User Demographics

Page 7: Implementing an OpenSocial Container Lou Moore, hi5.com

Opportunity to Reach New Users

~20% users overlap

~30% users overlap

~20% users overlap

~40M WW hi5 unique users~40M WW hi5 unique users

Page 8: Implementing an OpenSocial Container Lou Moore, hi5.com

Motivation

Why Platform? Why OpenSocial?

Page 9: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 10: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 11: Implementing an OpenSocial Container Lou Moore, hi5.com

Defining Your Platform

How will applications integrate with your social website?

Page 12: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 13: Implementing an OpenSocial Container Lou Moore, hi5.com

Views - Profile

Page 14: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 15: Implementing an OpenSocial Container Lou Moore, hi5.com

Views - Canvas

Dedicated page for applications Monetization opportunity – advertisements allowed

Page 16: Implementing an OpenSocial Container Lou Moore, hi5.com

Views - Canvas

Page 17: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 18: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 19: Implementing an OpenSocial Container Lou Moore, hi5.com

Views - Preview

Page 20: Implementing an OpenSocial Container Lou Moore, hi5.com

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)

Page 21: Implementing an OpenSocial Container Lou Moore, hi5.com

Views – Anywhere you choose!

Homepage? Photos? Albums? Define your own views in the context of your social site.

Page 22: Implementing an OpenSocial Container Lou Moore, hi5.com

Permissions

Access profile data Add profile module Allow friend updates (activity) Allow notifications Allow email

Page 23: Implementing an OpenSocial Container Lou Moore, hi5.com

Viral Channels - Activity

hi5 Friend Updates are displayed on the user’s profile and their friends’ homepages

Page 24: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 25: Implementing an OpenSocial Container Lou Moore, hi5.com

Viral Channels - Email

Limited to 1 per user/app/day

Page 26: Implementing an OpenSocial Container Lou Moore, hi5.com

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.

Page 27: Implementing an OpenSocial Container Lou Moore, hi5.com

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.

Page 28: Implementing an OpenSocial Container Lou Moore, hi5.com

Directory

Page 29: Implementing an OpenSocial Container Lou Moore, hi5.com

Applications Homepage

Page 30: Implementing an OpenSocial Container Lou Moore, hi5.com

Implementing a REST API

Creating the web services necessary to support OpenSocial

Page 31: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 32: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5 REST APIs

Page 33: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 34: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 35: Implementing an OpenSocial Container Lou Moore, hi5.com

OpenSocial REST API

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

Page 36: Implementing an OpenSocial Container Lou Moore, hi5.com

Implementing the OpenSocial API

Tying it back to your social data

Page 37: Implementing an OpenSocial Container Lou Moore, hi5.com

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)

Page 38: Implementing an OpenSocial Container Lou Moore, hi5.com

Shindig Structure

Page 39: Implementing an OpenSocial Container Lou Moore, hi5.com

Shindig - Features

Page 40: Implementing an OpenSocial Container Lou Moore, hi5.com

Shindig – opensocial-reference

Page 41: Implementing an OpenSocial Container Lou Moore, hi5.com

Shindig – opensocial-0.7

Page 42: Implementing an OpenSocial Container Lou Moore, hi5.com

Shindig – feature.xml

Page 43: Implementing an OpenSocial Container Lou Moore, hi5.com

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>>

Page 44: Implementing an OpenSocial Container Lou Moore, hi5.com

jsoncontainer.js – Fetch People

Page 45: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 46: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 47: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5container.js – Create Activity

Page 48: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5container.js – Share App

Page 49: Implementing an OpenSocial Container Lou Moore, hi5.com

Gadgets – Core

Prefs– user data including country and language injected into applications

io– gadgets.io.makeRequest for remote fetching– signed requests using OAuth

Page 50: Implementing an OpenSocial Container Lou Moore, hi5.com

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

Page 51: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5 Feature – Extending OpenSocial

hi5.newFetchAlbumsRequest hi5.ActivityMediaItemField.LINK hi5.PersonField.PRESENCE

Capabilities discovery– gadgets.util.hasFeature– gadgets.views.getSupportedViews– opensocial.getEnvironment().supportsField– Container declares supported features, views, and fields

Page 52: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5.js

Page 53: Implementing an OpenSocial Container Lou Moore, hi5.com

Running a Shindig Server

OpenSocial in a high-volume production environment

Page 54: Implementing an OpenSocial Container Lou Moore, hi5.com

Working with Shindig

Deployment model– Own shindig svn repository– Build gadgets.jar– Build api war including gadgets.jar (shindig) and friend.jar (hi5) using enunciate– Deploy resulting war as web service on tomcat 6

Page 55: Implementing an OpenSocial Container Lou Moore, hi5.com

hi5 Platform Architecture

Page 56: Implementing an OpenSocial Container Lou Moore, hi5.com

Production Shindig Stats

Currently 30 API/Shindig servers 6.4 billion requests since launch Servers processing on average 200 req/s, 4-500 possible Overall Traffic peak > 7000 req/s

Significant efforts invested in making shindig work well with caching in the browser and on Akamai.

Learnings contributed back to OpenSocial

Page 57: Implementing an OpenSocial Container Lou Moore, hi5.com

Building a Thriving Developer Community

Communication, Communication, Communication

Page 58: Implementing an OpenSocial Container Lou Moore, hi5.com

Tools

Built-in app editor Language preview Activity preview to come

Page 59: Implementing an OpenSocial Container Lou Moore, hi5.com

Communication

Wiki, Bug Tracker, Forums IRC!! Blog Posts

– Clear explanations of viral channels, ranking systems, guidelines– Post often

Page 60: Implementing an OpenSocial Container Lou Moore, hi5.com

Incentives

Free translations Hosting through Joyent

Page 61: Implementing an OpenSocial Container Lou Moore, hi5.com

Maintaining a Great User Experience

It’s still all about the users

Page 62: Implementing an OpenSocial Container Lou Moore, hi5.com

Privacy Controls

My Apps page with controls for each installed app Ability to select privacy settings on preview/install page Choice to uninstall or remove from profile on Remove link on profile

Page 63: Implementing an OpenSocial Container Lou Moore, hi5.com

Mitigating Spamminess

Blocking an app Reporting spam on all viral channels Collecting feedback Smart limits on viral channels, ability to monitor and control

It’s a delicate balance between developer freedom and user experience

Page 64: Implementing an OpenSocial Container Lou Moore, hi5.com

Internationalization & Localization

Basic support available today Activity and Message templates coming soon Crowd-sourced translation services for applications coming soon Developer outreach in global markets, leverage platform to provide

a locally relevant experience.

Page 65: Implementing an OpenSocial Container Lou Moore, hi5.com

Results

Production launch 3/31, full launch to 100% of users 4/4 65 applications at launch, 328 today in 21 categories Averaging > 1 million new installs each day 5 apps with > 1 million installs, 11 more with > 500k installs Top apps getting > 1 million daily canvas views

~50% of active users have at least one application installed Active users average ~3 apps on every profile, with as many as 16

Page 66: Implementing an OpenSocial Container Lou Moore, hi5.com

Demo

Walkthrough of an OpenSocial application on the hi5 platform: PixWall by PixVerse

Page 67: Implementing an OpenSocial Container Lou Moore, hi5.com

Questions?