Synchronising dbs from several servers

Florian Bogeschdorfer fb at memedia.de
Thu Oct 28 16:30:43 CDT 2004


Hi Ruslan!

> 
> On 10/28/04 11:43 AM, "Florian Bogeschdorfer" <fb at memedia.de> wrote:
> 
> Hi Florian,
>  
> > I need to synchronize adresses and payback cards between different 
> > outlets, each running it's own vServer and DB in my current 
> application.
> > 
> > I thought about sending changes (change,new,delete) in the two 
> > important tables to an online Db/php,mySQL where each 
> outlet can then 
> > download the changes. Do you see a better way?
> 
> First of all, you MUST to have some online center. Right?

Yes, I am planning to store the changes until the have been downloaded from
the other outlets, then delete them.

> 
> 

> > 
> > But I see no way to find out the table(s), that a cursor 
> refers to. Is 
> > there a way?
> 
> No such way.

Too bad. Could it be implemented?

> 
> > Otherwise I would have to change every call to the 
> changerecord sub...
> 
> This is hard task.

Yes, especially because the project is very large. Hundreds of routines are
calling this sub. Well maybe less, since some are parent/child

> 
> You can read about replication.
> One server publish some tables, other servers subscribe to them.
> Only publisher can write to that tables, rest read.
> 
> You can think about usage in these 2 tables the COLUMN 'datetime'.
> And use its for synchronization.

Each outlet can be a publisher, eg customer goes to outlet 10, buys
something, then 15 minutes later he goes to outlet 15 and there must be the
changes already downloaded...

I know that the common way is to store the relevant data on the card, but
this is no option here.
So I upload the data to a server, adding to more fields FROM_OUTLET and
FROM_ADRESS_ID. This is actually no big problem. A script is running
constantly to synchronize non-stop.

But having to rewrite all parts that change is a hard way since I have to
filter out 2 tables from 50, only changes in these tables are to be
synchronized.
I need something like "Hey, table 1 is changed, we must synchronize..."

No idea?

Best regards, Florian



More information about the Valentina mailing list