如何在多站点方案中提高CVS性能?

时间:2022-06-01 05:41:22

I am currently working in a project with developers working on three sites. One of the sites is in Delhi, India while the other two are in Europe. The communication between the European offices and the office in Delhi has poor bandwidth and quite bad latency, and a CVS update from there often takes 5-10 minutes even though only a few files have changed.

我目前正在开发一个项目,开发人员在三个站点上工作。其中一个地点位于印度德里,另外两个位于欧洲。欧洲办事处与德里办事处之间的通信带宽较差,延迟时间非常糟糕,即使只有少数文件发生变化,CVS更新也需要5-10分钟。

Is there any good CVS proxies out there, or any neat way of keeping separate CVS servers in sync? Do you have any other tips on how the performance can be improved in this scenario?

是否有任何好的CVS代理,或任何保持单独的CVS服务器同步的简洁方法?关于如何在这种情况下提高性能,您还有其他任何提示吗?

Unfortunately, we will be stuck with CVS during the scope of this project, so switching to something completely different is not an option in the short-term.

不幸的是,我们将在这个项目的范围内坚持使用CVS,因此在短期内不能选择切换到完全不同的东西。

2 个解决方案

#1


1  

Why isn't switching an option?

为什么不换选项?

I would highly recommend to switch to SVN or git instead. And that you do this conversion as soon as possible... like today :)

我强烈建议切换到SVN或git。并且你尽快做这个转换...就像今天:)

There are even svn tools/guides and git tools/guides out there that will do this CVS conversion for you.

甚至有svn工具/指南和git工具/指南可以为你做这个CVS转换。

I personally use and love SVN for my work, but based on your above description, it sounds like git might be the better option for you.

我个人使用并喜欢SVN用于我的工作,但根据您的上述描述,听起来git可能是更适合您的选择。

#2


1  

Here is what I have done a long time ago in similar circumstances when bandwidth and unreliable networks were an issue:

这是我很久以前在带宽和不可靠网络成为问题的类似情况下所做的事情:

  • Make a copy of the repository and install it in the remote location. You know have CVS1 and CVS2.
  • 制作存储库的副本并将其安装在远程位置。你知道有CVS1和CVS2。

  • Lock one of the two copies (CVS1) by preventing commits. This is achieved by modifying 'commitinfo' in the CVSROOT module.
  • 通过阻止提交来锁定两个副本之一(CVS1)。这是通过修改CVSROOT模块中的'commitinfo'来实现的。

  • CVS1 can be used for updates only
  • CVS1只能用于更新

  • CVS2 can be used for updates and commit
  • CVS2可用于更新和提交

When you want to give access in commit to copy 1, proceed as follows:

如果要在提交中提供访问权限以复制1,请按以下步骤操作:

  • Lock CVS2
  • Copy CVS2 to CVS1
  • 将CVS2复制到CVS1

  • Unlock CVS1

This sounds cumbersome, and it is if you do it manually, but it works. It requires a bit of discipline if you do it manually. May be timezones are on your side for once.

这听起来很麻烦,如果你手动完成,它就可以了。如果你手动完成它需要一些纪律。可能是时区在你身边一次。

I wrote a tool to keep track of who had the commit token and to transfer repositories from one site to another automatically via rsync and SSH. It worked nicely for a couple of years. We never lost any data and it took about 5 minutes to transfer the token from one location to another.

我编写了一个工具来跟踪谁拥有提交令牌,并通过rsync和SSH自动将存储库从一个站点传输到另一个站点。它工作了好几年。我们从未丢失任何数据,将令牌从一个位置转移到另一个位置大约需要5分钟。

The transfer tool was written in perl and it took me about two weeks to develop it, working on it full time.

转移工具是用perl编写的,我花了大约两个星期来开发它,全职工作。

I know that a long time ago FreeBSD developers used CVSup but I never used that tool myself.

我知道很久以前FreeBSD开发人员使用的是CVSup,但我自己从未使用过该工具。

#1


1  

Why isn't switching an option?

为什么不换选项?

I would highly recommend to switch to SVN or git instead. And that you do this conversion as soon as possible... like today :)

我强烈建议切换到SVN或git。并且你尽快做这个转换...就像今天:)

There are even svn tools/guides and git tools/guides out there that will do this CVS conversion for you.

甚至有svn工具/指南和git工具/指南可以为你做这个CVS转换。

I personally use and love SVN for my work, but based on your above description, it sounds like git might be the better option for you.

我个人使用并喜欢SVN用于我的工作,但根据您的上述描述,听起来git可能是更适合您的选择。

#2


1  

Here is what I have done a long time ago in similar circumstances when bandwidth and unreliable networks were an issue:

这是我很久以前在带宽和不可靠网络成为问题的类似情况下所做的事情:

  • Make a copy of the repository and install it in the remote location. You know have CVS1 and CVS2.
  • 制作存储库的副本并将其安装在远程位置。你知道有CVS1和CVS2。

  • Lock one of the two copies (CVS1) by preventing commits. This is achieved by modifying 'commitinfo' in the CVSROOT module.
  • 通过阻止提交来锁定两个副本之一(CVS1)。这是通过修改CVSROOT模块中的'commitinfo'来实现的。

  • CVS1 can be used for updates only
  • CVS1只能用于更新

  • CVS2 can be used for updates and commit
  • CVS2可用于更新和提交

When you want to give access in commit to copy 1, proceed as follows:

如果要在提交中提供访问权限以复制1,请按以下步骤操作:

  • Lock CVS2
  • Copy CVS2 to CVS1
  • 将CVS2复制到CVS1

  • Unlock CVS1

This sounds cumbersome, and it is if you do it manually, but it works. It requires a bit of discipline if you do it manually. May be timezones are on your side for once.

这听起来很麻烦,如果你手动完成,它就可以了。如果你手动完成它需要一些纪律。可能是时区在你身边一次。

I wrote a tool to keep track of who had the commit token and to transfer repositories from one site to another automatically via rsync and SSH. It worked nicely for a couple of years. We never lost any data and it took about 5 minutes to transfer the token from one location to another.

我编写了一个工具来跟踪谁拥有提交令牌,并通过rsync和SSH自动将存储库从一个站点传输到另一个站点。它工作了好几年。我们从未丢失任何数据,将令牌从一个位置转移到另一个位置大约需要5分钟。

The transfer tool was written in perl and it took me about two weeks to develop it, working on it full time.

转移工具是用perl编写的,我花了大约两个星期来开发它,全职工作。

I know that a long time ago FreeBSD developers used CVSup but I never used that tool myself.

我知道很久以前FreeBSD开发人员使用的是CVSup,但我自己从未使用过该工具。