Transcript eMule (10)

eMule behind the
scenes
1
Overview
File sharing network
 Extends the eDonkey protocol
 Several hundreds of eMule servers
 3-5 Millions of eMule clients
 Each server is an independent centralized
indexing service and does not store any
files

2
eMule Client
Preconfigured with a list of servers and a
list of shared files
 Uses a single TCP connection for logging
into the network
 Uses several TCP connections to upload/
download files to/from other clients

3
Client to Server Connection

Upon startup the client connects using TCP to a single
eMule server






Receives a client ID that is valid only through the connection
lifetime
Sends its list of shared files
Sends its download list
Receives a download sources lists
The connection is kept open during all the client’s
session
After establishment


Further search queries can be made and replied with sources list
A filename query is answered with a set of matching sources
4
Client to Client Connection




An eMule client connects to another client (source) in
order to download a file
Files are fragmented and clients may download
fragments of the same file from several sources
concurrently
When two clients connect the uploading client serves the
downloading client or adds it to its downloading queue
When a downloading client reaches the top of the queue
of an uploading client the uploading client initiates a
connection in order to send him the needed fragments
5
High Level Network Diagram
6
Data Transfer




Compressed to save bandwidth
When a part download completes, compute and
compare its hash against the source
In case of a mismatch, blocks are downloaded
one by one until the corruption is corrected
When a complete chunk of 9500 kilobytes is
downloaded and verified this data is also shared
by the downloader
7
Client ID




A client can receive a low-id or a high-id
A low-id is assigned if the server fails to initiate a
TCP connection to the client
Low-id restricts the clients use of the network
High-id is based on the client IP address and will
remain constant as long as the IP address does
not change
8
Call back Mechanism
Allows high-id clients to utilize low-id
clients in case they are connected to the
same server
 The server sends the low-id client the
high-id client’s IP address
 The low-id client then initiates a TCP
connection to the high-id client and serve it

9
Credit System
A local “tit-for-tat” mechanism to
encourage uploads
 A downloading client may identify itself
upon clients connection establishment
through a simple RSA challenge response
 Clients records the upload/download ratio
for other clients and promote friendly
clients in their queues

10