On Mon, Sep 6, 2010 at 3:55 PM, Peter17 peter017@gmail.com wrote:
Following the advice of my mentor, Catrope, my code is currently using a separate DB (which name is stored in $wgGlobalDatabase) since it is the mechanism used by CentralAuth and it is very simple for users to set it up.
Platonides thinks that I should be using a shared table, since my code is not an extension. However, a disadvantage of shared table is that currently, adding a shared table in $wgSharedTables will force the user to share the users table, which is not always wanted.
I think the difference between a shared database and a separate database are small, except that a separate database is more flexible. After all, you can always point your $wgGlobalDatabase to your local database (of false if you use wfGetDB!) to get your local database.
As a general comment, I think that it is not strictly necessary to have your global template usage in core. If you follow the example of the global image usage, the sharing feature (ForeignFileRepo) is in core, while the tracking feature (GlobalUsage) is an extension. Similarly, the interwiki transclusion can be in core, but the usage tracking can be an extension.
Of course we can also move global (image) usage to core and have "global" features there. Another option would be to create a unified global usage extension that supports file and template usage.
Bryan