Shindig in 2 hours
Post on 21-Jan-2015
5832 Views
Preview:
DESCRIPTION
Transcript
www.exoplatform.com
Copyright 2011 eXo Platform
SHINDIG IN 2 HOURS
hanhvq@exoplatform.comSocial team
2www.exoplatform.com
Copyright 2011 eXo Platform
3www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig: - Introduction - Architecture
Shindig integration (eXo)
Objective: 3W
In 2 hours ...
www.exoplatform.com
Copyright 2011 eXo Platform
Shindig Introduction
5www.exoplatform.com
Copyright 2011 eXo Platform
6www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (Introduction)
7www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (Introduction)
8www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (Introduction)
9www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (Introduction)
10www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (Introduction)
11www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (Introduction)
12www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (Introduction)
13www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig
What is shindig?- OpenSocial container→start hosting OpenSocial apps quickly by: + Providing the code to render gadgets + Open Social API, RESTful, RPC protocol services
- Java and PHP
GoalLauch a new container in under an hour's worth of work.
14www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (History)
Version Release OpenSocial
3.0.02.0.3 01/Dec/10 2.0.2 30/Oct/10 2.0.0 07/Sep/10 2.0.0-RC2 10/Aug/10 1.1-BETA5 23/Nov/09 0.9 1.0.1 10/May/10 0.8 1.0 19/Jun/09
Nov 2007
15www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (In Production)
16www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig. Why Use?
• Strong Open Source community
• High quality production-ready code
• Used by: hi5, orkut, iGoogle, Netlog, Hyves …
• Synchronized with specification
• Language neutral (Java, PHP, ...)
17www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (Getting Started-Java)
http://shindig.apache.org/getting-started.html
- Check out code svn co http://svn.apache.org/repos/asf/incubator/shindig/trunk
- Build & Run (Jetty Server) mvn clean install mvn -Prun
- Run (tomcat server) http://localhost:8080/container/sample1.html http://localhost:8080/social/rest/people/canonical/@self?format=xml
www.exoplatform.com
Copyright 2011 eXo Platform
Shindig Architecture
19www.exoplatform.com
Copyright 2011 eXo Platform
• 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
Shindig Architecture (Components)
20www.exoplatform.com
Copyright 2011 eXo Platform
Apache Shindig (APIs – Entry Points)
- OS API renderGadget() req.send() req..requestCreateActivity()
- REST API ..social/rest/people/...
..social/rest/activities/...
21www.exoplatform.com
Copyright 2011 eXo Platform
• Shindig Client and Server Components
• Gadget Server
• Social Data Server
Shindig Architecture
22www.exoplatform.com
Copyright 2011 eXo Platform
• Shindig Client and Server Components
• Gadget Server
• Social Data Server
Shindig Architecture
23www.exoplatform.com
Copyright 2011 eXo Platform
Shindig Architecture (Components)
24www.exoplatform.com
Copyright 2011 eXo Platform
Shindig Architecture (Server Comps)
- _Servlets are entry points to take calls from client side.
25www.exoplatform.com
Copyright 2011 eXo Platform
Shindig Architecture (How It Works?)
Req TYPE
FETCH_PEOPLE : Get Person data
FETCH_PERSON_APP_DATA : Get the data attributes for a person
UPDATE_PERSON_APP_DATA : update attributes of a person
FETCH_ACTIVITIES : Get List of activities for a Particular Person
CREATE_ACTIVITY : create Activity associated with a Person
26www.exoplatform.com
Copyright 2011 eXo Platform
• Shindig Client and Server Components
• Gadget Server
• Social Data Server
Shindig Architecture
27www.exoplatform.com
Copyright 2011 eXo Platform
Gadget Server
- Gadget Container JavaScript: JavaScript for general gadget functionality.
- Gadget Rendering Server: to render the gadget XML into HTML.
Gadget
GadgetServer
SocialData Server
HTML
28www.exoplatform.com
Copyright 2011 eXo Platform
Gadget Rendering in Flow
29www.exoplatform.com
Copyright 2011 eXo Platform
• Shindig Client and Server Components
• Gadget Server
• Social Data Server
Shindig Architecture
30www.exoplatform.com
Copyright 2011 eXo Platform
Social Data Server
People
Relationships
Activities
31www.exoplatform.com
Copyright 2011 eXo Platform
Social Data Server
- OpenSocial Container JavaScript: JavaScript environment that provides
OpenSocial specific functionality (Profiles, Relationships, Activities).
- OpenSocial Data Server: with extension points so others can connect it to their own backends.
Gadget
GadgetServer
SocialData Server
JSON
32www.exoplatform.com
Copyright 2011 eXo Platform
Social Data Server
http://rollerweblogger.org/roller/entry/shindig_java_internals_diagram_updated
33www.exoplatform.com
Copyright 2011 eXo Platform
Social Data Server
www.exoplatform.com
Copyright 2011 eXo Platform
Shindig Integration
35www.exoplatform.com
Copyright 2011 eXo Platform
Utilize existing Open Source container code.
Wants Gadgets Wants Social features: Profiles, Relationships, Activities
Integration. Why?
36www.exoplatform.com
Copyright 2011 eXo Platform
Integration. How?
- Shindig Implementation: Java, PHP …
- Gadget Server, Social Data Server
37www.exoplatform.com
Copyright 2011 eXo Platform
Integration
Render gadget
OpenSocial Container (Social Data Server)
38www.exoplatform.com
Copyright 2011 eXo Platform
• Customize sample comtainer (Gadget Container)
• Implement Interfaces – People, Friends, Activities (Social Server)
• Write Guice Modules (binding)
• Add mapping information to web.xml (servlets, filters, guices- modules … )
• Add more SecurityTokenDecoder, etc. (Enabling OAuth support)
Integration (SUMMARIZE)
39www.exoplatform.com
Copyright 2011 eXo Platform
• Customize sample comtainer (Gadget Container)
• Implement Interfaces – People, Friends, Activities (Social Server)
• Write Guice Modules (binding)
• Add mapping information to web.xml (servlets, filters, guices- modules … )
• Add more SecurityTokenDecoder, etc. (Enabling OAuth support)
Integration
40www.exoplatform.com
Copyright 2011 eXo Platform
• Customize sample comtainer (Gadget Container)
• Implement Interfaces – People, Friends, Activities (Social Server)
• Write Guice Modules (binding)
• Add mapping information to web.xml (servlets, filters, guices- modules … )
• Add more SecurityTokenDecoder, etc. (Enabling OAuth support)
Integration
41www.exoplatform.com
Copyright 2011 eXo Platform
- People Service public class ExoPeopleService extends ExoService implements PersonService, AppDataService {
public Future<RestfulCollection<Person>> getPeople(...) {}
public Future<Person> getPerson(...) {}
}
- Activitiy Service public class ExoActivityService extends ExoService implements ActivityService {
public Future<RestfulCollection<Activity>> getActivities(...) {}
public Future<Void> createActivity(...) {}
}
Copyright 2010 eXo Platform SAS
Integration (Implement Interfaces)
42www.exoplatform.com
Copyright 2011 eXo Platform
• Customize sample comtainer (Gadget Container)
• Implement Interfaces – People, Friends, Activities (Social Server)
• Write Guice Modules (binding)
• Add mapping information to web.xml (servlets, filters, guices- modules … )
• Add more SecurityTokenDecoder, etc. (Enabling OAuth support)
Integration
43www.exoplatform.com
Copyright 2011 eXo Platform
public class ExoSocialApiGuiceModule extends AbstractModule {
@Override
protected void configure() {
bind(PersonService.class).to(ExoPeopleService.class);
bind(AppDataService.class).to(ExoPeopleService.class);
bind(ActivityService.class).to(ExoActivityService.class);
bind(Person.class).to(ExoPersonImpl.class);
}
}
Copyright 2010 eXo Platform SAS
Integreation (Guice Module)
44www.exoplatform.com
Copyright 2011 eXo Platform
• Customize sample comtainer (Gadget Container)
• Implement Interfaces – People, Friends, Activities (Social Server)
• Write Guice Modules (binding)
• Add mapping information to web.xml (servlets, filters, guices- modules … )
• Add more SecurityTokenDecoder, etc. (Enabling OAuth support)
Integration
45www.exoplatform.com
Copyright 2011 eXo Platform
webapp/opensocial/src/main/webapp/WEB-INF/web.xml
<context-param>
<param-name>guice-modules</param-name>
<param-value>
org.exoplatform.social.opensocial.ExoSocialApiGuiceModule
</param-value>
</context-param>
Copyright 2010 eXo Platform SAS
Integration (Config in Web.xml)
www.exoplatform.com
Copyright 2011 eXo Platform
Re-Cap
47www.exoplatform.com
Copyright 2011 eXo Platform
- OpenSource implementation of OpenSocial & Gadgets standard (Java, PHP)
- Client and Server side (Container, REST, OpenSocial APIs …)
- Java version: Servlet stack
- Multiple entry points for various kinds of calls (servlets)
- Others: Image Resizer, Content Rewriter/Compressor ...
Copyright 2010 eXo Platform SAS
Re-Cap
48www.exoplatform.com
Copyright 2011 eXo Platform
Copyright 2010 eXo Platform SAS
Why not?
49www.exoplatform.com
Copyright 2011 eXo Platform
Home Page: http://shindig.apache.org/
Downloads: http://shindig.apache.org/download/index.html
Mailing Lists: http://shindig.apache.org/mail-lists.html
Source Code: http://svn.apache.org/repos/asf/shindig/
Issue Tracking: https://issues.apache.org/jira/browse/SHINDIG
Wiki: http://cwiki.apache.org/confluence/display/SHINDIG/
Copyright 2010 eXo Platform SAS
Resources
www.exoplatform.com
Copyright 2011 eXo Platform
Thank you!
top related