[Catalog-sig] start on static generation, and caching - apache config.
renesd at gmail.com
Sun Jul 8 05:14:56 CEST 2007
Cool, ok. Let's start with event based updating of the static files.
I need to make this tool in this way anyway though. But we can either
set it up to work with polling, or event based. We can start with
event based and switch to polling later if needed.
Since none of the files exists at the moment, the tool will be
needed to generate them initially. Also if templates change, or the
database changes - then the static pages may need regenerating.
Polling is just one sql statement to see if something has changed.
You do this once, no matter how many things have changed. It's a
really quick, operation if nothing has changed.
Polling ends up being faster if you are constantly having to do things
all the time anyway. It's what network drivers do these days because
they realise that there are a constant stream of events(interupts)
anyway - so might as well deal with them at a fixed interval.
Logged in users will not see the static file anyway - since they are
logged in, they get to see the dynamically generated stuff.
Imagine this case:
2-3 users are updating their packages, at a similar time. The main
index then gets regenerated 3 times, rather than once. The more
people who are changing things the more this method works. If there
are 20 people changing things at the same time, then there is still
only one update of the main index page. However since the cheeseshop
only gets updated about 6 times daily, event based is probably better
for the moment.
Anyway... I'm just making the tool which can be used on demand, or at
On 7/8/07, Jim Fulton <jim at zope.com> wrote:
> On Jul 7, 2007, at 12:24 AM, René Dudfield wrote:
> > Now I just need to finish off the static file generation code. It
> > needs a tool which can run every minute or so, which will look for any
> > changes.
> Why not write the files when the underlying packages change?
> I don't like polling for two reasons:
> - New pages are out of date for up to the polling interval. This is
> especially annoying for someone who uploads a package and wants to be
> able to access it immediately.
> - Polling all of the pages to see what's changed doesn't seem
> scalable to me.
> > I've also updated the http://wiki.python.org/moin/CheeseShopDev page
> > with some things I noticed when installing the cheeseshop again on my
> > laptop. Mainly dependencies, and missing config steps.
> Jim Fulton mailto:jim at zope.com Python Powered!
> CTO (540) 361-1714 http://www.python.org
> Zope Corporation http://www.zope.com http://www.zope.org
More information about the Catalog-SIG