On Fri, Jan 02, 2004 at 03:10:18AM +0100, zocky wrote:
Maybe there should be the central server, which would
handle the "official"
copy of the database and process page saves, and several mirrors around the
world, which would display pages and previews, but forward all save
requests to the central server.The central server handles nothing but page
saves and feeding of mirrors (and probably user logins).
The mirrors could be kept in sync by querying the central server for recent
changes (i.e. changes since last synchronization). If the syncing is done
every couple of minutes (or even half an hour for low-usage mirrors), the
mirrors will be completely useful for browsing and editing. The central
server doesn't even have to know what's going on with other servers, (who's
running them, do they work...) since they can't make a wrong save, anyway,
and the encyclopaedia is safe.
What I don't know is whether this can be made completely transparent to the
user.
Sounds like the concept Microsoft uses for its Primary Domain Controller and
Backup Domain Controller concept in Windows NT. The BDCs have copies of the
PDC's user database, but use them read only. Any change to the user database
(changing passwords, adding users) is written to the PDC and replicated to
the BDCs.
If the PDC goes down, read access is still possible, so users can still log
in to the domain. If the downtime will last longer, one of the BDCs can be
promoted to PDC. The BDCs use WINS to find the PDC, this would be the tricky
part to implement. As long as the number of mirror DBs is small, this could be done
manualy.
The PHP code would have to know about two different database servers, one
for read access, one for write access.
Regards,
JeLuF