advertisement

Shindig Architectural Overview Nov 2008

0 %
100 %
advertisement
Information about Shindig Architectural Overview Nov 2008
Technology

Published on November 24, 2008

Author: rajdeep

Source: slideshare.net

Description

Apache Shindig Java Architectural Overview
advertisement

Shindig Architectural Overview Rajdeep Dua Google Developer Relations Nov ,2008. 1

Agenda •  Shindig Client and Server Components •  Javascript Client libraries and various containers   OpenSocial Container   Java script Container •  GET FRIENDS – Client side Collaboration •  GET FRIENDS - Server side Collaboration Google Confidential and Proprietary 2

Shindig •  Apache Incubator Project •  Available in both Java and PHP Version •  Java version based on Servlet stack •  JSON backend in the reference implementation Google Confidential and Proprietary

Shindig Client side • Gadget Container – gadgets.js • OpenSocial Container • Restful Container – Part of OpenSocial 0.8 feature Google Confidential and Proprietary 4

Shindig : Client Server Flow Shindig Javascript Client Gadgets.io Shindig Server opensocial.Container: FunctionObject URL Parser and Mapper XmlHttpRequest extends HTTP Service Open Handler1 Social RestfulContainer: calls Handler2 Gadget FunctionObject Handler3 JsonRpcContainer: FunctionObject calls GadgetsContainer: FunctionObject Any HTTP Client Google Confidential and Proprietary 5

Shindig Component Architecture HTTP Server Servlet Engine Gadget Renderer ConcatProxy Servlet Servlet DataService MakeRequest JsonRpcServlet Proxy Servlet Rpc Servlet Servlet Js Servlet Servlet Gadget Open Renderer Open Social Social Open Social Sample Server BeanJson BeanXml DataHandler Convertor Container Side Convertor implements
 Object People s Gadget Service PersonHandler Server Activities JsonDB Service OpenSocial Activities Gadget Spec Service Handler Data Service AppData Handler Gadget Features State Gadget.xml File and jsLibraries Google Confidential and Proprietary 6

Component Architecture – Client side Gadget Container Gadgets : Object gadgets.Container gadgets.Extensible • gadgets.GadgetService() Function Object setDependencies() • gadgets.DefaultUserPrefStore() Gadgets_ • gadgets.LayoutManager() ParentUrl_ • gadgets.Gadget() View_ • gadgets.Container() gadgetClass gadgets.IfrContainer gadgetService •  renderGadget() gadgets.GadgetService gadgets.Gadget gadgets.LayoutManager Function Object Function Object Function Object _userPrefs call inherits gadgets.UserPrefStore call inherits Function Object gadgets.IfrGadgetService inherits gadgets.StaticLayoutManager inherits call call gadgets.DefaultUserPrefStore gadgets.IfrGadget Google Confidential and Proprietary 7

OpenSocial client side container 1 opensocial.BodyType opensocial.Container: FunctionObject 0 0 0 opensocial.Person • container_ n 0 • getEnvironment() 0 0 0 opensocial.Activity • requestSendMessage(…) • requestShareApp(..) n • requestCreateActivity(..) opensocial.Email • newFetchPersonRequest(..) n • newFetchPeopleRequest(..) opensocial.Phone opensocial.Url 1 opensocial.enum.Smoker 1 opensocial.enum.Drinker 1 opensocial.enum.Presence Google Confidential and Proprietary 8

Server Side Component Architecture Servlet Class Diagram Google Confidential and Proprietary 9

OpenSocial Client Side Flow List of Friends 1.  Create Request Object 2.  Populate Request Parameters 3.  Send the Request Google Confidential and Proprietary 10

