^_^ Well here's another new feature of mine in core which Wikia should 
like... Like the Listusers' hooks, cept I made this one for myself some 
time ago.
http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=34199

I've also got a 1.12 hack published which adds the feature to 1.12 for 
anyone who want's the feature now while they are waiting for it to come 
out in the next major release. (I hate maintaining hacks myself, but if 
it's a just for while you're waiting for the next release to obsolete 
the current stable, that's fine with me...)
http://wiki-tools.com/wiki/$wgSharedDBtables

So the use? Here's what it boils down to...

The new variable $wgSharedDBtables removes an age old restriction of 
$wgSharedDB. In fact a number of MW developers don't get why it's so 
restrictive. Hardcoding the tables which are forced to be shared is just 
plain bad coding. So this removes that restriction.
By default for backwards compatibility $wgSharedDBtables is set to 
array( 'user' ); so the user table is still being shared. However, ^_^ 
now you can unset that and disable user sharing, in fact you can disable 
that in a setup where you don't want shared users, but still allow other 
extensions which use it to be shared (Namely I believe it was either 
SpamRegex or RegexBlock).
However, as Wikia is using the shared DB already, there's a little more 
useful purpose for this. It's something which is working perfectly fine 
over at my setup.
I have $wgSharedDBtables = array( 'interwiki' ); setup over on my wiki. 
What's this do? Because of that one little setting, all of my wiki grab 
their interwiki prefixes from the shared DB (in my case, it's my commons 
wiki) instead of using the local database. And suddenly, all my wiki can 
use the Interwiki links, and I only need to update it on a single one.
Which may even be useful for Wikia. Currently we've got a interwiki map 
page, and that's synced out to all 5000 of Wikia's wiki. Enabling this 
and moving one table into the shared DB would mean that suddenly instead 
of needing to duplicate the table over and over, all of Wikia's wiki 
would start sharing the same interwiki table.
Oh ya... The beauty of this... I know that interwiki rows are small, but 
think about it... There are a few hundred interwiki rows in Wikia's 
interwiki database. And wikia hosts around 5000 wiki. Now remember that 
all the wiki hooked into Wikia's system basically have duplicate copies 
of each other's interwiki tables. Now, think about it... I don't care 
how small a interwiki row is, when you add up hundreds of them, 
duplicated across 5000 wiki, that's a lot of data duplication. Sharing a 
single table would mean that you could basically erase almost 5000 
interwiki tables from Wikia with no real side effects.
Oh ya... And the other benefit? Rather than that interwiki map page, 
since the actual table is shared, you only need to enable 
Special:Interwiki on one wiki, then you can edit the global table with 
that instead of editing the article. ^_^ And it's even logged to (oh ya, 
one of these days I'm thinking of finishing a better extension to 
replace it, but it works for now). Then you only need to run the 
maintenance script to clean the interwiki cache everywhere once in a 
while and everything works out nicely.

Actually, I'm not completely sure what is used for the memcached keys 
for the interwiki table. But I may track down the code in core handling 
that. ^_^ As a little bonus, I may be able to make the shared interwiki 
table use the key for the shared wiki (it is just a cache of the shared 
table, so using the same memcached should be good)... And as a nice 
result, that should mean that the method of cleaning the interwiki cache 
could be reduced to doing it on a single wiki instead of on all of them. 
Massive improvement on speed of the task.

-- 
~Daniel Friesen(Dantman) of:
-The Gaiapedia (http://gaia.wikia.com)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
-and Wiki-Tools.com (http://wiki-tools.com)

_______________________________________________
Wikia-tech-l mailing list
[email protected]
http://lists.wikia.com/mailman/listinfo/wikia-tech-l

Reply via email to