IPFS Nodes Behavior Project is a comprehensive demonstration of networking capabilities using the Helia library. Helia provides a powerful networking layer that facilitates peer-to-peer communication and file transfer. This project showcases the creation of nodes, establishment of connections, addition of files, and data transfer between nodes in a distributed network.
To use the IPFS Nodes Behavior Project, follow these installation steps:
- Ensure you have Node.js installed on your system.
- Clone the repository from GitHub:
git clone https://github.com/L1ZLe/IPFS-nodes-behavior.git
- Navigate to the project directory:
cd IPFS-nodes-behavior
- Install the required dependencies using npm:
npm install
To utilize the IPFS Nodes Behavior Project for creating and managing a distributed network, follow these steps:
- Run the provided code in
index.js
using Node.js:
node index.js
-
Upon execution, the code will create three nodes (A, B, and C) in the network.
-
The nodes will establish connections with each other, allowing for seamless communication.
-
Files can be added to any node using the provided UnixFS instance.
-
Data transfer between nodes can be initiated to share files and information across the network.
Nodes can be connected using various network architectures:
- Star Topology: Connect all nodes to a central node (Node A) forming a star-like structure.
- Mesh Topology: Connect each node to every other node, creating a fully interconnected network.
- Ring Topology: Connect nodes in a circular manner, where each node is connected to exactly two other nodes.
- Hybrid Topology: Combine multiple network architectures to suit the requirements.
After establishing connections between nodes, you can access files stored on other nodes. Here's how it works:
- Node A to Node B File Access: Node A can access files stored on Node B by initiating a request through the established connection.
- Node B to Node C File Access: Similarly, Node B can access files stored on Node C by utilizing the existing network connection.
- Node C to Node A File Access: Node C can access files stored on Node A by traversing through the network topology, leveraging the interconnected nodes.
In a star topology, Node A acts as the central hub, connecting to Nodes B and C. This architecture facilitates centralized file access and management.
In a mesh topology, all nodes (A, B, and C) are interconnected, allowing for direct communication and file sharing between any pair of nodes.
In a ring topology, Node A is connected to Node B, Node B is connected to Node C, and Node C is connected back to Node A, forming a closed loop. This architecture ensures redundancy and fault tolerance.
A combination of various topologies can be employed based on specific requirements. For example, combining a star and mesh topology can provide centralized control along with decentralized communication channels.
Contributions are welcome. If you have any suggestions, improvements, or bug fixes, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
This README provides a detailed overview of the project, including explanations on network architectures and file access between nodes.
For any questions, issues, or assistance contact me at oundel.store@gmail.com or open an issue on GitHub.