DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Two phase commit or replication

  1. #1
    Join Date
    Feb 2007
    Posts
    212

    Two phase commit or replication

    Hi Friends,

    I'm confused about which commit is better:

    Say I have two sites A & B connected with WAN 256KB. Site A has table LOANS_PAYMENT TABLE which has a replica on B. The requirement is that
    once a payment record is inserted in site A in will be immediately replicated to B as soon as possible. The payment table has a daily transaction insert of
    10,000 rows and average legth of 50 bytes per row.

    Option 1:
    create db trigger(after insert) on LOANS_PAYMENT in site-A to insert on
    site B

    Option 2:
    Create repliction view refresh fast on commit.


    My question is, which is effective and effecient program? a db trigger
    or a replication refresh.

    Thanks a lot

  2. #2
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    The calcuations shows that the bandwith should be enough to implement the first idea.
    However consider the following:
    1) The WAN bandwith is probably not reserved for you. If you share it with other 100 people, downloading pictures, video etc. can you rely on that bandwith
    2) Is the 256KB bandwith guaranteed? In my country the contract says UP TO 256KB, what means that actually they guarantee that you will not go ovet 256KB :-)
    3) Keep in mind that if the connection fails (what can happen, since thats' WAN) you'll not be able to insert into the table at all, in case of the first scenario, and that practically means downtime

    I hope that helps

  3. #3
    Join Date
    Feb 2007
    Posts
    212
    thanks dear....the 1st one is a tight-coupled system while the 2nd
    is loose-coupled.

    If the network is down and i am using the second one(fast refresh on commit)
    does it know when to restart updating the other site?

    Thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width