Article View: borland.public.interbase.replication
Article #158Re: Home-made replicator...
From: Craig Stuntz [TeamB]
Date: Fri, 27 Jun 2003 14:00
Date: Fri, 27 Jun 2003 14:00
51 lines
3273 bytes
3273 bytes
Jonathan Neve wrote: > I've had a look at the standard IB replicator, as well as a few > others, but it seems that it might be hard to make it work just the > way I want it. I would like to synchronize updates in both > directions, over all tables of the database, as frequently as > possible. I've written a few replicators over the years, most recently to replicate IB data to and from a Palm application. It's important to understand that asynchronous replication is essentially unidirectional. "Bidirectional" replication means you're running multiple cases of unidirectional replication. The reason why this distinction is important is that there must be clear business rules for determining who wins in the event of a conflict. > All 4 databases must be identical. So my needs are > very simple. These two statements conflict. Making any two databases identical is usually not simple. If the metadata is the same, it helps things, but it's conflicts in data, not metadata, which make your life difficult. With asynchronous replication your referential constraints can't stop a user on DB 1 from deleting a record referenced by a newly inserted record on DB 2. In the real world, the easiest way to use replication is to establish rules for who can change what which prevent conflicts from happening in the first place and stick to them. This might mean that "average Joe" users are allowed to insert lookup table entries but not delete them, and that they are only allowed to edit records they create. Things they edit will be sent to the master DB, and the rest of the DB, which they are not allowed to change, is sent back from the master. > Do you think it would be a good idea to implement it by > myself (simply using triggers and a log table, with a process running > in the backgroud, sending and getting changes), or would I be better > off using the standard one? That's how IB-Replicator works, so the question as expressed isn't really a choice between two alternatives. If your needs really are very simple, it may be fairly easy to write a limited replicator which only does a few things. -Craig -- Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH Delphi/InterBase Weblog : http://delphi.weblogs.com Please read and follow Borland's rules for the user of their news server: http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<3efc4e0f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3efc1db3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f89d7,a0215dc343694833 X-Google-Attributes: gidf89d7,public X-Google-ArrivalTime: 2003-06-27 07:08:04 PST From: "Craig Stuntz [TeamB]" <cstuntz@vertexsoftware.com> Subject: Re: Home-made replicator... Newsgroups: borland.public.interbase.replication References: <3efc1db3@newsgroups.borland.com> Organization: Vertex Systems Corporation User-Agent: XanaNews/1.15.2.7 NNTP-Posting-Host: 65.86.87.242 Message-ID: <3efc4e0f@newsgroups.borland.com> Date: 27 Jun 2003 07:00:47 -0700 X-Trace: newsgroups.borland.com 1056722447 65.86.87.242 (27 Jun 2003 07:00:47 -0700) Lines: 51 X-Authenticated-User: cstuntz Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail