Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(135)

Issue 14063: Data Pipelining rewriter (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
17 years ago by awiner
Modified:
16 years, 6 months ago
Reviewers:
louiscryan
CC:
shindig-dev_incubator.apache.org
Base URL:
http://svn.apache.org/repos/asf/incubator/shindig/trunk/
Visibility:
Public.

Description

ContentRewriter that executes <script type="text/os-data"> blocks and replaces them with inline content that sets the DataContext. To use: - Add the PipelineDataContentRewriter to the List<ContentRewriter>, at a minimum before the sanitizing content rewriter - Bind GadgetHtmlParser to SocialMarkupHtmlParser

Patch Set 1 #

Patch Set 2 : Fixed fileset in patch, added some comments #

Patch Set 3 : Added support for interdependent batches, only deleting successfully processed scripts #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+880 lines, -151 lines) Patch
java/common/src/main/java/org/apache/shindig/expressions/RootELResolver.java View 6 chunks +6 lines, -11 lines 0 comments Download
java/common/src/test/java/org/apache/shindig/expressions/ExpressionsTest.java View 2 chunks +29 lines, -2 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java View 5 chunks +89 lines, -47 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/SocialMarkupHtmlParser.java View 1 1 chunk +110 lines, -0 lines 6 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/preload/ConcurrentPreloaderService.java View 1 chunk +4 lines, -0 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/preload/PipelinedDataPreloader.java View 1 2 5 chunks +35 lines, -21 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/preload/PreloaderService.java View 2 chunks +8 lines, -0 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/PipelineDataContentRewriter.java View 1 2 1 chunk +217 lines, -0 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/PipelinedData.java View 3 chunks +117 lines, -32 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/render/HtmlRendererTest.java View 2 chunks +6 lines, -0 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/PipelineDataContentRewriterTest.java View 1 2 1 chunk +169 lines, -0 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/PipelinedDataTest.java View 11 chunks +81 lines, -31 lines 2 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ViewTest.java View 2 chunks +9 lines, -7 lines 0 comments Download

Messages

Total messages: 4
awiner
Added support for interdependent batches, only deleting successfully processed scripts
17 years ago (2009-02-10 00:13:26 UTC) #1
awiner
The data pipelining rewriter has a couple of new improvements: - support for multiple batches, ...
17 years ago (2009-02-10 00:17:57 UTC) #2
louiscryan
Looks good to me. Minor points http://codereview.appspot.com/14063/diff/3001/33 File java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/SocialMarkupHtmlParser.java (right): http://codereview.appspot.com/14063/diff/3001/33#newcode59 Line 59: private class ...
17 years ago (2009-02-11 02:27:59 UTC) #3
awiner
17 years ago (2009-02-11 19:11:45 UTC) #4
Thanks for the comments.

http://codereview.appspot.com/14063/diff/3001/33
File
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/SocialMarkupHtmlParser.java
(right):

http://codereview.appspot.com/14063/diff/3001/33#newcode59
Line 59: private class MarkupDocumentHandler extends DocumentHandler {
On 2009/02/11 02:27:59, louiscryan wrote:
> rename to SocialMarkupDocumentHander?

Done.

http://codereview.appspot.com/14063/diff/3001/33#newcode86
Line 86: scanner.evaluateInputSource(scriptSource);
On 2009/02/11 02:27:59, louiscryan wrote:
> Its pretty cool that the scanner supports nested input sources :)

Enormously so.

http://codereview.appspot.com/14063/diff/3001/33#newcode103
Line 103: scriptContent = new StringBuilder();
On 2009/02/11 02:27:59, louiscryan wrote:
> a little wasteful, how about using a boolean to represent the state and just
> clearing on completion. If builder gets large thats alot of alloc.

Done.

http://codereview.appspot.com/14063/diff/3001/27
File
java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/PipelinedDataTest.java
(right):

http://codereview.appspot.com/14063/diff/3001/27#newcode231
Line 231: public void testBatching() throws Exception {
On 2009/02/11 02:27:59, louiscryan wrote:
> consider making this test cover a little more ground..
> more than one round of batching, an entry with no dependents, a dependency
bound
> into the initial context.

Wrote a couple more tests - one with two batches (including an initial
dependency), one with a missing dependency so no batches can run.  Also verified
that os-data sections were deleted (or not, depending on the test).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b