[Wikitech-l] New table: globaltemplatelinks

2010-08-03 Thread Pierre-Yves Guerder
Hi everybody!

I have been working on interwiki transclusion for several weeks on my
branch and got some very interesting results (most of the stuff is
working, now!).

What I currently need is to create a globaltemplatelinks that will
allow a wiki to invalidate the cache of the pages which transclude a
distant template when this template is modified.

I have written my proposal for the structure and behavior of this
system here: [1].

Can you please read it and give your opinion?

Thanks in advance

Best regards

--
Peter Potrowl
http://www.mediawiki.org/wiki/User:Peter17

[1] 
http://www.mediawiki.org/wiki/User:Peter17/Reasonably_efficient_interwiki_transclusion#Create_a_globaltemplatelinks_table

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] New table: globaltemplatelinks

2010-08-03 Thread Domas Mituzas
Hi!

> Can you please read it and give your opinion?

Great job on indexing, man, I see you cover pretty much every use case!

Domas

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] New table: globaltemplatelinks

2010-08-03 Thread Roan Kattouw
2010/8/3 Domas Mituzas :
> Hi!
>
>> Can you please read it and give your opinion?
>
> Great job on indexing, man, I see you cover pretty much every use case!
>
I at one point meant to tell Peter to add indexes, but that slipped
through, I guess. I'll put in some indexes tomorrow.

Roan Kattouw (Catrope)

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] New table: globaltemplatelinks

2010-08-03 Thread Platonides
Pierre-Yves Guerder wrote:
> Hi everybody!
> 
> I have been working on interwiki transclusion for several weeks on my
> branch and got some very interesting results (most of the stuff is
> working, now!).
> 
> What I currently need is to create a globaltemplatelinks that will
> allow a wiki to invalidate the cache of the pages which transclude a
> distant template when this template is modified.
> 
> I have written my proposal for the structure and behavior of this
> system here: [1].
> 
> Can you please read it and give your opinion?
> 
> Thanks in advance
> 
> Best regards

You seem to assume that when a template changes it is enough to update
page_touched.
You also need to purge the squids and create the needed jobs to rerender
those pages (and the pages that include those, you will probably store
the final inclusions on all superpages, so there shouldn't be issues there).

We are having more and more global uses. We should have a global
namespace mapping so that each global table doesn't need to copy the
namespace names just for display.


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] New table: globaltemplatelinks

2010-08-03 Thread Roan Kattouw
2010/8/4 Platonides :
> You seem to assume that when a template changes it is enough to update
> page_touched.
> You also need to purge the squids
Yes, Squid purges need to be done as well. Good catch. Fortunately,
the interwiki table can tell us exactly what each page's URL is.

> and create the needed jobs to rerender
> those pages
This is not needed: pages are automatically rerendered when first
viewed after page_touched is updated.

> (and the pages that include those, you will probably store
> the final inclusions on all superpages, so there shouldn't be issues there).
>
Because globaltemplatelinks would be transitive, like templatelinks,
that would not be an issue, correct.

> We are having more and more global uses. We should have a global
> namespace mapping so that each global table doesn't need to copy the
> namespace names just for display.
>
Maybe, but that's not easy. Storing the namespace name sounds like an
acceptable intermediate solution.

Roan Kattouw (Catrope)

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] New table: globaltemplatelinks

2010-08-04 Thread Roan Kattouw
2010/8/3 Roan Kattouw :
> 2010/8/3 Domas Mituzas :
>> Hi!
>>
>>> Can you please read it and give your opinion?
>>
>> Great job on indexing, man, I see you cover pretty much every use case!
>>
> I at one point meant to tell Peter to add indexes, but that slipped
> through, I guess. I'll put in some indexes tomorrow.
>
I've added my own proposed schema on Peter's wiki page. It's formatted
differently (SQL statement rather than the output of DESCRIBE),
contains one additional field, renames a field and, as promised, has
indexes :)

Roan Kattouw (Catrope)

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] New table: globaltemplatelinks

2010-08-04 Thread Platonides
Roan Kattouw wrote:
> 2010/8/4 Platonides:
>> You seem to assume that when a template changes it is enough to update
>> page_touched.
>> You also need to purge the squids
> Yes, Squid purges need to be done as well. Good catch. Fortunately,
> the interwiki table can tell us exactly what each page's URL is.
> 
>> and create the needed jobs to rerender
>> those pages
> This is not needed: pages are automatically rerendered when first
> viewed after page_touched is updated.

Don't forget about changing Categories. template change is the reason
the job queue was introduced to begin with.


>> (and the pages that include those, you will probably store
>> the final inclusions on all superpages, so there shouldn't be issues there).
>>
> Because globaltemplatelinks would be transitive, like templatelinks,
> that would not be an issue, correct.
> 
>> We are having more and more global uses. We should have a global
>> namespace mapping so that each global table doesn't need to copy the
>> namespace names just for display.
>>
> Maybe, but that's not easy. Storing the namespace name sounds like an
> acceptable intermediate solution.

It would be a dependence for all global extensions, but why would that
be difficult?


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] New table: globaltemplatelinks

2010-08-05 Thread Pierre-Yves Guerder
>>> We are having more and more global uses. We should have a global
>>> namespace mapping so that each global table doesn't need to copy the
>>> namespace names just for display.
>>>
>> Maybe, but that's not easy. Storing the namespace name sounds like an
>> acceptable intermediate solution.
>
> It would be a dependence for all global extensions, but why would that
> be difficult?
>
I think we just need to store:
* the wikiid
* the namespace (int)
* the namespace text
for each namespace of each wiki, in a shared database (with an index :D)

I will first code my stuff as planed and then, if I still have some
time, create this new table and adapt my code to use it.

I have updated the proposal after a discussion with Roan: we think
that using a shared table with all the interwiki transclusion links
would be much more practical, especially when we need to update it
when a calling page is edited/deleted/moved...

Can you please have a look at it again?

Thanks

--
Peter Potrowl
http://www.mediawiki.org/wiki/User:Peter17

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l