"Mojtaba Faridzad" <[EMAIL PROTECTED]> wrote on 18/11/2004 
13:59:21:

> Hi,
> I need to expand the database to 3 different locations. We have 3 
servers in 
> 3 cities. So far the database has been in one city and 2 others have 
been 
> linked to it and worked. But sometimes for a day or more a city lost the 

> connection to the master database and the users could not work. Now I am 

> going to change the method to have a copy of database on each location. 
Each 
> location should be able to change the data also. All tables are myISAM. 
I am 
> thinking about 2 ways Replication in MySQL but as MySQL document 
recommended 
> not to do it because there is no guarantee that we won't have any 
problem 
> (slow connection or losing connection in a period of time).
> 
> Have you ever had this kind of situation? How did you solve it? Have you 

> ever found any problem in your solution?

What you are attempting to do is inherently difficult, and I don't think 
any DBMS has solved it. What do you expect to happen if the links between 
cities are down, and the *same* row in the database is updated differently 
by different users? Even when the link is up, you have the possibility of 
a race condition if users in different places update records within a 
narrow window. 

The closest we got to this was having a master database in one place and 
read-only slaves in another. UPDATE commands were always sent to the 
master copy, and could not be done when the link was down. SELECTs were 
sent to the local slave and could therefore continue when the link was 
down. At the application level, we pipelined a few necessary but 
uncomplicated updates to be done when the link returned.

        Alec

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to