[Catalog-sig] start on static generation, and caching - apache config.

Jim Fulton jim at zope.com
Mon Jul 9 18:27:08 CEST 2007


On Jul 9, 2007, at 11:13 AM, René Dudfield wrote:

> Hello Jim,
>
> I double+ agree we should update on change.

Yay! :)

> On 7/9/07, Jim Fulton <jim at zope.com> wrote:
>> Here's a common use case:
>>
>> - A user uploads a new release
>>
>> - They then use setuptools to install the release from PyPI.
>> setuptools will not present their credentials and will therefore
>> behave like a logged in user.  It will see and install an older
>> version of the package.
>>
>
> You mean it will behave like someone *not* logged in right?

Right.

>   Either
> way they should always get the latest change.

Yes, if we update the static on change.

I though you were arguing that it didn't matter of cached pages were  
out of date because the person updating the pages would see the  
changes because they'd see uncached pages.

> The way to do this atomically, so not one can possibly get an old
> page, the static file will be removed as the change is committed.
> Then everyone gets the latest change right away - as soon as the
> change has been committed.

Sure.


>
>> > Anyway... I'm just making the tool which can be used on demand,  
>> or at
>> > regular timings.
>>
>> I wonder if we are talking about the same thing here.  I fear not.
>> With event based update, you should only update the pages that need
>> to be updated, at worst, this should be the pages for the project
>> being updated plus http://www.python.org/pypi/.  The software needed
>> for this would be very different than the software that would build
>> the static pages initially or update all if a template has changed.
>>
>
>
> These are the commands so far:
> python pypi-static-generation.py -create_single /pypi/pygame /tmp/ 
> pygame.html
> python pypi-static-generation.py -create_all

Ah, so one script, 2 behaviors. Fair enough.


> The generation of the main index page would be:
> python pypi-static-generation.py -create_single /pypi/
> path_to_static_indexpage.html
>
> Then there would be a command to update the single page:
> python pypi-static-generation.py -create_single /pypi/Pygame
> path_to_static_pygame.html

Shouldn't that be implied by both of the commands above.

I'm a little surprised that you are doing this as an external script,  
as opposed to adding the behavior to the cheeseshop code, but I guess  
it doesn't matter.

> Ok, that's all for now.  I'll be able to finish it off in a few days
> after europython.

Haven't you been able to get anyone to sprint with you on it there?

Jim

--
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 mailing list