<p>I am building out a solution that will be deployed in multiple data centers in multiple regions around the world, with each data center having a replicated copy of data actively updated in each region. I will have a combination of multiple databases and file systems in each data center, the state of which must be kept consistent (within a data center). These multiple repositories will be fronted by a SOA service tier. </p>

<p>I can tolerate some latency in the replication, and need to allow for regions to be off-line, and then catch up later.</p>

<p>Given the multiple back end repositories of data, I can't easily rely on independent replication solutions for each one to maintain a consistent state. I am thus lead to implementing replication at the application layer -- by replicating the SOA requests in some manner. I'll need to make sure that replication loops don't occur, and that last writer conditions are sorted out correctly.</p>

<p>In your experience, what is the best pattern for solving this problem, and are there good products (free or otherwise) that should be investigated?</p>

[{'answer_id': 66301, 'author': 'Ewan Makepeace', 'author_id': 9731, 'author_profile': 'https://Stackoverflow.com/users/9731', 'pm_score': 0, 'selected': False, 'text': '<p>You dont give enough specifics to be certain of your needs but I think you should check out SQL Server Merge replication. It allows for asynchronous replication of multiple databases with full conflict resolution. You will need to designate a Global master and all the other databases will replicate to that one, but all the database instances are fully functional (read/write) and so you can schedule replication at whatever intervals suit you. If any region goes offline they can catch up later with no issues - if the master goes offline everyone will work independantly until replication can resume.</p>\n\n<p>I would be interested to know of other solutions this flexible (apart from Lotus Notes/Domino of course which is not very trendy these days).</p>\n'}, {'answer_id': 71380, 'author': 'AndrewB', 'author_id': 11770, 'author_profile': 'https://Stackoverflow.com/users/11770', 'pm_score': 2, 'selected': False, 'text': "<p>Lotus/ Domino is your answer. I've been working with it for ten years and its exactly what you need. It may not be trendy (a perception that I would challenge) but its powerful, adaptable and very secure, The latest version R8 is the best yet.</p>\n"}, {'answer_id': 90378, 'author': 'Peter Kelley', 'author_id': 14893, 'author_profile': 'https://Stackoverflow.com/users/14893', 'pm_score': 0, 'selected': False, 'text': '<p>I think that your answer is going to have to be based on a pub/sub architecture. I am assuming that you have reliable messaging between your data centers so that you can rely on published updates being received eventually. If all of your access to the data repositories is via service you can add an event notification to the orchestration of each of your update services that notifies all interested data centers of the event. Ideally the master database is the only one that sends out these updates. If the master database is the only one sending the updates you can exclude routing the notifications to the node that generated them in the first place thus avoiding update loops.</p>\n'}, {'answer_id': 260838, 'author': 'user33895', 'author_id': 33895, 'author_profile': 'https://Stackoverflow.com/users/33895', 'pm_score': 1, 'selected': False, 'text': '<p>You should definitely consider IBM Lotus Domino. A Lotus Notes database can replicate between sites on a predefined schedule. The replicate in Notes/Domino is definitely a very powerful feature and enables for full replication of data between sites. Even if a server is unavailable the next time it connects it will simply replicate and get back in sync.</p>\n\n<p>As far as SOA Service tier you could then use Domino Designer to write a webservice. Since Notes/Domino 7.5.x (I believe) Domino has been able to provision and consume webservices.</p>\n'}, {'answer_id': 1016548, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>AS what other advised, I will recommend also Lotus Notes/Domino.  8.5 is really very powerful application development platfrom</p>\n'}]
['https://Stackoverflow.com/questions/66040', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9608/']