- In order to access the servers from a outside network, used ports (see
docker-compose.yml) needs to be forwarded. - Since the socket is running on a separate port, the peers that will collaborate should be added to the whitelist.
- For this project, the socket port should be YaCy port + 100.
- There is no check for packet loss or loss of data during the model transmission. This is a future work.
- Due to docker implementation, config support is currently changed with env variables. Update config module so that if there are no env variables use the config file instead.
- Python Version: 3.12.x
- Docker
- Download the
docker-compose.ymlfile or clone the repository. - Change your working directory to the folder where the
docker-composefile is. - In your router settings, go to port forwarding and forward the ports that your YaCy peer is running in and the socket port (YaCy port + 100)
- Run
docker-compose up - In your browser go to
localhost:4000
First, clone the repository to your local machine using git:
git clone https://github.com/damla-jpg/yacy_cf_backendChange your working directory to the project's folder:
cd yacy_cf_backendCreate a virtual environment to manage dependencies:
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`Install the required Python packages:
pip install -r requirements.txtEnsure Docker is installed and running on your system. Build and run the Docker container for YaCy:
docker build -t yacy .
docker run -d -p 8090:8090 yacyForward the necessary ports to allow external network access. Ensure that the socket port of each peer is known to other peers.
Ports to be forwarded:
- Yacy port
- Socket Port
Execute the main application script:
python main.pyOnce the setup is complete and the application is running, you can access the predictions by making a GET request to the following URL:
http://localhost:[FLASK_PORT]/api/fetch_predictions
Replace [FLASK_PORT] with the actual port number specified in your configuration.
To see the collaborative filtering algorithm in action, follow these steps:
-
Install and Run the Front-End Interface:
-
Clone the front-end repository from GitHub:
git clone https://github.com/damla-jpg/yacy_cf_integration
-
Navigate to the front-end directory:
cd yacy_cf_integration -
Install the necessary dependencies:
npm install
-
Start the front-end application:
npm start
-
-
Access the Front-End Interface:
- Open your web browser and navigate to the address provided by the front-end application (usually
http://localhost:3000).
- Open your web browser and navigate to the address provided by the front-end application (usually
By following these steps, you'll be able to interact with the front-end interface and observe the collaborative filtering algorithm in real-time.
To configure peers for collaborative filtering, add them to your whitelist.
Logs are generated to help monitor the application's performance and to troubleshoot any issues. Logs can be found in the logs directory.
- Socket Integration: Integrate socket port configuration directly into YaCy for seamless peer communication.
- Packet Loss Detection: Implement mechanisms to detect and handle packet loss during model transmission.
- Whitelist Configuration: Once integrated into YaCy, the need for a whitelist will be eliminated.
We welcome contributions from the community. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a new Pull Request.
For any questions or support, please open an issue on the GitHub repository or contact the project maintainers directly at damlaural@gmail.com .
Thank you for using and contributing to the Collaborative Filtering Integration to the YaCy Decentralized Search Engine.
- Collabrative Filtering Algorithm that has been used and altered in this project is from Krishna Shukla and can be found from
https://gitlab.com/ucbooks/dht/-/tree/main?ref_type=heads