empowering the social web with apache shindig
DESCRIPTION
The social web is already reality! It makes applications available to more users, by providing common APIs that can be used in many different contexts. OpenSocial is an API that can be used by developers to create applications using standard JavaScript and HTML. These applications run on social websites that have implemented the OpenSocial APIs. Known as OpenSocial containers, these websites allow developers to access their social information. In return, they receive a large suite of applications for their users. Apache Shindig is a brand new incubator podling implementing the OpenSocial APIs. This talk describes Shindig in depth, and shows how it can be embedded into a larger web application to enable the web-app to host OpenSocial apps.TRANSCRIPT
![Page 1: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/1.jpg)
Empowering the Social Web with Apache
ShindigPaul Lindner
Wed Nov 4th, 2009
Saturday, November 14, 2009
![Page 2: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/2.jpg)
The Social WebSaturday, November 14, 2009
![Page 3: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/3.jpg)
The Social WebPeople and Connections
Activity Streams / News FeedsMessaging / Notifications
APIs?
Saturday, November 14, 2009
![Page 4: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/4.jpg)
Saturday, November 14, 2009
![Page 5: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/5.jpg)
Saturday, November 14, 2009
![Page 6: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/6.jpg)
Saturday, November 14, 2009
![Page 7: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/7.jpg)
The SolutionGadgets from iGoogle
Add People, Activities, and Viral Javascript APIs
Open to all
Iterate..
Saturday, November 14, 2009
![Page 8: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/8.jpg)
And Then...OpenSocial Foundation
HackathonsAtom/XML/Json REST APIs
OpenSocial TemplatesData Pipelining
Portable ContactsOAuth
Activity Streams?
Saturday, November 14, 2009
![Page 9: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/9.jpg)
End ResultSaturday, November 14, 2009
![Page 10: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/10.jpg)
Shindig
Saturday, November 14, 2009
![Page 11: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/11.jpg)
ShindigSaturday, November 14, 2009
![Page 12: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/12.jpg)
ShindigSaturday, November 14, 2009
![Page 13: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/13.jpg)
ShindigSaturday, November 14, 2009
![Page 14: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/14.jpg)
Apache Shindig is...
• Gadgets and OpenSocial and Reference Implementation
• OAuth Client/Server
• Java/PHP Implementation
• Almost 2 years old!
• Production-Quality code.
Saturday, November 14, 2009
![Page 15: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/15.jpg)
Mostly ShindigSaturday, November 14, 2009
![Page 16: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/16.jpg)
Shindig is not...
• A Full Featured Social Network
• A system to manage applications and developers
• All that developer friendly (yet!)
Saturday, November 14, 2009
![Page 17: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/17.jpg)
Project Status• 21 Committers
• 231 Jira Contributors
• 287k LoC
• 1.0 Released, 1.1 on the way
• Almost Graduated from Incubation
• Good Practices - Code Review, TDD
Saturday, November 14, 2009
![Page 18: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/18.jpg)
1.1 Release• OpenSocial 0.9 Features
• Server Side Templates
• Server Side Preloads
• Data Pipelining
• Proxied Content
• lightweight JavaScript apis / JSON-RPC
• Major Upgrade
• 2212 files changed, 138129 insertions(+), 40672 deletions(-)
Saturday, November 14, 2009
![Page 19: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/19.jpg)
OpenSocial VersionsSaturday, November 14, 2009
![Page 20: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/20.jpg)
Shindig Offspring• Partuza
• SocialSite
• Sakai
• Lockheed Martin Eureka Framework
• Atlassian (Jira, Confluence, etc)
• Drupal Integration
• FriendConnect
• Others?
Saturday, November 14, 2009
![Page 21: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/21.jpg)
Getting Started - Java
• Install Maven, Subversion
• Check out Code
• Build, Install and run
svn co http://svn.apache.org/repos/asf/incubator/shindig/trunkcd trunkmvnmvn -Prun
Saturday, November 14, 2009
![Page 22: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/22.jpg)
Getting Started - PHP
• Install Subversion, Apache httpd, PHP > 5.2, and PHP with modules json, simplexml, mcrypt and curl
• Check out Shindig Code
• Configure Apache
Saturday, November 14, 2009
![Page 23: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/23.jpg)
DEMOSaturday, November 14, 2009
![Page 24: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/24.jpg)
Shindig Foundations• Java
• Maven and plugins
• Guice 2.0
• Apache Commons
• OAuth
• Ehcache
• Juel
• httpclient
• google-collections
• PHP
• PHPUnit
• Zend
• mod_rewrite
• OAuth
Saturday, November 14, 2009
![Page 25: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/25.jpg)
Shindig Architecture
• Gadget Server/Renderer
• OpenSocial data server (REST, Atom, JSON-RPC)
• People/Activities/Messages/Persistence Interfaces.
Saturday, November 14, 2009
![Page 26: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/26.jpg)
Extra Features
• Proxy Server
• Image Resizer
• Content Rewriter/Compressor
• Gadget Blacklist
• more!
Saturday, November 14, 2009
![Page 27: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/27.jpg)
Saturday, November 14, 2009
![Page 28: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/28.jpg)
Saturday, November 14, 2009
![Page 29: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/29.jpg)
Java Implementation
• Uses Composition and Dependency Injection via Guice.
• People/Activities/AppData/Messaging Services.
• Authentication and Security
• Hooks for just about everything else.
Saturday, November 14, 2009
![Page 30: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/30.jpg)
Integration Basics
• Implement Interfaces - People, Activities, Data, Messaging
• Review shindig.properties, container.js
• Write Guice Module
• Add to web.xml
• Add more - HttpFetcher, HttpCache, SecurityTokenDecoder, etc.
Saturday, November 14, 2009
![Page 31: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/31.jpg)
PeopleServicepublic Future<RestfulCollection<Person>> getPeople(Set<UserId> userIds, GroupId groupId, CollectionOptions options, Set<String> fields, SecurityToken token) throws ProtocolException { ...}
public Future<Person> getPerson(UserId id, Set<String> fields, SecurityToken token) throws ProtocolException { ...}
Saturday, November 14, 2009
![Page 32: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/32.jpg)
ActivityServicepublic Future<RestfulCollection<Activity>> getActivities(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token);
public Future<Void> createActivity(UserId userId, GroupId groupId, String appId, Set<String> fields, Activity activity, SecurityToken token);(and more....)
Saturday, November 14, 2009
![Page 33: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/33.jpg)
AppDataServiceFuture<DataCollection> getPersonData(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, SecurityToken token);
Future<Void> deletePersonData(UserId userId, GroupId groupId, String appId, Set<String> fields, SecurityToken token);
Future<Void> updatePersonData(UserId userId, GroupId groupId, String appId, Set<String> fields, Map<String, String> values, SecurityToken token);
Saturday, November 14, 2009
![Page 34: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/34.jpg)
MessageServiceFuture<RestfulCollection<MessageCollection>> getMessageCollections(UserId userId, Set<String> fields, CollectionOptions options, SecurityToken token);
* also create/modify/delete
Future<RestfulCollection<Message>> getMessages(UserId userId, String msgCollId, Set<String> fields, List<String> msgIds, CollectionOptions options, SecurityToken token);
* also create/modify/delete
Saturday, November 14, 2009
![Page 35: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/35.jpg)
Guice Module
package com.example.MyGuiceModule;
public class MyGuiceModule extends AbstractBaseModule { protected void configure() { bind(PeopleService.class).to(MyPeopleService.class); bind(ActivityService.class).to(MyActivityService.class); bind(AppDataService.class).to(MyAppDataService.class); bind(MessageService.class).to(MyMessageService.class); }}
Saturday, November 14, 2009
![Page 36: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/36.jpg)
shindig.properties
• 42 Parameters at last count
• Global Cache Params
• Global RSA key for OAuth signed requests
• Bound via Guice in the code
• @Named(“shindig.param”) String param
Saturday, November 14, 2009
![Page 37: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/37.jpg)
container.js
• Support for multiple containers
• Defines supported fields, url paths
• Should match web.xml config
Saturday, November 14, 2009
![Page 38: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/38.jpg)
web.xml
<content-param> <param-name>guice-modules</param-name> <param-value>com.example.MyGuiceModule</param-value></context-param>
• Copy web.xml
• java/server/src/main/webapp/WEB-INF/web.xml
• Add Guice Module
Saturday, November 14, 2009
![Page 39: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/39.jpg)
More!• Customize HttpFetcher
for security
• OAuthDataStore OAuth API Access.
• SecurityTokenDecoder to link with your existing security infrastructure.
• ExecutionListener for logging and analytics
• GadgetSpecFactory for localized control of GadgetSpecs
• OAuthStore for proxying OAuth requests
Saturday, November 14, 2009
![Page 40: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/40.jpg)
Container to Platform
• Add Schemas for Data
• Apps, Developers, Permissions, Notifications, App Invites
• Add UI Elements
• Gallery, Canvas, Invites, Notifications
Saturday, November 14, 2009
![Page 41: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/41.jpg)
DEMOSaturday, November 14, 2009
![Page 42: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/42.jpg)
Parting Thoughts
• OpenSocial & Shindig - Mature, Open, and Successful
• Social Networks to the Enterprise
• Open Stack is emerging
• OAuth, OpenId, Portable Contacts, Activity Streams
• Shindig is your gateway.
Saturday, November 14, 2009
![Page 43: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/43.jpg)
Learn More
• http://incubator.apache.org/shindig/
• http://www.opensocial.org
• Social and Widgets Meetup
• Thursday, 8pm
Saturday, November 14, 2009
![Page 44: Empowering the Social Web with Apache Shindig](https://reader034.vdocuments.net/reader034/viewer/2022051515/54c6a8e24a795973318b45a8/html5/thumbnails/44.jpg)
Q & A
Saturday, November 14, 2009