OpenSocial JS APIs – Collaboration Diagram List of Friends Step 1 opensocial.Container.container makeIdSpec( newDataRequest() _ : JsonRpcContainer 7 1 “VIEWER”) 7.1 new 8 Gadget Javascript 2 translate newFetchPerson opensocial.IdSpec 6 IdSpec() Request(“VIEWER”, new ProfileDetails) JsonRpcRequest 9 new 4 newFetchPersonRequest() opensocial.DataRequest 3 quot;/people/@viewer/@self? fields=id, name, thumbnailUrl& RequestObject_=[] startIndex=0 5 &count=20& orderBy=topFriends& addDefaultProfileFields({}) filterBy=allquot; (to RequestObject_) var

req
=
opensocial.newDataRequest();
 req.add(
req.newFetchPersonRequest(
opensocial.DataRequest.PersonId.VIEWER
)
,
'viewer'); Google Confidential and Proprietary 11

OpenSocial JS APIs – Collaboration Diagram List of Friends Step 2 new RestFulRequestItem opensocial.Container.container (X, “GET”,..) _ :JsonRpcContainer 7.1 Gadget Javascript opensocial.IdSpec newFetchPeopleRequest(…) 14 /people/@viewer/@friends 13 userid =VIEWER groupID =FRIENDS JsonRpcRequest 10 opensocial.DataRequest newFetchPeopleRequest( “VIEWER_FRIENDS”, undefined) 11 12 X =quot;/people/@viewer/@ friends? fields=id, name, thumbnailUrl& newFetchPeopleRequest( translateIdSpec(..) startIndex=0&count=20&orderBy=topFriends & {userId=“VIEWER”, userId : VIEWER filterBy=allquot; groupId= ”FRIENDS”}) groupId: FRIENDS req.add(
req.newFetchPeopleRequest
(
opensocial.DataRequest.Group.VIEWER_FRIENDS
),
 'viewerFriends');
 Google Confidential and Proprietary 12

OpenSocial JS APIs – Collaboration Diagram : GET Request Object RequestObject_=[] Key Object viewer { method = “GET”, url = quot;/people/@viewer/@self? fields=id, name, thumbnailUrl& startIndex=0&count=20& orderBy= topFriends & filterBy=allquot; } viewerFriends { method = “GET”, url = quot;/people/@viewer/@friends? fields=id, name, thumbnailUrl& startIndex=0&count=20& orderBy= topFriends & filterBy=allquot; } Google Confidential and Proprietary 13

OpenSocial JS APIs – Collaboration Diagram Step 3 makeNonProxiedRequest( relativeUrl, callback , .., “application/ json ” ) 16 opensocial.Container.container gadgets.io _ : JsonRpcContainer 17 7.1 makeXhrRequest(…) 18 Gadget Javascript sendRequest( opensocial.IdSpec new 16 14 RequestObject_, 13 <callback> ) JsonRpcRequest XMLHttpRequest 10 opensocial.DataRequest 19 20 12 11 send(<callback>) Open(…) send(…) 15 relativeURL =quot;/social/rest/jsonBatch?st=john.doe%3Ajohn.doe%3A7303%3Ashindig%3Ahttp%253A//hosting.gmodules.com/ig/gadgets/file/ 104769461040349626058/list_of_friends.xml%3A0quot; quot; req.send(
onLoadFriends
)
;
 Google Confidential and Proprietary 14

OpenSocial – Server Side flow •  List of Friends when it reaches the Server. It is a 4 Step Process 1.  Call JsonRpcServletGet the Converter 2.  Get the Appropriate Handler 3.  Get the JSON Object from the DB 4.  Populate Responses into a List 5.  Stringify and return to the client Google Confidential and Proprietary 15

List My Friends – Server Side Call fro m the ! Step 1 : JsonRpcServlet’s doPost() l APIS! O penSocia Servlet
Container
 RpcRequestItem
 dispatchBatch()
 new
RpcRequestItem(..)
 H b.i.a O b
 doPost(..)
 T b.i
 S a
 T GET
 P G Service(..)
 a b.ii JsonRpcServlet
 S d handleRequestItem(…)
 e g r e v t e r Google Confidential and Proprietary 16

