We have a distributed solution that's currently under design. There are a few points of integration where some application needs data from someone else and vice versa. We could solve by either writing REST interfaces and provide CRUD features so that apps can share data between themselves. Or we can use something like nanomsg or zeroMQ to send messages back and forth.
We also have H/A requirements where we want to do master to master replication across primary and secondary db servers to ensure that if one goes down, the other one can kick in.
Here's the question. Some on the team feel that we should choose one method of sharing data like master to master replication... and just use it across the board to "share" data. It's true that we can do that, but I think each case should be analyzed and treated separately depending on specific criteria such as:
- are the databases in question identical? if they are, then master to master is appropriate such as in our High Availability scenario.
- in the case of disparate systems, how much data are we shuttling back and forth? if it's a lot of data... maybe a message bus is better. just send a notification to say "there's a change... here's the change id. Go get it".
- How often does data change? Does this matter? I *think both a REST api and a message bus will be able to handle many transactions.
I'm not sure what else to consider. It feels like creating a message bus solution would be a lot more work than a REST api into each database. But I could be wrong. What other things should we take into consideration?
Thanks.