Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] JGit backup & synchronization

Folks,

We've done an initial prototype of an app that uses JGit, and we're really excited about it.  We're investigating availability and performance, and we're trying to sort out some questions related to that.  In particular:

(1) What's the recommended approach to backing up a repository that's being used by JGit?  Based on some threads from Stack Overflow [1], it seems like the "right" way is to use "bundle" to create snapshots, which seems to be supported in JGit through org.eclipse.jgit.transport.BundleWriter.  Does this sound about right?

(2) The JGit Repository is thread-safe, so it seems like our app could support multiple threads interacting with the same repository.  But it seems like there's still just one working directory (meaning our multiple threads would have to confine themselves to working with the repository).  Is that true?

(3) Is it ever safe to have multiple *processes* using the same repository?  I'm thinking of two scenarios: (a) a user using command-line git at the same time our app is using JGit, and/or (b) two app processes with a shared disk.  Are there any provisions in JGit to allow this sort of thing, or is it strictly one-process-per-repo?

Thanks in advance for your answers.

Ed

[1] http://stackoverflow.com/questions/2129214/backup-a-local-git-repository


Back to the top