List My Friends – Server Side C all fro m the ! APIS! Step 2 :Get the People Handler Op e nSocial Servlet
Container
 RpcRequestItem
 H doPost(..)
 b.i.a
 O b
 T b.i
 S a
 getHandler(..)
 T GET
 P G Service(..)
 b.ii.a HandlerDispatcher
 a b.ii JsonRpcServlet
 S b.ii.b d e handleRequestItem(…)
 PeopleHandler
 g r e v t e r Google Confidential and Proprietary 17

List My Friends – Server Side C all fro m the ! APIS! Step 3 : Get the data from DB Op e nSocial Servlet
Container
 RpcRequestItem
 H doPost(..)
 b.i.a
 O b
 T b.i
 S a
 T GET
 P G Service(..)
 b.ii.a
 HandlerDispatcher
 a b.ii JsonRpcServlet
 S b.ii.b
 d e handleRequestItem(…)
 PeopleHandler
 g r e v b.ii.b.1
 t e b.ii.b.1b
 getAllPeople()
 getPeople(..)
 r BasicPeopleService
 db:JsonObject
 b.ii.b.1a
 getFriendIds.(.)
 18 CASE:
FRIENDS
 Google Confidential and Proprietary 18

List My Friends – Server Side C all fro m the ! APIS! Step 4 :Populate List of Responses Op e nSocial Servlet
Container
 RpcRequestItem
 H doPost(..)
 b.i.a
 O b
 T b.i
 S a
 T GET
 P G Service(..)
 b.ii.a
 HandlerDispatcher
 a b.ii JsonRpcServlet
 S b.ii.b
 d e PeopleHandler
 g handleRequestItem(…)
 r e v b.ii.b.1
 t List<responses>
 b.ii.b.1b
 e r BasicPeopleService
 db:JsonObject
 b.ii.b.1a
 19 Google Confidential and Proprietary 19

List My Friends – Server Side C all fro m the ! APIS! Step 5 :Send the response Op e nSocial Servlet
Container
 RpcRequestItem
 H doPost(..)
 b.i.a
 O b
 T b.i
 S a
 T GET
 P G Service(..)
 b.ii.a
 HandlerDispatcher
 a b.ii JsonRpcServlet
 S b.ii.b
 d c
 e PeopleHandler
 g handleRequestItem(…)
 r e v b.ii.b.1
 t List<responses>
 b.ii.b.1b
 e r BasicPeopleService
 db:JsonObject
 b.ii.b.1a
 20 Google Confidential and Proprietary 20

OpenSocial – Server Side flow in case a REST Call •  List of Friends when it reaches the Server. It is a 5 Step Process 1.  Call DataServiceServlet 2.  Get the appropriate converter 3.  Get the handler 4.  Get the JSON Object from the DB 5.  Stringify and return to the client Call fro m the ! REST client! Google Confidential and Proprietary 21

the ! Call fro m ! List My Friends – Server Side REST cli ent Step 1 : DataServiceServlet doPost() URL
:
hUp://localhost:8080/social/rest/people/john.doe/@friends?st=a:a:a:a:a:a
 DataServiceServlet
 Servlet
Container
 Fetcher
 fetch(req)
 token
 new
BaseSecurityToken(..)
 b.i.a.1 b.i.a.2 BasicSecurity
 createToken()
 BaseSecurityToken
 TokenDecoder
 getSecuriyToken()
 b.i.a R H T doPost(..)
 b.i E S T T GET
 P Service(..)
 b.ii DataServiceServlet
 C S getConvertorforRequest(req)
 L e I r E v handleSingleRequest(req,
res,
token,
conv)
 N e b.iii T r Google Confidential and Proprietary 22

List My Friends – Server Side the ! Call fro m ! ent Step 2 :Get the Converter REST cli URL
:
hUp://localhost:8080/social/rest/people/john.doe/@friends?st=a:a:a:a:a:a
 DataServiceServlet
 Servlet
Container
 Fetcher
 b.i.a.1
 b.i.a.2
 BasicSecurity
 TokenDecoder
 BaseSecurityToken
 b.i.a
 getParameter(“param”)
 R H T doPost(..)
 b.i
 servletRequest
 E T b.ii.a
 S T GET
 P null
 Service(..)
 BeanJson
 b.ii.b
 DataServiceServlet
 Converter
 C S b.ii
 L e I r getConvertorforRequest(req)
 E v handleSingleRequest(req,
res,
token,
conv)
 N e b.iii T r Google Confidential and Proprietary 23

List My Friends – Server Side the ! Call fro m ! Step 3 :Get the Handler REST cli ent URL
:
hUp://localhost:8080/social/rest/people/john.doe/@friends?st=a:a:a:a:a:a
 DataServiceServlet
 Fetcher
 handleGet
in
PeopleHandler
 supports

 Servlet
Container
 b.i.a.1
 following
PaUerns b.i.a.2
 • /people/john.doe/@all • /people/john.doe/@friends BasicSecurity
 • /people/john.doe/@self
 TokenDecoder
 BaseSecurityToken
 getSecuriyToken()
 b.i.a
 R H T doPost(..)
 b.i
 servletRequest
 E T b.ii.a
 S T GET
 P null
 Service(..)
 BeanJson
 b.ii.b
 DataServiceServlet
 Converter
 C S b.ii
 L e I r getConvertorforRequest(
req)
 E v N e handleSingleRequest(
 b.iii.a
 getHUpMethodFromParameter(..)
 b.iii
 T r req,
res,
token,
conv)
 b.iii.b getHandler(“PeopleHandler”)
 RequestItem
 b.iii.c.2
 InjectorImpl
 handleRequestItem(..)
 b.iii.c
 b.iii.c.2.1
 b.iii.c.3
 PersonHandler
 getRouteFromParameter(“..”)
 b.iii.c.1
 handleItem(request)
 Google Confidential and Proprietary 24

List My Friends – Server Side the ! Call fro m ! Step 4 :Get the Data from DB ent REST cli URL
:
hUp://localhost:8080/social/rest/people/john.doe/@friends?st=a:a:a:a:a:a
 DataServiceServlet
 Fetcher
 b.i.a.1
 Servlet
Container
 b.i.a.2
 BasicSecurity
 getSecuriyToken()
 TokenDecoder
 BaseSecurityToken
 R H b.i.a
 T doPost(..)
 b.i servletRequest
 E T b.ii.a
 S T GET
 P Service(..)
 BeanJson
 b.ii.b
 DataServiceServlet
 Converter
 C S b.ii L e I r b.iii.a
 E v e b.iii.b
 N handleSingleRequest(
 b.iii RequestItem
 T r req,
res,
token,
conv)
 b.iii.c.2
 InjectorImpl
 handleRequestItem(..)
 b.iii.c b.iii.c.2.1
 b.iii.c.3
 PersonHandler
 b.iii.c.1
 b.iii.c.3.2
 handleGet
in
PeopleHandler
 supports

 b.iii.c.3.2b
 getPeople(..)
 getAllPeople()
 following
PaUerns • /people/john.doe/@all BasicPeopleService
 db:JsonObject
 • /people/john.doe/@friends getFriendIds.(.)
 • /people/john.doe/@self
 b.iii.c.3.2a
 CASE:
FRIENDS
 25 Google Confidential and Proprietary

the ! List My Friends – Server Side Call fro m ! ent REST cli Step 5 :Convert to JSON String and Return URL
:
hUp://localhost:8080/social/rest/people/john.doe/@friends?st=a:a:a:a:a:a
 DataServiceServlet
 Fetcher
 b.i.a.1
 Servlet
