3 ms·
So why do they write and use jgit at google instead of just git?
by willvarfar 15y ago
So why do they write and use jgit at google instead of just git?
- unwind 15y agoFrom the project page: The original goal of JGit/EGit was to provide an Eclipse plugin for working with software using the Git SCM. The Eclipse plugin is still the main goal of many of the developers, but we are open to anyone wanting to interface with other tools, Netbeans, Ant, Maven etc. For those, the JGit part provides a high performance API for working with Git repositories. The main other user of JGit, besides EGit, is Gerrit Code Review, which used by projects such as JGit (ofcourse), EGit (by implication) and Android. Not sure if that provides a very good motivation, but there you go. :)
- masklinn 15y agoIt's a java library, making it much easier to use from java code than a command-line utility and all the ensuing parsing and munging of string data (which is not java's forte either)
- aurelianito 15y agoAs they wrote at the end of the article: "But, JGit performs reasonably well; well enough that we use internally at Google as a git server." He is not advocating to never use Java. He is just pointing out some things that may or may not be important when choosing a language to write a program.
- tommorris 15y agoThere is a few things that require jgit: a while back, I found a really nice library (I'd look it up, but am on 3G on a train) that let you use Amazon S3 as a git remote. The author had just written some bridge code between jgit and an AWS library. Works suprisingly well, you just have to remember to use `jgit push` rather than `git push`.
- durin42 15y agoBecause cgit is a bunch of binaries that expect to call each other. That makes it harder to abstract out the storage layer, and we don't use vanilla repositories sitting on a filesystem. Things are backed by some other storage abstraction, which isn't always very posix-filesystem like.
- wh-uws 15y agoCan you elaborate on the storage abstraction and the repository setup? Just curious about what advantages there are to make you sacrifice the performance of the cgit binaries. Mostly out of ignorance on the subject.
- axlelonghorn 15y agoThere was a google talk on this posted to HN recently, but I can't find it. In it, one of the directors of the build / testing / code review system at google was talking about how they get things working at scale. Since everyone works out of the HEAD of one Perforce repo, they end up using the map-reduce infrastructure to perform tests in the cloud for each checkout. In line with this, there are too many files, that update too often for every developer to be checking out of the repo, so they use a custom FUSE filesystem to lazily give access to files only when they're needed.
- adpowers 15y agoThat sounds like some of the posts on this blog: http://google-engtools.blogspot.com/ http://google-engtools.blogspot.com/ Also, related to source control but not Git, a few years ago Google had a tech talk about writing a Mercurial storage system on top of BigTable: http://www.google.com/events/io/2009/sessions/MercurialBigTable.html http://www.google.com/events/io/2009/sessions/MercurialBigTa...
- obtu 15y agoDidn't you turn to Dulwich rather than JGit for storage abstraction?