Commit 235ce830 authored by Alexandra's avatar Alexandra

readme

parent 407de852
# Mynij webtorrent tests
## Mynij
Mynij is an experimental offline Web search engine based on [JIO](https://jio.nexedi.com/) and [Flexsearch](https://flexsearch.net/). The long term goal of Mynij is to provide relevant and accurate search results faster than traditional online Web search engines by relying for search on indices that are personalized for each user.
## Webtorrent
[WebTorrent](https://webtorrent.io/) is a streaming torrent client for node.js and the browser.
WebTorrent is written completely in JavaScript and uses WebRTC for peer-to-peer transport whenever possible. No browser plugins, extensions, or installation is required to use WebTorrent in your browser.
## How Mynij uses Webtorrent
Creating an index can be a long and tedious process for the user, which is why providing ready-made indices and allowing users to share their own is at the core of Mynij. However, copyright legislation, censorship and other legal complexities make it impossible for Mynij to maintain indices on a server.
WebTorrent is an elegant solution that circumvents this problem : users can share as they please, without putting themselves or Mynij at risk.
## The tests
The tests are ran using [Puppeteer](https://github.com/puppeteer/puppeteer), a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol.
The test sequence is as follows :
* Create 1 seed browser and some leech browsers
* Import an index into the seed browser (a few test indices are provided, any exported Flexsearch index works)
* Evaluate the number of items and number of results for a specific query on the imported index
* Start seeding the index
* For each leech browser :
* Download the index using the provided magnet URL
* Once the download is finished, test the index and compare results to those of the seed browser to verify integrity
## How to run
* Install dependencies :
* [Nodejs](https://nodejs.org/en/about/)
* [Puppeteer](https://github.com/puppeteer/puppeteer)
* Everything else should be included in the node modules
* Run `node test_webtorrent.js` with appropriate options :
* -l : number of leech browsers to create (required)
* -i : path to test index (required)
* -s : search terms to test index with (required)
* -v : verbose, will log all messages sent by browsers (optional)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment