httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Carleton" <scarle...@gmail.com>
Subject Re: [users@httpd] making script parameters look like folders
Date Thu, 15 Mar 2007 12:09:41 GMT
Nick,

Thank you for the reply.  Please allow me to give you a bit more info
about what exactly I am doing:

I am writing a kiosk software package that has a GUI app as the front
end for the operator to use and apache is serving up the pages to the
web browser clients.  The main things being served up right now are
images.  The images coming into the GUI app are full size images, 4
mega pixel on up.

Presently what happens is that after the images are copied to the
computer (the GUI), the GUI creates the two different web images, one
is a small thumbnail (120x180) the other is a larger image for the
screen (400x600).  When the operator is ingesting 200 to 500 images at
one time, it takes a while, too long in my opinion.  So I am looking
for other ways of doing things...

At the present time, because I have control of the whole machine,
apache does not have direct access to the web images.  The images are
all accessed through a handler that finds the correct web image based
on a set of parameters.

My whole though was to change this handler code to go to the original
image, down size it and send it to the browser.  I know that it is
possible to simply check for a thumbnail first, service that up if
present and if not save the generated thumbnail for the next request.
Of course the problem with this comes from the race condition,
primarily of when one request/instance of the script is saving the
thumbnail and another one is reading the file before the first is done
writing it.  There are solutions to this, but no matter which way you
cut it, there are race conditions that are never pretty to resolve,
so...

Thus I started thinking that I could leverage a HTTP reverse proxy to
cache the generated images for me.  The question I have now is:  What
do I need to do so that a proxy will see the images as static rather
than dynamic?

There are a couple more issues too.  The operator has the power to go
in and delete images, so index pages should not been seen as dynamic.
The operator is also able to go in and modify images, such as change
their orientation or crop them.  Is there any way to take this into
account so that things are updated correctly?

On 3/15/07, Nick Kew <nick@webthing.com> wrote:
> On Wed, 14 Mar 2007 23:27:05 -0400
> "Sam Carleton" <scarleton@gmail.com> wrote:
>
> > My final objective is this:  I am serving up images that the server is
> > creating dynamically, but I want a reverse proxy to THINK they are
> > static images.  I figure if I take this approach the proxy will assume
> > it is static, not dynamic.
>
> Proxies don't think, and if your proxy is HTTP-compliant, you're looking
> in the wrong place.  What matters isn't the URL and its parameters,
> but the HTTP headers that describe the contents returned by your server.
> (And, of course, those sent by a client, but that's out of your
> control).

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message