Coral CDN filter ver. 1.1

This is a Java servlet filter (as per Servlet API 2.3). This filter lets you deploy Coral CDN (content distribution network) in your web applications. Coral is a free peer-to-peer content distribution network, comprised of a world-wide network of web proxies and nameservers. It allows a user to run a web site that offers high performance and meets huge demand.
Publishing through CoralCDN is as simple as appending a short string to the hostname of objects' URLs; a peer-to-peer DNS layer transparently redirects browsers to participating caching proxies, which in turn cooperate to minimize load on the source web server. Sites that run Coral automatically replicate content as a side effect of users accessing it, improving its availability. Using modern peer-to-peer indexing techniques, CoralCDN will efficiently find a cached object if it exists anywhere in the network, requiring that it use the origin server only to initially fetch the object once.

How to use it:

a) download coralflt.jar and save it in WEB-INF/lib

b) describe this filter in your web.xml file.
 


<filter>
  <filter-name>CoralFilter</filter-name>
  <filter-class>com.cj.coral.CoralFilter</filter-class>
</filter>

d) describe a mapping for this filter in your web.xml. E.g.:
 


<filter-mapping>
  <filter-name>CoralFilter</filter-name>
  <url-pattern>/download/*</url-pattern>
</filter-mapping>

in this example filter will be on for the each file in /download subdirectory

And now when some file from /download is requested the original request will be redirected to Coral CDN cache. For the requests back from the Coral as well for the failed requests your file will be processed as is.

   For downloading:

    Coral redirect package:  coralflt.jar
 

 ©  Coldbeans     Comments?

See also JSOS - the largest collection of servlets and filters.

Also in JSOS: