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

Issue 1770043: Refactoring servlets to allow caching response

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 6 months ago by gagan.goku
Modified:
15 years, 5 months ago
Reviewers:
shindig.remailer, johnfargo, dev-remailer, anupama.dutta, satya3656, cool-shindig-committers, vikaas.arora, zhoresh
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src
Visibility:
Public.

Description

Refactoring servlets by adding additional methods: HttpRequest buildHttpRequest(HttpServletRequest request); HttpResponse processRequest(HttpRequest request); This results in added logical separation of common tasks performed by servlets (parsing and generating an http request, fetching the undelying resources, processing the request and convering http response to http servlet response to be sent to user. Also, this will allow us to cache responses served by these servlets more easily. Then we can add simple logic along the lines of: - If precached, serve out previously served response directly. - If not, generate the response for given request and then add to cache. This can be useful to at least servlets like MakeRequestServlet, ConcatServlet, AccelServlet etc.. Comments welcome. Created a jira issue for the same: https://issues.apache.org/jira/browse/SHINDIG-1381 PLEASE NOTE: This is a rough changelist. Its aim is to gather feedback on the suggested refactoring. It can be polished later if you feel the idea is good. So please focus on the API and interface changes in ProxyBase, AccelHandler, MakeRequestHandler and ProxyHandler.

Patch Set 1 #

Patch Set 2 : fixing accel servlet tests #

Patch Set 3 : fixing tests #

Patch Set 4 : fixing tests #

Total comments: 20

Patch Set 5 : addressing comments #

Patch Set 6 : fixing bad things #

Patch Set 7 : 'updating_patch_after_svn_up' #

Total comments: 8

Patch Set 8 : 'resolving_conflicts_after_merge' #

Patch Set 9 : 'more_refactoring' #

Patch Set 10 : 'more_refactoring' #

Patch Set 11 : 'more_refactoring' #

Total comments: 1

Messages

Total messages: 13
gagan.goku
15 years, 6 months ago (2010-07-11 20:09:40 UTC) #1
gagan.goku
fixing accel servlet tests
15 years, 6 months ago (2010-07-11 20:21:18 UTC) #2
gagan.goku
fixing tests
15 years, 6 months ago (2010-07-12 06:57:27 UTC) #3
vikaas.arora
http://codereview.appspot.com/1770043/diff/13001/14001 File main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java (left): http://codereview.appspot.com/1770043/diff/13001/14001#oldcode211 main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java:211: throws IOException { This method (and it's constituent method ...
15 years, 6 months ago (2010-07-14 06:10:24 UTC) #4
vikaas.arora
http://codereview.appspot.com/1770043/diff/13001/14005 File main/java/org/apache/shindig/gadgets/servlet/ProxyHandler.java (left): http://codereview.appspot.com/1770043/diff/13001/14005#oldcode89 main/java/org/apache/shindig/gadgets/servlet/ProxyHandler.java:89: } Shouldn't you retain this check as the first ...
15 years, 6 months ago (2010-07-14 06:22:11 UTC) #5
gagan.goku
addressing comments
15 years, 6 months ago (2010-07-14 14:59:49 UTC) #6
gagan.goku
http://codereview.appspot.com/1770043/diff/13001/14001 File main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java (left): http://codereview.appspot.com/1770043/diff/13001/14001#oldcode211 main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java:211: throws IOException { On 2010/07/14 06:10:25, vikaas.arora wrote: > ...
15 years, 6 months ago (2010-07-14 15:00:21 UTC) #7
gagan.goku
fixing bad things
15 years, 6 months ago (2010-07-14 15:32:52 UTC) #8
gagan.goku
PTAL. On Wed, Jul 14, 2010 at 9:02 PM, <gagan.goku@gmail.com> wrote: > fixing bad things ...
15 years, 6 months ago (2010-07-15 19:23:20 UTC) #9
anupama.dutta
Let us discuss this approach in more detail, try to break this into smaller patches ...
15 years, 5 months ago (2010-08-04 11:28:17 UTC) #10
satya3656
Few minor comments http://codereview.appspot.com/1770043/diff/78001/79008 File java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CachedResponseServletWrapper.java (right): http://codereview.appspot.com/1770043/diff/78001/79008#newcode3 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CachedResponseServletWrapper.java:3: * or more contributor license agreements. ...
15 years, 5 months ago (2010-08-14 11:04:15 UTC) #11
gagan.goku
http://codereview.appspot.com/1770043/diff/78001/79008 File java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CachedResponseServletWrapper.java (right): http://codereview.appspot.com/1770043/diff/78001/79008#newcode2 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CachedResponseServletWrapper.java:2: * Licensed to the Apache Software Foundation (ASF) under ...
15 years, 5 months ago (2010-08-16 04:32:56 UTC) #12
satya3656
15 years, 5 months ago (2010-08-16 11:20:16 UTC) #13
http://codereview.appspot.com/1770043/diff/90009/93006
File
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java
(right):

http://codereview.appspot.com/1770043/diff/90009/93006#newcode288
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java:288:
protected static String getParameter(HttpServletRequest request, String key,
String defaultValue) {
Is is possible to to remove this function?
Sign in to reply to this message.

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