[Zoo-discuss] Caching

Gérald Fenoy gerald.fenoy at geolabs.fr
Tue Dec 18 00:06:13 PST 2012


Dear Farkas,
the work you made looks awesome, you may post your patch in a ticket in the ZOO-Project Trac system [1] to ask for integration into the SVN source tree. You will have to register to the Trac system first. This way others can test your work and confirm that everything is ok with it before integrating it into the source tree. I would really appreciate if you send your patch into the Trac system.

For the post request, by now ZOO-Kernel is not handling any caching mechanisms when data should be accessed through POST request so your proposal to add support for this is more than welcome. I think that you should take a look at the zoo_service_loader.c to see how POST requests are currently handled then modify the functions to use where you integrated your new idea for caching POST requests.

Hope this was clear enough, in other case please feel free to ask here any question you want. I wish that you may share your work with the community through the Trac system and enhance the POST request gesture as you planned.

Thanks a lot for your feedbacks and experiences sharing with the community.

Hope to hear from you,
Best regards

[1] http://zoo-project.org/trac/newticket

Gérald Fenoy
gerald.fenoy at geolabs.fr

Le 17 déc. 2012 à 18:31, Farkas H <farkas.dus at gmail.com> a écrit :

> Hi Gérald,
> 
> I do a little research on wps-caching.
> 
> Therefore I modified the kernel.
> (1) added a function to forward href requests through a http-proxy,
> (2) added the variable maxCachingTime; if the cache file is out of
> date the cache file is deleted and the data is retrieved from the
> origin server,
> (3) added a simple caching log with the following elements:
> date and time # elapsed time to get the data [milliseconds] # filesize
> [Bytes] # status [HIT | MISS | REFRESH_MISS | DIRECT] # url
> e.g.
> 17.12.2012 12:56:46 | 25 | 19245 | WFS_HIT |
> http://...&Typename=topp:tasmania_water_bodies
> 
> (4) added the section [caching] to main.cfg with the following variables:
> [caching]
> method = ...                   - WPS_IN: href:Wfs-Data |
> WPS_IN_AND_OUT: Wfs- und Wps-Data | PROXY: Proxy-Caching | NONE: no
> Caching
> maxCachingTime = [minutes]     - maximum age in minutes; if the file
> is out of date data is retrieved from the server
> cacheDir = [drive and path]    - caching directory
> logDir = [drive and path]      - log directory
> proxyCache = [IP-address:port] - Caching-Proxy (method = PROXY)
> 
> 
> Addionally I would like to add a functionality to cache http-Post
> requests and the corresponding results. If http-Post requests are
> identical available in the cache and the corresponding data is fresh
> the response data could be provided directly from the cache.
> 
> I would appreciate some hints if the following scenario could work.
> 
> 
> begin;
> ...
> some existing code;
> ...
> some new code;
> if (adjusted (no blanks, no cr, ...) http-Post request is in cache and
> the corresponding response is fresh) {
>  some new code;
>  ...
>  call some existing functions to provide the corresponding response
> in the requested kind;
>  end;
> }
> ...
> some existing code;
> ...
> end;
> 
> 
> Where should I integrate the new code?
> Hope to hear from you.
> 
> Regards,
> Farkas
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss



More information about the Zoo-discuss mailing list