-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3180/
-----------------------------------------------------------

(Updated 2011-12-23 21:20:36.791685)


Review request for shindig, Henry Saputra, Ryan Baxter, li xu, Jesse Ciancetta, 
and Stanton Sievers.


Changes
-------

New changes: 5 -> 6

* GadgetHolder is now instantiated with a site, instead of a siteId. 
GadgetSite.getId() and GadgetSite.getModuleId() are used by this class now.

* The response to a token refresh call now includes the moduleId and the 
token's TTL.  We (Jesse and I) plan to phase out the security tokens in 
MetadataRequests.  See below for more detail.

* You can now request that a new moduleId be generated for a gadget when asking 
for a new token by setting it's moduleId to a negative number and fetching a 
new token.  The response will come back with a moduleId you can save for 
persistence.  There is a corresponding new class in Java to override if you 
plan on persisting moduleIds.  It has 2 methods: validate and generate which 
are used to verify the validity of a moduleId, viewerId, gadgetUrl combination 
or to generate (and persist) a new moduleId for that combination.

I was talking with Jesse today and he had an idea that we could batch the 
metadata and security token requests into 1 request to remove the hard tie of 
having security tokens embedded in the metadata responses.  I think this is 
probably a good idea and he got a little proof of concept going.  I am hoping 
that he'll have time after the holidays to work on and post a patch (on top of 
this one) that, once reviewed I can include here.  

For gadgets that require no token, we can probably just return null for their 
tokens in the token request part of the batch.


Summary
-------

Initial review of 1st change.  Allowing common container to manage container 
token refreshes.  Also, refresh of gadget security tokens will now wait for 
valid container security token before trying to refresh.


Diffs (updated)
-----

  
http://svn.apache.org/repos/asf/shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.gadget/gadget_holder.js
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.gadget/gadget_site.js
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.util/util.js
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/service.js
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/container/gadget_holder_test.js
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetsHandler.java
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerApi.java
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerService.java
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ModuleIdManager.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ModuleIdManagerImpl.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerServiceTest.java
 1222407 
  
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerTest.java
 1222407 

Diff: https://reviews.apache.org/r/3180/diff


Testing
-------

Tested code in a private container with some examples of setting no refresh 
(ttl = 0) and setting an initial token (if it was written by jsp page to avoid 
transaction) etc..


Thanks,

Dan

Reply via email to