Professional Documents
Culture Documents
Bit Torrent in Erlang
Bit Torrent in Erlang
Overview
Computing History
Computing History
Main Frames
Computing History
Main Frames
Client / Server
Computing History
Main Frames
Client / Server
Computing History
Main Frames
Client / Server
Joe Says:
HTTP vs BitTorrent
BitTorrent is about Content distribution. Some key differences:
HTTP
BitTorrent
Simple
Complex
Stateless
Stateful
One-to-many
Peer-2-Peer
Serial
Concurrent
Upstream bandwidth
heavy
Upstream bandwidth
scales proportionally
with number of
consumers
BitTorrent Idea:
I
I
cC
1. Naming / Identity
2. Discovery
3. Exchange
Naming / Identity
Discovery
Exchange
Exchange
Exchange
Exchange
Sounds familiar?
Efficiency
Efficiency
Efficiency
Etorrent History
Erlang/OTP implementation
8 KSLOCs
Why?
Why?
Why?
Why?
Why?
Performance model!
Why?
Performance model!
Git GitHub
Well-documented
I use the project for code examples all the time (because
everything is in there somewhere)
Building it:
conn_pool_mgr
listen_sup
etorrent_sup
Legend
Torrent
peer_pool
peer_sup
(Send/Recv/Control)
io_sup
file_io_sup
dht
dirwatcher_sup
simple_one_for_one
torrent_sup
piece_mgmt
torrent_pool
one_for_one
one_for_all
tracker
udp_tracker_sup
udp_pool
udp_proto_sup
It is different:
It is different:
I
It is different:
I
Performance
Performance
Tricks employed
No NIFs!
Tricks employed
No NIFs!
Tricks employed
No NIFs!
Tricks employed
No NIFs!
Fight unfair
Often possible!
Fight unfair
Often possible!
Fight unfair
Often possible!
Repository