Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / mcr-test / WWW / Doc / Reference / org.w3c.www.protocol.http.icp.ICPFilter.html
diff --git a/JMCR-Stable/mcr-test/WWW/Doc/Reference/org.w3c.www.protocol.http.icp.ICPFilter.html b/JMCR-Stable/mcr-test/WWW/Doc/Reference/org.w3c.www.protocol.http.icp.ICPFilter.html
new file mode 100644 (file)
index 0000000..9a8278f
--- /dev/null
@@ -0,0 +1,214 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+\r
+<HTML>\r
+<HEAD>\r
+  <TITLE>ICPFilter reference manual</TITLE>\r
+</HEAD>\r
+<BODY BGCOLOR="#FFFFFF">\r
+<P>\r
+<A HREF="../../../../WWW" TARGET="_top_"><IMG SRC="../../../Icons/WWW/w3c_home"\r
+    ALT="W3C" BORDER=0 HEIGHT=48 WIDTH=72></A>&nbsp;<A HREF="../../../Jigsaw"\r
+    TARGET="_top_"><IMG SRC="../../../Icons/jigsaw" ALT="Jigsaw" BORDER=0 HEIGHT=49\r
+    WIDTH=212></A><A HREF="../../../Jigsaw" TARGET="_top_">&nbsp;</A>&nbsp; \r
+  <hr noshade size="1">\r
+<H1>\r
+  ICP Filter\r
+</H1>\r
+<P>\r
+The ICP client side filter add support for the\r
+<A HREF="http://www.nlanr.net/Cache/ICP/">Internet Cache Protocol</A> to\r
+the <B>Jigsaw</B> HTTP client side implementation. This support can be used\r
+both by browsers (such as HotJava, <A HREF="../FAQ.html#client-hotjava">check\r
+the FAQ</A>), or by proxies (the typical case).\r
+<P>\r
+In brief, ICP allows several proxies to cooperate by exchanging informations\r
+about what they currently have in their local cache. <B>Jigsaw</B>'s ICP\r
+implementation should be compatible with other ICP capable proxies (such\r
+as <A HREF="http://squid.nlanr.net/Squid/">Squid</A>), even though it doesn't\r
+make use of all the features of the underlying protocol (in fact, it implements\r
+what can be implemented while still remaining compliant with the HTTP/1.1\r
+protocol specification).\r
+<P>\r
+<B>Warning</B>: <B>Jigsaw</B> doesn't come with the appropriate support for\r
+editing the ICP filter properties from the <TT>/Admin/Properties</TT> resource;\r
+this means that you will have to manually edit your <B>Jigsaw </B>configuration\r
+file in order to set the properties relevant to that filter. This file is\r
+usually named <TT>config/http-server.props</TT> if not, you probably know\r
+already what we are talking about.\r
+<H3>\r
+  <A NAME="rule-file"></A>ICP Configuration File\r
+</H3>\r
+<P>\r
+This filter uses a <A HREF="#w3c.www.protocol.http.icp.config">configuration\r
+file</A>, to know about the proxies it cooperates with. The syntax for this\r
+rule file is defined by the following BNF:\r
+<PRE>rule-file := *(rules)\r
+rules&nbsp;&nbsp;&nbsp;&nbsp; := (comment|host-description)\r
+comment&nbsp;&nbsp; := '#' &lt;chars up EOL&gt;\r
+host-description := host SPACES port spaces url EOL\r
+host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := &lt;valid Internet host name&gt;\r
+port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := &lt;valid UDP port number&gt;\r
+url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := &lt;URL locating the proxy to use for that host/port&gt;\r
+SPACES&nbsp;&nbsp;&nbsp; := *(' '|'\t')\r
+EOL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := '\r' | '\r\n' | '\n'\r
+</PRE>\r
+<P>\r
+A sample ICP configuration file looks like:\r
+<PRE># Sample ICP configuration file\r
+# -----------------------------\r
+# First neighbour:\r
+icp.host1.com 10345 http://icp.host1.com:8080/\r
+# Second neighbour:\r
+icp.host2.com 10345 http://icp.host2.com:8080/\r
+</PRE>\r
+<P>\r
+After parsing such a configuration file, the ICP filter, will register both\r
+hosts as <I>neighbours</I>. When a request comes in for some document, the\r
+filter sends a UDP packet to both hosts (it knows about their namee, and\r
+the port they are listening on through the first two fields of the configuration\r
+file). It then waits for some positive answer, if such an answer arrives,\r
+it finally looks it up (matching the UDP sender address with one of the above\r
+declared hosts), and use the appropriate URL as a proxy address.\r
+<P>\r
+To setup a nice cache hierarchy, one can use a conjunction of the\r
+<A HREF="org.w3c.www.protocol.http.proxy.ProxyDispatcher.html">ProxyDispatcher</A>\r
+filter, the\r
+<A HREF="org.w3c.www.protocol.http.cache.CacheFilter.html">CacheFilter</A>\r
+and the ICP filter. The starting point for setting up such a config, is to\r
+set the <A HREF="org.w3c.www.protocol.http.HttpManager.html">HttpManager</A>\r
+<A HREF="org.w3c.www.protocol.http.HttpManager.html#w3c.www.protocol.http.filters">filters</A>\r
+property to:\r
+<PRE>org.w3c.www.protocol.http.filters=org.w3c.www.protocol.http.proxy.ProxyDispatcher \\r
+&nbsp;&nbsp;&nbsp;&nbsp; |org.w3c.www.protocol.http.cache.CacheFilter \\r
+&nbsp;&nbsp;&nbsp;&nbsp; |org.w3c.www.protocol.http.icp.ICPFilter\r
+</PRE>\r
+<P>\r
+(the \ character indicates that the line is splitted for best reading, they\r
+should not appear in the property value - which should be written as a single\r
+line). Note that in this setting the order in which you declare the filters\r
+is indeed important.\r
+<P>\r
+  <hr noshade size="1">\r
+<H2>\r
+  Properties\r
+</H2>\r
+<P>\r
+The\r
+<A HREF="http://jigsaw.w3.org/Doc/Programmer/api/org/w3c/www/protocol/http/icp.ICPFilter.html">ICPFilter</A>\r
+defines the following properties:\r
+<UL>\r
+  <LI>\r
+    <A HREF="#w3c.www.protocol.http.icp.debug">org.w3c.www.protocol.http.icp.debug</A>\r
+  <LI>\r
+    <A HREF="#w3c.www.protocol.http.icp.config">org.w3c.www.protocol.http.icp.config</A>\r
+  <LI>\r
+    <A HREF="#w3c.www.protocol.http.icp.port">org.w3c.www.protocol.http.icp.port</A>\r
+  <LI>\r
+    <A HREF="#w3c.www.protocol.http.icp.timeout">org.w3c.www.protocol.http.icp.timeout</A>\r
+  <LI>\r
+    <A HREF="#w3c.www.protocol.http.icp.disable-cache">org.w3c.www.protocol.http.icp.disable-cache</A>\r
+</UL>\r
+<P>\r
+  <hr noshade size="1">\r
+<P>\r
+<A NAME="w3c.www.protocol.http.icp.debug"></A><TT>org.w3c.www.protocol.http.icp.debug</TT>\r
+<DL>\r
+  <DT>\r
+    <I>semantics</I>\r
+  <DD>\r
+    When set to <B>true</B>, this property will make the ICP filter emit some\r
+    (hopefully) interesting traces.\r
+  <DT>\r
+    <I>type</I>\r
+  <DD>\r
+    A boolean property.\r
+  <DT>\r
+    <I>default value</I>\r
+  <DD>\r
+    This property defaults to <B>false</B>.\r
+</DL>\r
+<P>\r
+  <hr noshade size="1">\r
+<P>\r
+<A NAME="w3c.www.protocol.http.icp.config"></A><TT>org.w3c.www.protocol.http.icp.config</TT>\r
+<DL>\r
+  <DT>\r
+    <I>semantics</I>\r
+  <DD>\r
+    The name of the <I><A HREF="#rule-file">rule file</A></I> for ICP\r
+  <DT>\r
+    <I>type</I>\r
+  <DD>\r
+    A File property (it's value should provide a path to an existing file)\r
+  <DT>\r
+    <I>default value</I>\r
+  <DD>\r
+    This property has no default value, and <B>must</B> be set for the ICP filter\r
+    to be activated.\r
+</DL>\r
+<P>\r
+  <hr noshade size="1">\r
+<P>\r
+<A NAME="w3c.www.protocol.http.icp.port"></A><TT>org.w3c.www.protocol.http.icp.port</TT>\r
+<DL>\r
+  <DT>\r
+    <I>semantics</I>\r
+  <DD>\r
+    The UDP port number that filter should use to communicate with cooperating\r
+    proxies. This port number is the one the filter will be listening at for\r
+    requests from other (cooperating proxies).\r
+  <DT>\r
+    <I>type</I>\r
+  <DD>\r
+    An integer property (it's value should be a valid UDP port number)\r
+  <DT>\r
+    <I>default value</I>\r
+  <DD>\r
+    This property has no default value and <B>must</B> be set for the ICP filter\r
+    to be activated.\r
+</DL>\r
+<P>\r
+  <hr noshade size="1">\r
+<P>\r
+<A NAME="w3c.www.protocol.http.icp.timeout"></A><TT>org.w3c.www.protocol.http.icp.timeout</TT>\r
+<DL>\r
+  <DT>\r
+    <I>semantics</I>\r
+  <DD>\r
+    The number of milliseconds the filter should wait for replies from cooperating\r
+    proxies, before estimating that none of them is available to answer its query.\r
+  <DT>\r
+    <I>type</I>\r
+  <DD>\r
+    An integer property (it's value should be a valid number of milliseconds)\r
+  <DT>\r
+    <I>default value</I>\r
+  <DD>\r
+    This property defaults to <B>500</B> ms.\r
+</DL>\r
+<P>\r
+  <hr noshade size="1">\r
+<P>\r
+<A NAME="w3c.www.protocol.http.icp.disable-cache"></A><TT>org.w3c.www.protocol.http.icp.disable-cache</TT>\r
+<DL>\r
+  <DT>\r
+    <I>semantics</I>\r
+  <DD>\r
+    Disable the caching of documents retreived through a neighbour proxy. If\r
+    you're making a set of <I>local</I> proxies cooperate, this flag will ensure\r
+    that no two close proxy will cache the same page.\r
+  <DT>\r
+    <I>type</I>\r
+  <DD>\r
+    A boolean property.\r
+  <DT>\r
+    <I>default value</I>\r
+  <DD>\r
+    This property defaults to <B>true</B>\r
+</DL>\r
+<P>\r
+  <hr noshade size="1">\r
+<P>\r
+<I><A HREF="mailto:jigsaw@w3.org">Jigsaw Team</A></I> <BR>\r
+$Id: org.w3c.www.protocol.http.icp.ICPFilter.html,v 1.1 2010/06/15 12:21:32 smhuang Exp $\r
+</BODY></HTML>\r