Just looking at http://github.com/mojombo/grit
Curious, if grit is on a web server, and the git repositories are on another, will this still work or it HAS to be on the same server? Or does it use remoting somehow?
Just looking at http://github.com/mojombo/grit
Curious, if grit is on a web server, and the git repositories are on another, will this still work or it HAS to be on the same server? Or does it use remoting somehow?
It seems like you want to have git repos on server B and have an interface for it like codaset or github on server A. The developer of Codaset does what I think you are looking for, read his blog post: http://codaset.com/codaset/codaset/blog/quiet-at-the-front-but-busy-at-the-back
All implementations (and part implementations, part wrappers, part interfaces) to Git should be able to talk to each other, be it C git, JGit (in Java), Grit (in Ruby), Git-Sharp / Git# (in C#) or Dulwich (in Python), independently of what implementation is used on server and what implementation is used on client. The same is true (perhaps to lesser extent) with different implementations working on the same repository.
If it isn't true, it is a bug in the implementation of Git (the original version in C being reference implementation).
It has to be on the same server. If you look at the documentation then you'll see that the Repo
constructor accepts a local file path:
repo = Repo.new("/Users/tom/dev/grit")
At GitHub (where grit was developed and is extracted from) we use Grit on both the frontend where the web application is run and on the backends where the git repositories are. We patch Grit to make every call to the Grit::Git functions (where all of the actual file access is contained) over BERT-RPC to the appropriate backend instead of executing the code locally. The file path passed to the Grit initializer is the path on the backend server in that case. So the raw repository access is done by ruby handlers running Grit on the backend servers, while the rest of the Grit namespace (Grit::Commit, Grit::Diff, etc) is run on the frontends. It's actually pretty cool. At GitHub we run something like 300mil RPC calls a month through this system.
If you want to learn more about BERT-RPC, check out Toms talk at RubyConf : http://rubyconf2009.confreaks.com/19-nov-2009-10-25-bert-and-ernie-scaling-your-ruby-site-with-erlang-tom-preston-werner.html