EMule
eMule is a free peer-to-peer file sharing application for Microsoft Windows. Started in May 2002 as an alternative to eDonkey2000, eMule connects to both the eDonkey network and the Kad network. The distinguishing features of eMule are the direct exchange of sources between client nodes, recovery of corrupted downloads, and the use of a credit system to reward frequent uploaders. eMule transmits data in zlib-compressed form to save bandwidth.
eMule is written in C++ using the Microsoft Foundation Classes. Since July 2002 eMule has been free software, released under the GNU General Public License; which has led to eMule's codebase being used as the basis of cross-platform clients aMule, JMule, xMule, along with the release of eMule modifications of the original eMule.
it is the fifth most downloaded project on SourceForge, with over 693 million downloads.
Development was later restarted by the community as eMule Community.
History
The eMule project was started on May 13, 2002 by Hendrik Breitkreuz who was dissatisfied with the original eDonkey2000 client. Over time more developers joined the effort. The source was first released at version 0.02 and published on SourceForge on July 6, 2002.eMule was first released as a binary on August 4, 2002 at version 0.05a. The 'Credit System' was implemented for the first time on September 14, 2002 in version 0.19a. The eMule project website started up on December 8, 2002.
Versions v0.40+ of eMule added support for the Kad network. This network has an implementation of the Kademlia protocol, which does not rely on central servers as the eDonkey network does, but is an implementation of a distributed hash table.
Also added was the ability to search using unicode, allowing for searches for files in non-Latin alphabets, and the ability to search servers for files with complete sources of unfinished files on the eDonkey network.
A "Bad source list" was added. The application adds an IP address to this list after one unsuccessful connection. After adding an IP to the "Bad source list", the application treats this IP as a "dead" IP. Unavailable IPs are banned for a time period from 15 to 45 minutes.
Other additions include: the ability to run eMule from a user account with limited privileges, and AICH.
The 0.46b version added the creation and management of "eMule collection" files, which contain a set of links to files intended to be downloaded as a set.
From 2007, many ISPs have used bandwidth throttling for usual P2P ports, resulting in slow performances. The 0.47b version adds protocol obfuscation and eMule will automatically select two port numbers at random in the startup wizard.
Basic concepts
Each file that is shared using eMule is hashed as a hash list comprising separate 9500 KiB chunks using the MD4 algorithm. The top-level MD4 hash, file size, filename, and several secondary search attributes such as bit rate and codec are stored on eD2k servers and the serverless Kad network.Users can search for filenames in the servers/kad and are presented with the filenames and the unique identifier consisting of the top-level MD4 hash for the file and the file's size that can be added to their downloads. The client then asks the servers where the other clients are using that hash. The servers return a set of IP/ports that indicate the locations of the clients that share the file.
eMule then asks the peers for the file. eMule will then be queued until an upload slot becomes available.
When a complete chunk of 9,728,000 bytes is downloaded and verified, this data is also shared by the downloader, helping others to download the file as well.
It is also possible that a client knows other clients that are also sharing that same file. In that case a source exchange between the clients is made. This exchange of known peers is done directly between the peers.
Newer versions of eMule support AICH. It is meant to make eMule's corruption handling competitive with BitTorrent. SHA-1 hashes are computed for each 180 KiB sub-chunk and a whole SHA-1 hash tree is formed. AICH is processed purely with peer-to-peer source exchanges. eMule requires 10 agreeing peers regarding the SHA-1 hash, so rare files generally do not benefit from AICH.
Low ID
Users who cannot be reached from the outside because they are firewalled, behind a NAT device that has not been correctly port forwarded, or whose IP address ends with a zero get a "Low ID" from the servers. They are still able to upload and download but need the help of servers or other kad clients to be reached by other clients. Since they cannot be notified that they are in front of an upload queue, they have to poll peers if an upload slot is available. Since they cannot connect to any other Low ID clients, they see only 40–60% of the clients that a High ID can see. Their IP/ports are not exchanged between other peers, limiting their possibilities for finding sources via eMule's pure-P2P source exchange.A Low ID client also consumes a lot more data on an eserver than a High ID client due to the lowidcallbacks. Also, a releaser or heavy uploader that uses a releaser mod such as MorphXT or Xtreme that is forced to operate on a Low ID also will find that they will have little control over their upload priorities as the servers appear to limit their connection-forwarding for each client, thus turning their upload queue to a contention situation where the first to be able to get forwarding and find an open slot gets it.
Credit system
Credits are not global; they are exchanged between two specific clients. The credit system is used to reward users contributing to the network, i.e. uploading to other clients. The strict queue system in eMule is based on the waiting time a user has spent in the queue. The credit system provides a major modifier to this waiting time by taking the upload and download between the two clients into consideration. The more a user uploads to a client the faster they advance in this client's queue. The modifiers are calculated from the amount of transferred data between the two clients. The values used can be seen in the client's details dialog. To view this information, right-click on any user and choose View Details.All Clients uploading to a user are rewarded by the credit system. It does not matter if the client supports the credit system or not. Non-supporting clients will grant no credits if uploaded to them. Credits are stored in the clients.met file. The unique user hash is used to identify the client. Credits are saved by the client who owes the credit.
The computation formula for the Official Credit System is composed of two ratios as follows:
Both ratios are then compared and the lower one is used as the modifier. A few conditions exist:
- If the Uploaded Total is less than 1 MB, then the modifier will remain at 1.
- If the client uploads data but doesn't download any, the modifier will be fixed at 10.
- The modifier can only be between 1 and 10.