some questions about diffable

6 views
Skip to first unread message

gongxun ji

unread,
Aug 14, 2010, 2:40:29 AM8/14/10
to Diffable
Hi:
thanks for developing the diffable. i am so interest in it. my
English is not so good, so sorry.
i got some questions about diffable.
the first question is diffable need comfig the web.xml like
this:

<servlet>
<description>
Serves managed diffable resources.
</description>
<servlet-name>DiffableServlet</servlet-name>

<servlet-class>
com.google.diffable.servlets.DiffableServlet
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>DiffableServlet</servlet-name>
<url-pattern>/diffable/*</url-pattern>
</servlet-mapping>

but if i use struts2, how i can i config the struts2 servlet-
mapping. or the diffable is not conflict with struts2?

the second is the diffable only cache the javascript, css? or
include the jsp, html. what's differet between diffable or oscache.

oscache can cache the whole jsp or the fragment of page.

the third is how can i debug. i want to watch the delta in
different page and different request. like write the delta out in
console.

good job, best wishes!

gongxun ji

unread,
Aug 14, 2010, 2:41:03 AM8/14/10
to Diffable
1.) With the struts2 action servlet, you have two options: a.) Exclude
the diffable servlet url. b.) Map the struts action servlet to
something other than the default URL pattern /*.

2.) Diffable currently only caches JS, although plans are in the works
to have it cache CSS and HTML. I haven't thought too deeply about
using it for dynamic HTML, such as JSP, and this functionality is
currently not implemented. I have never used OSCache and am not very
familiar with how it works. But it looks like the main difference is
where the caching happens. OSCache caches server responses on the
server. The responses still have to be sent to the client in their
entirety, albiet the response itself is generated faster. Diffable
caches resources on the client, preventing the entire response from
having to be sent. From what I can tell, they could be used together.

3.) As for debugging, you can use Firebug or Chrome developer tools to
see the diff as it's sent to the client. The diff resources are also
stored locally in the ResourceStore.

I hope this helps. In the future, it would be better to post
questions to https://groups.google.com/group/diffable so that everyone
can benefit. Thanks again for your interest and please let me know if
you have any more questions!

Joshua
Reply all
Reply to author
Forward
0 new messages