Container
 b.i.a.2
 BasicSecurity
 getSecuriyToken()
 TokenDecoder
 BaseSecurityToken
 R H b.i.a
 b doPost(..)
 E a GET
 T b.i servletRequest
 T b.ii.a
 S Service(..)
 T P BeanJson
 b.ii.b
 c DataServiceServlet
 Converter
 C S b.ii L e convertToString
 (ResaulCollecbon<Person>)
 I r b.iii.a
 E v b.iii.c.3.3
 e b.iii.b
 N handleSingleRequest(
 b.iii RequestItem
 T r req,
res,
token,
conv)
 b.iii.c.2
 InjectorImpl
 handleRequestItem(..)
 b.iii.c b.iii.c.2.1
 b.iii.c.3
 PersonHandler
 b.iii.c.1
 b.iii.c.3.2
 handleGet
in
PeopleHandler
 supports

 b.iii.c.3.2b
 getPeople(..)
 following
PaUerns • /people/john.doe/@all BasicPeopleService
 db:JsonObject
 • /people/john.doe/@friends • /people/john.doe/@self
 b.iii.c.3.2a
 26 Google Confidential and Proprietary

Re-Cap •  Shindig is implemented in 2 languages ( Java, PHP, Others soon) •  Java version on top of Servlet stack •  Multiple entry points for various “kinds” of calls •  Client Side architecture - containers – Gadget and OpenSocial •  Handlers and Converters take care of call semantics •  REST and Json RPC calls share infrastructure in the backend Google Confidential and Proprietary 27

Summary •  Shindig built on premise of reusability without major modifications •  It’s a moving target which is tending towards stable code base as we close in on 0.8 spec •  Its Open source and “you” are encouraged to take up features and implement them Google Confidential and Proprietary 28

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Index - Apache Shindig - Apache Software Foundation

Nov. 2008 . Apache Shindig Pushes Social Envelope. Article Alley . ... June 2008 . Architectural Overview of Shindig , an OpenSocial Reference Implementation.
Read more

Development Resources - Gadgets - Atlassian Developer ...

Development Resources. ... Shindig Architecture Articles; Shindig Architectural Overview Nov 2008; Shindig Architecture: ...
Read more

Logon and Authentication: Windows Server 2008 R2 and ...

Windows Logon and Authentication Technical Overview. ... architecture for Windows Server 2008 R2 and ... Windows Server 2008 R2 and ...
Read more

Download Windows Server 2008 Clustering Whitepapers from ...

Various Whitepapers and Datasheets overviewing Windows Server 2008 Clustering. ... Windows Server 2008 Failover Clustering Architecture Overview.doc. 83 KB ...
Read more

Technical Brief - Visual Computing Leadership from NVIDIA

Technical Brief . NVIDIA GeForce ® GTX 200 GPU Architectural Overview . ... GeForce GTX 280 GPU Graphics Processing Architecture 10 May, 2008 ...
Read more

Agile Architecture Method - J.D. Meier's Blog - Site Home ...

5 Nov 2008 11:31 PM ... Our Agile Architecture Method is an iterative ... The application overview serves to make your architecture ...
Read more

Download SQL Server 2008 R2 Books Online from Official ...

... and who upgrade to and subsequently uninstall SQL Server 2008 R2 Books Online and reinstall SQL Server 2008 Books Online may experience minor issues, ...
Read more

Remote Desktop Services: Planning and Architecture

Use these resources to help you plan your deployment of Remote Desktop Services in Windows Server 2008 R2. ... Architectural Overview;
Read more

Androidology - Part 1 of 3 - Architecture Overview - YouTube

Part 1 of 3 in an overview series on the Android platform. ... Mike gives an overview of the system architecture. ... Uploaded on Nov 12, ...
Read more

Amended November 2008 Outline Plan of Work 2007

Amended November 2008 Outline Plan of Work 2007 Royal Institute of British Architects RIBA Work Stages Description of key tasks OGC Gateways Preparation A ...
Read more