master-master server setup

Asked by Corey Mitchell on 2011-08-23

We have a distributed team (US and Japan). We are migrating from subversion to bazaar because it better suits our distributed team. Due to network latency, we want to setup 2 bazaar servers hosting the same repository. We want developers to be able to download and publish branches to their local server and then have those changes replicated to the other site. We are planning to use Apache 2.x to host the bazaar repositories. I'm pretty sure this is possible with bazaar but I can't find a good example of it. Can someone please explain how this setup is done? Thanks a lot.

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
2011-08-24
Last reply:
2011-08-24
Martin Pool (mbp) said : #1

Hi, Corey, welcome to Bazaar.

The short answer is that you do need to have one master location for each logical branch. If you have what claims to be the trunk (for instance) on both machines, and somebody simultaneously commits to both the US and the JP server, then there will be a conflict. Bazaar can handle and resolve that conflict, but it's generally going to be much easier to deal with it if the conflict is encountered and resolved on a developer's machine rather than in the middle of file synchronization.

What I would recommend here is to have one master server in whichever location either has the most developers or the best network connectivity or is most convenient. Suppose for argument's sake that's the US. Put your trunk and major release/feature branches there. Then set up a secondary server in Japan, and host branches there for individual Japanese developers or for feature branches that are mostly handled by the Japanese team. Set up cron jobs to regularly fetch from the US server to a mirror on the Japanese server and vice versa. (You can use bzr multi-pull for instance.) So then Japanese developers can pull from trunk from a nearby machine, but when they merge to trunk they need to talk to the US.

Also I'd recommend using bzr+ssh to connect to the server with ssh compression on, and running bzr 2.4 everywhere as it's faster than earlier releases.

hope that helps, ask if you need more.

Corey Mitchell (cmitch13) said : #2

Is there some way to setup a pass-through so the end user can "commit" to a mirror but the mirror knows to pass that commit on to the master?

Martin Pool (mbp) said : #3

> Corey Mitchell is still having a problem:
> Is there some way to setup a pass-through so the end user can "commit"
> to a mirror but the mirror knows to pass that commit on to the master?

The short answer is no. To have one consistent branch the commits
need to be done synchronously and so the commit time seen by the
client will be the same.

Can you help with this problem?

Provide an answer of your own, or ask Corey Mitchell for more information if necessary.

To post a message you must log in.