[Gimp-web] Static pages for m.g.o
Raphaël Quinet
quinet at gamers.org
Wed Sep 10 09:00:46 2003
On Tue, 9 Sep 2003 19:42:30 -0700, Helvetix Victorinox <helvetix@mysterious.org> wrote:
> On Tue, Sep 09, 2003 at 05:08:43PM +0200, Raphaël Quinet wrote:
> > Well, the part about the dependencies is simple. If you want, I can
> > do that part. I cannot see any obvious reason why including news.inc
> > would be different from including the other files, but maybe there are
> > hidden pitfalls in your script that I am not aware of.
>
> I was going to start this tonight, but now I'm lost. Sorry to be
> thick-headed, but what are you proposing?
No, I don't think you are thick-headed. I should have taken the time
to explain what I meant a bit more clearly. ;-)
> The reason why including news.inc is different from including the other
> files is because news.inc changes as you manipulate the news via the web
> interface. No other files have a web interface to change them.
> Please, go try http://mmmaybe.gimp.org/admin/news/news-index.cgi?news-cur=
rent
> please read http://mmmaybe.gimp.org/admin/news/howto-news.html
Yes, I had this in mind in the previous discussion.
> A) Are you proposing the creation of a Makefile to create and install
> the top level index.html from constituent pieces that you describe
> in the dependencies you mention ?
The current Makefile already does that: it builds index.html from
index.htrw. What is missing is the inclusion of the SSI files, like
for all other .htrw files. And the corresponding dependencies, as
mentioned previously. So the changes to enable the SSI preprocessing
on all .htrw files will solve this problem, without having to create a
new Makefile.
> B) Are you proposing to reinstall the site each time the news is updated
> from the web interface, and having the reinstall recreate the top-level
> index.html from all the included files as well as the file news.inc?
Yes, exactly. If you modify news.inc via the web interface, it should
trigger a "make && make install", in the same way as when any file is
updated via CVS. Unless anything else has changed on the site, this
will only rebuild one file (index.html) so this will not require a lot
of work from the machine. The build and install process could be
invoked directly from the news-index script, or it could be invoked
indirecly if the script would commit the changes to news.inc in CVS.
Then the whole thing would be done automatically.
It makes a lot of sense to do it that way (IMHO). The news will be
updated about once a week, or at most once a day (more than that would
be annoying for our visitors because the useful announcements would go
out of the home page too quickly). Let's consider the maximum of one
update per day. Compare this to the 10,000 to 15,000 requests to the
home page that occur on a typical day (10,369 requests yesterday).
Even if it would cost 10 times more in terms of CPU cycles and memory
to re-assemble the page at most once a day using make and python, it
would still be 1000 times more efficient than having to re-assemble
the page at least 10,000 times per day inside Apache (using SSI).
Besides the efficiency, I am also very interested in making it easier
for others to join the web team. The requirements for testing a
simple change to a page are a bit too high for the moment. So it
would be much better for them to be able to test the pages without
having a web server with SSI. And as I am currently unable to use my
Apache server, I have problems implementing all the stuff that has to
be done before the launch until this SSI issue is solved.
So please, pretty please, with sugar on top ;-), could you:
- add the SSI preprocessor for all .htrw files
- rename the .ssi files to .htrw
- remove all rules related to .ssi files, to simplify the Makefile?
It is not important to trigger the make process from the news-index
script right now, because the news haven't been updated for a while
anyway. So we can try to solve this issue in the next few days, not
right now. But it would be nice to have the static pages ready as
soon as possible so that I can continue updating the site and
eventually ask Yosh to switch from the old site to the new one.
-Raphaël