Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Git and GitHub at YAPC:Asia
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Andy Delcambre
August 30, 2014
Programming
3.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git and GitHub at YAPC:Asia
Andy Delcambre
August 30, 2014
More Decks by Andy Delcambre
See All by Andy Delcambre
Git, GitHub, Etc
adelcambre
3
260
Systems Programming - SoCoded 2013
adelcambre
2
200
Ruby Systems Programming
adelcambre
4
1.2k
Debugging Production Service Oriented Systems
adelcambre
3
450
Ruby, Rails and Engine Yard - Úll
adelcambre
1
340
SFRuby Nov 2011 - Release Early and Release Often
adelcambre
2
96
Release early and Release often
adelcambre
2
550
Other Decks in Programming
See All in Programming
Inside Stream API
skrb
1
690
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
270
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
210
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
880
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4k
Claspは野良GASの夢をみるか
takter00
0
180
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2k
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
530
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
210
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
230
Mind Mapping
helmedeiros
PRO
1
240
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
30 Presentation Tips
portentint
PRO
1
320
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Prompt Engineering for Job Search
mfonobong
0
340
Paper Plane (Part 1)
katiecoart
PRO
0
8.8k
Transcript
Andy Delcambre sadelcambre
None
YAPC:Asia
I don’t write Perl
I rarely write Perl
Total source lines grouped by language: ! ruby: 316613 (98.99%)
sh: 2268 (0.71%) ansic: 743 (0.23%) perl: 179 (0.06%) python: 31 (0.01%)
None
None
DIRECTED ACYCLIC GRAPH
$ git log commit b3f13c1 Author: Andy Delcambre Date: Thu
Aug 28 08:29 2014 ! Commit 3 ! commit c79e797 Author: Andy Delcambre Date: Thu Aug 28 08:29 2014 ! Commit 2 ! commit 9a42679 Author: Andy Delcambre Date: Thu Aug 28 08:28 2014 ! Initial commit commit b3f13c1 Commit 3 commit c79e797 Commit 2 commit 9a42679 Initial commit HEAD
$ git cat-file -p b3f13c1 tree 9e68447 parent c79e797 author
Andy Delcambre 1409182168 committer Andy Delcambre 1409182168 ! Commit 3 commit b3f13c1 Commit 3 tree 9e68447 commit c79e797 Commit 2 Parent
$ git cat-file -p 9e68447 100644 blob b465ded README.md commit
b3f13c1 Commit 3 tree 9e68447 commit c79e797 Commit 2 Parent blob 9e68447 README.md
$ git cat-file -p b465ded # Test ! A test
repo, for YAPC:Asia. commit b3f13c1 Commit 3 tree 9e68447 commit c79e797 Commit 2 Parent blob 9e68447 README.md # Test ! A test repo, for YAPC:Asia.
GitHub
Hosting a Git repo is Secret: EASY
enzo $ git init --bare demo.git Initialized empty Git repo
in /home/adelcambre/git/demo.git/ ! yt $ git remote add origin adelcambre@enzo:git/demo.git yt $ git push origin master Counting objects: 6, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (6/6), 473 bytes, done. Total 6 (delta 0), reused 6 (delta 0) To adelcambre@enzo:git/demo.git * [new branch] master -> master ! yt $ git clone adelcambre@enzo:git/demo.git Cloning into 'demo'... remote: Counting objects: 6, done. remote: Compressing objects: 100% (2/2), done. remote: Total 6 (delta 0), reused 0 (delta 0) Receiving objects: 100% (6/6), done.
None
yt $ git remote add -f origin
[email protected]
:adelcambre/demo.git Updating origin
From github.com:adelcambre/demo * [new branch] master -> origin/master ! yt $ git push origin master Counting objects: 6, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (6/6), 473 bytes, done. Total 6 (delta 0), reused 6 (delta 0) To https://github.com/adelcambre/demo.git * [new branch] master -> master
None
None
Hosting a *lot* of Git repos is Not so Secret:
HARD
> 7 million repositories
1.5 million pushes
100 million pulls & clones
27 fileservers
100 TB of online storage
None
Grit
1st Commit GitHub 1st Commit Grit
Ruby wrapper around Git
repo = Grit::Repo.new(“grit.git”) ! repo.commits # => [#<Grit::Commit "e80bbd2ce67651aa18e57fb0b43618ad4baf7750">, #<Grit::Commit
"91169e1f5fa4de2eaea3f176461f5dc784796769">, #<Grit::Commit "038af8c329ef7c1bae4568b98bd5c58510465493">, #<Grit::Commit "40d3057d09a7a4d61059bca9dca5ae698de58cbe">, #<Grit::Commit "4ea50f4754937bf19461af58ce3b3d24c77311d9">]
This works for everything! ! (locally)
27 fileservers
Smoke “Grit in the cloud”
The Internet Chimney fs102 fs103 fs104 fs105 … fe102 fe103
fe104 fe105 …
module Smoke def self.install! ::Grit.send(:remove_const, :Git) ! ::Grit.const_set(:Git, Smoke::Git) end
end
ls_tree("HEAD").each do |entry| if entry.blob? load_blob(entry.oid) end end
Death by Round Trip
A condensed (and probably wrong) history of git
Bitkeeper
Git
Shared library?
libgit2
JGit
libgit2 http://github.com/libgit2/libgit2
Rugged http://github.com/libgit2/rugged
Ruby wrapper around libgit2
repo = Rugged::Repository.new("rugged.git") ! repo.last_commit # => #<Rugged::Commit:2227356240 oid: 0277b7df0fea08d5f3fc7177e47527fc24d96a0e>
Perl
Git-Raw https://metacpan.org/release/Git-Raw
None
GitRPC The New Hotness aka
Like Smoke, But Better
Caching
Pluggable Wire Protocols
Encoding Aware
GIT(1) Git Manual GIT(1) ! NAME git - the stupid
content tracker
GIT(1) Git Manual GIT(1) ! NAME git - the stupid
content tracker
Git doesn’t care about encodings
Smoke doesn’t either
GitRPC is encoding aware
Detect and tag as soon as possible
The Switch
class Repository def git Smoke::Repo.new(path) end ! def rpc GitRPC.new(path)
end end
None
Graphite
Graph Every Call Both GitRPC and Smoke
1 Year ago
None
None
None
Where are we today?
None
None
None
Good Progress But not done yet
Finding the Final 0.1%
Backscatter
Call Counting
def git backscatter_measure Smoke::Repo.new(path) end
None
Method Tracing
def git backscatter_trace 20 Smoke::Repo.new(path) end
None
Recap
Run both concurrently
Measure Everything
Use tracing to find the last 0.1%
Andy Delcambre sadelcambre
Further Reading Git for Computer Scientists http://eagain.net/articles/git-for-computer-scientists/ My mom told
me git doesn’t scale https://vimeo.com/64716825 How GitHub uses GitHub to build Github http://zachholman.com/talk/how-github-uses-github-to-build-github/