How to configure bi-directional replication on a single table in symmetricDS? The Next CEO of...

How to use tikz in fbox?

Unreliable Magic - Is it worth it?

What does this shorthand mean?

Anatomically Correct Strange Women In Ponds Distributing Swords

Can I equip Skullclamp on a creature I am sacrificing?

Trouble understanding the speech of overseas colleagues

How easy is it to start Magic from scratch?

Describing a person. What needs to be mentioned?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Implement the Thanos sorting algorithm

How to write papers efficiently when English isn't my first language?

What is the purpose of the Evocation wizard's Potent Cantrip feature?

Why doesn't a table tennis ball float on the surface? How do we calculate buoyancy here?

Only print output after finding pattern

If the heap is initialized for security, then why is the stack uninitialized?

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

How to safely derail a train during transit?

What happens if you roll doubles 3 times then land on "Go to jail?"

Why were Madagascar and New Zealand discovered so late?

How do I solve this limit?

Does the Brexit deal have to be agreed by both Houses?

Whats the best way to handle refactoring a big file?

Go Pregnant or Go Home

Is it safe to use c_str() on a temporary string?



How to configure bi-directional replication on a single table in symmetricDS?



The Next CEO of Stack OverflowWindows 7 replication with consumer NASMySql replication not working properly on Ubuntu Lucid Lynx serverHow to control replication?NOQUEUE: reject: Relay access deniedmysql replication adding slaves at later stageInstalling and running two postgresql versions on different ports (or two instances of same server)Connect to PostgreSQL database from Excel 2013 Power Query with NpgsqlPostgres restoring replication, timeline conflictCan't find the “timeline history file” to get the replication workingCannot read clients from nas table in freeradius only with clients.conf












0















I have installed and configured the database replication software from http://www.symmetricds.org/ on the client and the server. I have followed the directions to setup the example replication, and everything works as advertised.



I am interested in is bi-directional Replication on a single table. That means that each database on the client and server can be inserted/updated/deleted and changes occur on the other database. Each table is both an originator and destination of content for the other.



I've read the entire manual for symmetricDS and there is no example of how a bi-directional table should be configured. There is a single paragraph in the manual that says it can be done, but not how.



Where are the instructions to create bi-directional database replication in symmetricDS? The default example they provide is single directional replication pumps.



My System:



Client: Fedora 17 Linux with postgresql
Server: Windows 8 with mysql


My presumptuous attempt at bi-directional pumps failed:



The trigger sym_trigger_router is where you define the direction the data pumps. I create a pump in both directions. But this creates a problem with key-enforced conflicts. If an insert or update or delete is performed at the same moment on the same key, the database will have to take remedial action to restore sanity.



Are there any instructions for how to do this or has anybody done this?










share|improve this question














bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I have installed and configured the database replication software from http://www.symmetricds.org/ on the client and the server. I have followed the directions to setup the example replication, and everything works as advertised.



    I am interested in is bi-directional Replication on a single table. That means that each database on the client and server can be inserted/updated/deleted and changes occur on the other database. Each table is both an originator and destination of content for the other.



    I've read the entire manual for symmetricDS and there is no example of how a bi-directional table should be configured. There is a single paragraph in the manual that says it can be done, but not how.



    Where are the instructions to create bi-directional database replication in symmetricDS? The default example they provide is single directional replication pumps.



    My System:



    Client: Fedora 17 Linux with postgresql
    Server: Windows 8 with mysql


    My presumptuous attempt at bi-directional pumps failed:



    The trigger sym_trigger_router is where you define the direction the data pumps. I create a pump in both directions. But this creates a problem with key-enforced conflicts. If an insert or update or delete is performed at the same moment on the same key, the database will have to take remedial action to restore sanity.



    Are there any instructions for how to do this or has anybody done this?










    share|improve this question














    bumped to the homepage by Community 4 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I have installed and configured the database replication software from http://www.symmetricds.org/ on the client and the server. I have followed the directions to setup the example replication, and everything works as advertised.



      I am interested in is bi-directional Replication on a single table. That means that each database on the client and server can be inserted/updated/deleted and changes occur on the other database. Each table is both an originator and destination of content for the other.



      I've read the entire manual for symmetricDS and there is no example of how a bi-directional table should be configured. There is a single paragraph in the manual that says it can be done, but not how.



      Where are the instructions to create bi-directional database replication in symmetricDS? The default example they provide is single directional replication pumps.



      My System:



      Client: Fedora 17 Linux with postgresql
      Server: Windows 8 with mysql


      My presumptuous attempt at bi-directional pumps failed:



      The trigger sym_trigger_router is where you define the direction the data pumps. I create a pump in both directions. But this creates a problem with key-enforced conflicts. If an insert or update or delete is performed at the same moment on the same key, the database will have to take remedial action to restore sanity.



      Are there any instructions for how to do this or has anybody done this?










      share|improve this question














      I have installed and configured the database replication software from http://www.symmetricds.org/ on the client and the server. I have followed the directions to setup the example replication, and everything works as advertised.



      I am interested in is bi-directional Replication on a single table. That means that each database on the client and server can be inserted/updated/deleted and changes occur on the other database. Each table is both an originator and destination of content for the other.



      I've read the entire manual for symmetricDS and there is no example of how a bi-directional table should be configured. There is a single paragraph in the manual that says it can be done, but not how.



      Where are the instructions to create bi-directional database replication in symmetricDS? The default example they provide is single directional replication pumps.



      My System:



      Client: Fedora 17 Linux with postgresql
      Server: Windows 8 with mysql


      My presumptuous attempt at bi-directional pumps failed:



      The trigger sym_trigger_router is where you define the direction the data pumps. I create a pump in both directions. But this creates a problem with key-enforced conflicts. If an insert or update or delete is performed at the same moment on the same key, the database will have to take remedial action to restore sanity.



      Are there any instructions for how to do this or has anybody done this?







      linux mysql postgresql replication






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 17 '13 at 17:31









      Eric LeschinskiEric Leschinski

      4,27843646




      4,27843646





      bumped to the homepage by Community 4 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 4 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Bi directional table replication in symmetricDS



          Bi directional table replication is not trivial because you must deal with every kind of conflict that could arise. One example conflict is when a row is inserted on both the server and client that would together violate a unique key. Both the client and the server both allow the insert/update to occur because they do not know that there is an incoming update that would violate the key.



          The synchronization engine on both sides think: "Oh no, we both told our users that it was OK to add this row based on what we knew, but we can't synchronize now because it would violate uniqueness."



          The synchronization engine has a choice:



          1.  Take the last insert/update by timestamp and destroy the request that came 
          first. This is undesirable because the first person thought they committed,
          successfully when in reality their transaction was erased without anyone's
          consent.

          2. Reject both rows, if I can't make everyone happy, I'm not letting anything
          through, and log the conflict to an external table to be dealt with later.
          The two users who thought they submitted data will find their transaction
          in a queue.

          3. Merge the rows, take a little from one, and a little from the other, and
          create a hybrid row. Or take one or the other based on some priority system
          or based on how filled out it is.


          This is just one example of a conflict. There are hundreds of conceivable circumstances where a conflict would arise that you must plan for.



          The hundreds of conceivable circumstances where a conflict could happen must have a remedial action defined in the configuration table: sym_conflict.



          You could direct symmetricDS to merge the rows according to rules, deny the transactions until a human has reviewed the rows, or even program it to throw out the baby with the bathwater. This is defined in Chapter 3.8 of the user guide, configuring data conflict and resolution.



          The number of potential conflicts are based upon the configuration and limitations of your database table. As you add conditions and limitations on your table, the number of potential conflicts increases exponentially. If you have unique keys, you need to prepare for unique key conflicts and define resolutions. If you have primary/foreign keys on other tables, you need conflict resolutions for those. If you get 90% of the conflicts but miss a few, then when the conflicts occur, the databases will not be identical on client and server.






          share|improve this answer


























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f633101%2fhow-to-configure-bi-directional-replication-on-a-single-table-in-symmetricds%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Bi directional table replication in symmetricDS



            Bi directional table replication is not trivial because you must deal with every kind of conflict that could arise. One example conflict is when a row is inserted on both the server and client that would together violate a unique key. Both the client and the server both allow the insert/update to occur because they do not know that there is an incoming update that would violate the key.



            The synchronization engine on both sides think: "Oh no, we both told our users that it was OK to add this row based on what we knew, but we can't synchronize now because it would violate uniqueness."



            The synchronization engine has a choice:



            1.  Take the last insert/update by timestamp and destroy the request that came 
            first. This is undesirable because the first person thought they committed,
            successfully when in reality their transaction was erased without anyone's
            consent.

            2. Reject both rows, if I can't make everyone happy, I'm not letting anything
            through, and log the conflict to an external table to be dealt with later.
            The two users who thought they submitted data will find their transaction
            in a queue.

            3. Merge the rows, take a little from one, and a little from the other, and
            create a hybrid row. Or take one or the other based on some priority system
            or based on how filled out it is.


            This is just one example of a conflict. There are hundreds of conceivable circumstances where a conflict would arise that you must plan for.



            The hundreds of conceivable circumstances where a conflict could happen must have a remedial action defined in the configuration table: sym_conflict.



            You could direct symmetricDS to merge the rows according to rules, deny the transactions until a human has reviewed the rows, or even program it to throw out the baby with the bathwater. This is defined in Chapter 3.8 of the user guide, configuring data conflict and resolution.



            The number of potential conflicts are based upon the configuration and limitations of your database table. As you add conditions and limitations on your table, the number of potential conflicts increases exponentially. If you have unique keys, you need to prepare for unique key conflicts and define resolutions. If you have primary/foreign keys on other tables, you need conflict resolutions for those. If you get 90% of the conflicts but miss a few, then when the conflicts occur, the databases will not be identical on client and server.






            share|improve this answer






























              0














              Bi directional table replication in symmetricDS



              Bi directional table replication is not trivial because you must deal with every kind of conflict that could arise. One example conflict is when a row is inserted on both the server and client that would together violate a unique key. Both the client and the server both allow the insert/update to occur because they do not know that there is an incoming update that would violate the key.



              The synchronization engine on both sides think: "Oh no, we both told our users that it was OK to add this row based on what we knew, but we can't synchronize now because it would violate uniqueness."



              The synchronization engine has a choice:



              1.  Take the last insert/update by timestamp and destroy the request that came 
              first. This is undesirable because the first person thought they committed,
              successfully when in reality their transaction was erased without anyone's
              consent.

              2. Reject both rows, if I can't make everyone happy, I'm not letting anything
              through, and log the conflict to an external table to be dealt with later.
              The two users who thought they submitted data will find their transaction
              in a queue.

              3. Merge the rows, take a little from one, and a little from the other, and
              create a hybrid row. Or take one or the other based on some priority system
              or based on how filled out it is.


              This is just one example of a conflict. There are hundreds of conceivable circumstances where a conflict would arise that you must plan for.



              The hundreds of conceivable circumstances where a conflict could happen must have a remedial action defined in the configuration table: sym_conflict.



              You could direct symmetricDS to merge the rows according to rules, deny the transactions until a human has reviewed the rows, or even program it to throw out the baby with the bathwater. This is defined in Chapter 3.8 of the user guide, configuring data conflict and resolution.



              The number of potential conflicts are based upon the configuration and limitations of your database table. As you add conditions and limitations on your table, the number of potential conflicts increases exponentially. If you have unique keys, you need to prepare for unique key conflicts and define resolutions. If you have primary/foreign keys on other tables, you need conflict resolutions for those. If you get 90% of the conflicts but miss a few, then when the conflicts occur, the databases will not be identical on client and server.






              share|improve this answer




























                0












                0








                0







                Bi directional table replication in symmetricDS



                Bi directional table replication is not trivial because you must deal with every kind of conflict that could arise. One example conflict is when a row is inserted on both the server and client that would together violate a unique key. Both the client and the server both allow the insert/update to occur because they do not know that there is an incoming update that would violate the key.



                The synchronization engine on both sides think: "Oh no, we both told our users that it was OK to add this row based on what we knew, but we can't synchronize now because it would violate uniqueness."



                The synchronization engine has a choice:



                1.  Take the last insert/update by timestamp and destroy the request that came 
                first. This is undesirable because the first person thought they committed,
                successfully when in reality their transaction was erased without anyone's
                consent.

                2. Reject both rows, if I can't make everyone happy, I'm not letting anything
                through, and log the conflict to an external table to be dealt with later.
                The two users who thought they submitted data will find their transaction
                in a queue.

                3. Merge the rows, take a little from one, and a little from the other, and
                create a hybrid row. Or take one or the other based on some priority system
                or based on how filled out it is.


                This is just one example of a conflict. There are hundreds of conceivable circumstances where a conflict would arise that you must plan for.



                The hundreds of conceivable circumstances where a conflict could happen must have a remedial action defined in the configuration table: sym_conflict.



                You could direct symmetricDS to merge the rows according to rules, deny the transactions until a human has reviewed the rows, or even program it to throw out the baby with the bathwater. This is defined in Chapter 3.8 of the user guide, configuring data conflict and resolution.



                The number of potential conflicts are based upon the configuration and limitations of your database table. As you add conditions and limitations on your table, the number of potential conflicts increases exponentially. If you have unique keys, you need to prepare for unique key conflicts and define resolutions. If you have primary/foreign keys on other tables, you need conflict resolutions for those. If you get 90% of the conflicts but miss a few, then when the conflicts occur, the databases will not be identical on client and server.






                share|improve this answer















                Bi directional table replication in symmetricDS



                Bi directional table replication is not trivial because you must deal with every kind of conflict that could arise. One example conflict is when a row is inserted on both the server and client that would together violate a unique key. Both the client and the server both allow the insert/update to occur because they do not know that there is an incoming update that would violate the key.



                The synchronization engine on both sides think: "Oh no, we both told our users that it was OK to add this row based on what we knew, but we can't synchronize now because it would violate uniqueness."



                The synchronization engine has a choice:



                1.  Take the last insert/update by timestamp and destroy the request that came 
                first. This is undesirable because the first person thought they committed,
                successfully when in reality their transaction was erased without anyone's
                consent.

                2. Reject both rows, if I can't make everyone happy, I'm not letting anything
                through, and log the conflict to an external table to be dealt with later.
                The two users who thought they submitted data will find their transaction
                in a queue.

                3. Merge the rows, take a little from one, and a little from the other, and
                create a hybrid row. Or take one or the other based on some priority system
                or based on how filled out it is.


                This is just one example of a conflict. There are hundreds of conceivable circumstances where a conflict would arise that you must plan for.



                The hundreds of conceivable circumstances where a conflict could happen must have a remedial action defined in the configuration table: sym_conflict.



                You could direct symmetricDS to merge the rows according to rules, deny the transactions until a human has reviewed the rows, or even program it to throw out the baby with the bathwater. This is defined in Chapter 3.8 of the user guide, configuring data conflict and resolution.



                The number of potential conflicts are based upon the configuration and limitations of your database table. As you add conditions and limitations on your table, the number of potential conflicts increases exponentially. If you have unique keys, you need to prepare for unique key conflicts and define resolutions. If you have primary/foreign keys on other tables, you need conflict resolutions for those. If you get 90% of the conflicts but miss a few, then when the conflicts occur, the databases will not be identical on client and server.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Aug 17 '13 at 18:20

























                answered Aug 17 '13 at 17:51









                Eric LeschinskiEric Leschinski

                4,27843646




                4,27843646






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f633101%2fhow-to-configure-bi-directional-replication-on-a-single-table-in-symmetricds%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                    Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

                    looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...