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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
97
Release early and Release often
adelcambre
2
560
Other Decks in Programming
See All in Programming
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
160
AIが無かった頃の素敵な出会いの話
codmoninc
1
280
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
0
630
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
440
FDEが実現するAI駆動経営の現在地
gonta
2
240
5分で問診!Composer セキュリティ健康診断
codmoninc
0
700
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
0
120
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.8k
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
140
Claude Team Plan導入・ガイド
tk3fftk
0
240
Android CLI
fornewid
0
190
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
260
Featured
See All Featured
A Soul's Torment
seathinner
6
3.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
230
Accessibility Awareness
sabderemane
1
160
Documentation Writing (for coders)
carmenintech
77
5.4k
A designer walks into a library…
pauljervisheath
211
24k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
420
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
230
Thoughts on Productivity
jonyablonski
76
5.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
WCS-LA-2024
lcolladotor
0
770
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/