httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Issac Goldstand <mar...@beamartyr.net>
Subject Re: apache module or CGI
Date Mon, 26 Mar 2007 15:27:43 GMT
Almost.  It really can't tell the web client directly when it's done
(though you can do some fancy footwork with HTML and optionally
JavaScript to cause the client to poll the server - similar in concept
to the status meters at http://uploaddemo.beamartyr.net/ for file
uploads.  It's similar in concept to any other asynchronous processing
in programming.  Either have the client poll the server as mentioned
above, or notify the user some other way (email?) when the processing is
complete...  In any case, my assumption was that the images were being
sent to the server by the client.

If the images are already on the server, and needed for the response
immediately, you'd need to do it inline, but you could still make life
easier on yourself (somewhat) by caching the reduced images to avoid
reprocessing.

I could give more specific advice if you could share a bit more about
what you're trying to accomplish in general.

  Issac

Sam Carleton wrote:
> Interesting concept that I had not considered.  My 10+ years of
> software development have been in GUI development, not web, so more
> complex things such as you suggest will require a bit more explaining
> to me;)  First, though, I am using a reverse proxy server so that the
> downsizing only happens once, which works well with the PHP code.
> 
> Ok, this is what I am doing now:
> 
> 1: the html page with all the image links is returned the the browser
> 2: the browser requests all the images
> 3: the server processes the request and returns the image
> 
> It sound to me like you are suggesting that rather then #3, the server
> add the request to the queue and return a ???? (I don't know).  Once
> the server is done down sizing the image it some how tells the web
> browser it is done.  Correct?
> 
> Sam
> 
> On 3/26/07, Issac Goldstand <margol@beamartyr.net> wrote:
>> Are the resized images needed *immediately*?  Could you set up a
>> seperate process to downsize the images one at a time, and let
>> Apache/PHP/whomever just add the images to the queue?  That way, the
>> requests get processed much faster and you're also guaranteed not to
>> blow the server's resources with too many concurrent requests all
>> downsizing images at the same time.
>>
>>   Issac
>>
>> Sam Carleton wrote:
>> > I am working on a image kiosk system.  One of the things that needs to
>> > happen is downsizing images.  Initially this down sizing was happening
>> > in the GUI part of the program.  I have now modified things so that it
>> > is done real time by the PHP code.  The problem is that the downsizing
>> > is taking much longer in PHP then it did in the GUI (C#).  I am
>> > thumbnail images (up to 16MB source images) and creating web page
>> > style images ( 900x600).
>> >
>> > I am looking for options to speed things up.  My first thought is to
>> > keep it simple and write a CGI program in C++ (a language I know and
>> > love), but I am a little concerned about the startup cost of calling
>> > CGI.  When there are up to 100 different browsers hitting the server,
>> > will there be any big speed benefits to developing an apache module
>> > rather then CGI?  I do get the impression that there is quite a bit of
>> > framework code to write in doing apache modules, so I am also thinking
>> > that I might want to look at FastCGI.
>> >
>> > What is the best approach?  Oh, is FastCGI just an apache thing or
>> > will FastCGI programs work with other servers?
>> >
>> > Sam
>>
> 
> 

Mime
View raw message