A Java 15 BitTorrent client using the JADE Multi-Agent Systems (MAS) Framework. It uses the infrastructure provided by the JADE framework as a tracker system that informs the clients the location of files they want to download using the BitTorrent protocol.
Each client is a Java Swing Application that uses the resources provided by the JADE framework to share files between running clients. The JADE server provides all the features to find and exchange pieces of file among the clients. The BitTorrent protocol was implemented following the specifications here.
For more information, refer to this paper (only in Portuguese).
Check some sample torrents inside the src/main/java dir.
The project can be useful just as a proof of concept of Multi-Agent Systems (MAS), once the architecture of MAS using the JADE framework imposes a centralized server to allow the communication between the clients (agents/peers).
Several BitTorrent systems have evolved to a decentralized management architecture that provides more independency, security, scalability and fault-tolerance. This way, the current project doesn’t intend to be a viable BitTorrent client, but only a case study of MAS and JADE framework use.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. For more information, see the license file.
The application cannot be run directly from the IDE or directly from its jar file. If you try to run it, you will receive a message informing how to run the application.
The following steps show how to compile the project, start the JADE server and create several clients/agents in the same machine in order to test the BitTorrent client without needing several computers and network configurations.
Execute the following commands in a terminal of a Unix-based operating system, such as Linux or Mac OS X.
-
Open a terminal in the project’s root folder
-
Compile the project:
mvn package
to generate the project jar file. -
Start the JADE server:
./0-start-server.sh
and wait until the JADE GUI is shown. -
You can use the command
./1-create-clients.sh number-of-clients-to-create
to create several clients/agents at the folderclients
. For instance, executing./1-create-clients.sh 2
will create two clients namedcli1
andcli2
at theclients
folder. As the JADE framework requires that each client/agent has a alias, the scripts consider that when creating and executing a client. -
To run each created client/agent you have to execute the command
./2-exec-client.sh agent-alias
for each client/agent you want to run. For instance, executing./2-exec-client.sh cli1
will run the agent namedcli1
that has to be created previously at the folderclients/cli1
.
To start seeding a file, you have to place the file and its respective torrent in the same directory and add it to a client/agent GUI.