Hasty Briefsbeta

Bilingual

I taught a bucket to speak git | Tigris Object Storage

11 hours ago
  • The author taught a bucket to function like a filesystem using billy, an abstraction originally for go-git, enabling git operations on object storage.
  • Git repositories consist of objects, trees, commits, and refs; objects are content-addressed and append-only, fitting Tigris object storage well.
  • Storing git repos on single machines creates stateful services and potential failures; GitHub's scale forces reliance on mounted filesystems.
  • Alternatives like shelling out to git binary, libgit2, or libgit2 have limitations (e.g., process death, GPL issues, or local filesystem assumptions).
  • go-git, a pure Go library, doesn't depend on local filesystems, allowing objgit to work with Tigris via billy's interface.
  • Objgit successfully supports push/pull over HTTP, git://, and SSH, with repositories created on first push and metrics for optimization.
  • Key challenges included: lack of atomic rename in object storage (solved by Tigris's RenameObject), pack file buffering, and excessive stat() calls during pushes.
  • Performance issues were addressed by caching immutable pack files locally and fixing a recursive listing cache to reduce ListObjectsV2 calls.
  • Post-receive hooks run in sandboxed environments (kefka) with limited access, enabling CI-like actions without network or host filesystem.
  • Future plans include CI integration, a web UI, and performance improvements, emphasizing a stateless git server on object storage.