• Stars
    star
    1,013
  • Rank 45,193 (Top 0.9 %)
  • Language
    C
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Distributed search engines using BitTorrent and SQLite

TorrentNet

Distributed search engines using BitTorrent and SQLite

About

Distributed sites have gained much attention lately with systems such as ZeroNet and IPFS, which seem to improve on older systems like Freenet.

Building search engines on top of these distributed systems is not quite feasible yet as users need to download the entire site database (usually several hundreds of gigabytes large) before running queries against it.

TorrentNet allows you to build distributed search engines by leveraging the BitTorrent network and the SQLite database. Users do not have to wait until the site is fully downloaded before they can query it.

How?

Site owners create an SQLite database (.db file) and create a torrent from this file. They then proceed to seed this torrent -- just like they would seed any other file.

Site users then start downloading the site torrent, but, rather than downloading pieces of the torrent in "rarest first" order, they download pieces based on the search query they performed.

In other words, given a search query such as "indiana jones", TorrentNet knows to download pieces of the torrent where data for "indiana jones" is likely to be stored at.

Hence, results are given to users in a timely manner, without having to wait until the entire database is downloaded.

Furthermore, since search queries are just regular torrent piece downloads, a search query can be satisfied by many different peers in a swarm, effectively allowing for distributed search engines.

Main features

Distributed torrent sites, queryable on demand by prioritizing specific piece downloads.

  • Create distributed torrent sites accessible via your public key (eg. 33cwte8iwWn7uhtj9MKCs4q5Ax7B) that are shared and kept alive using the BitTorrent network.

  • Update your site using the Mutable Torrents extension (BEP46) and let your users know about site updates via the DHT network.

  • Build interactive sites that are queryable on demand using the sqltorrent technique. Things like search engines, or complex browsable experiences are possible.

Pros & cons

  • Pros
    • Hosting your site is as simple as seeding a torrent. No need to buy a domain name or a hosting server. You can easily host your torrent site on your home network and let users visiting your site help you with the hosting.
    • Since you control your address (public key), which is broadcast via the DHT, it's much harder for governments and institution to block the content you're sharing.
    • Via sqltorrent you drive your users experience by letting them only downloading pieces of the torrent that are relevant to the users' interaction. Essentially you could create a search engine, and program interactions so that submissions of a search form result in queries to the underlying SQLite database - which prioritizes pieces based on the query.
  • Cons
    • Read only sites for now. ZeroNet seems to have a solution to this problem but I'm not convinced yet.
    • Your site doesn't have a pretty name. Sharing your public key can be much harder than sharing the name of a DNS site.
    • No standards for doing distributed sites. Many different solutions (IPFS, ZeroNet, Freenet, etc..). TorrentPeek at least follows most of the BitTorrent specifications (using the powerful libtorrent library) and provides unique SQL querying capabilities.

sqltorrent

By putting an SQLite database file (.db) inside a torrent, we can query its content -- by prioritizing pieces based on the SQL query -- and quickly peek at the content of the database without downloading it entirely.

TorrentPeek was inspired by sqltorrent.

A video is worth 1000 words: https://www.youtube.com/watch?v=EKttt8PYu5M&feature=youtu.be

Install

This currently only works on Mac OS X.

Simply npm install and then run node index.js file.torrent ~/save_folder/ 8080, where the last one is the port of the UI it will lunch the app in. Make sure that file.torrent contains an SQLite database or else this wont work.

More Repositories

1

peer-tweet

Decentralized feeds using BitTorrent's DHT. Idea from Arvid and The_8472 "DHT RSS feeds" http://libtorrent.org/dht_rss.html
JavaScript
880
star
2

next-13-layout-transitions

TypeScript
161
star
3

apejs

A tiny JavaScript web framework targeted for Google App Engine
JavaScript
152
star
4

redux-statecharts

Redux statecharts
JavaScript
123
star
5

hckr.it

Hacker News clone for CouchDB
JavaScript
99
star
6

node-trello

Node wrapper for Trello's HTTP API.
JavaScript
98
star
7

redux-tdd

Redux TDD: Dot-chaining syntax for doing TDD with redux by composing unit tests as if they were integration tests
JavaScript
94
star
8

dmt

Decentralized Mutable Torrents reference implementation
JavaScript
75
star
9

behavioral

Behavioral Programming for JavaScript
JavaScript
73
star
10

react-behavioral

#BehavioralProgramming for React
JavaScript
55
star
11

ldstatic

Host your Linked Data for free, as static pages, using a variety of providers (GitHub Pages, Google Code, Google Drive, etc.), and run SPARQL queries using a basic Linked Data Fragment client.
JavaScript
18
star
12

void-graph

VoID Linked Data graph diagram displayed using JavaScript and SVG
JavaScript
17
star
13

access2couch

A command-line utility for Windows, that pushes a MS Access database to a CouchDB instance. Written in Node.js
JavaScript
10
star
14

waku-page-transitions

Framer motion page transitions with Waku React Server Components
TypeScript
7
star
15

restpark

Minimal RESTful API for querying RDF triples
CSS
7
star
16

redux-behavioral

Behavioral Programming for Redux
JavaScript
6
star
17

behavioral-programming-talk

Behavioral Programming talk at ReactJS day #BehavioralProgramming
5
star
18

jquery-report

Allows you to visualize an HTML Table out of JSON
JavaScript
5
star
19

bitcoin-notify

Notify when new places accepting Bitcoin have been added to OpenStreetMap
JavaScript
4
star
20

blogger-skeleton

Having troubles with creating Blogger themes? I created this skeleton to get you started.
4
star
21

genebanks

Genebanks Linked Data!
JavaScript
3
star
22

seed-couchapp

Couchapp for http://seeds.iriscouch.com/
JavaScript
2
star
23

grinfo-tumblr

A tumblr theme based on Twitter Bootstrap
2
star
24

middleend

some middleend!
PHP
2
star
25

smark

Create beautiful presentation slides with Markdown
JavaScript
2
star
26

seed-scraper

scrape genebanks websites for accession data
JavaScript
2
star
27

linked-data-node

A Linked Data frontend for SPARQL endpoints written in Node.js
JavaScript
2
star
28

romajs

JavaScript User Group & Meetup Roma -> https://plus.google.com/communities/114324393897443067092
JavaScript
2
star
29

json-compressor

Removes whitespace and JavaScript-style comments from a JSON string.
JavaScript
1
star
30

mealo

this is personal stuff! leave now!
JavaScript
1
star
31

kudos

something interesting p2p
JavaScript
1
star
32

ascetica-ines

PHP
1
star
33

resume

my resume :)
CSS
1
star
34

bttrkr

JavaScript
1
star
35

slides

My slides
TeX
1
star
36

human

A little irc bot that loads some data
JavaScript
1
star
37

seedhub

a seedhub is a seedhub no?
JavaScript
1
star
38

grinfo.net

Site for bio-informatics
JavaScript
1
star
39

mustache-rdf

Mustache RDF. Templating for RDF
1
star
40

romapingpong

Rome ping pong
JavaScript
1
star
41

finland-talk

https://lmatteis.github.io/finland-talk
1
star
42

selectjs-api

Documentation for the selectjs.com api
1
star
43

human-chiglug

Couchapp for http://chiglug.tk that shows data generated by the *human* bot
JavaScript
1
star
44

milu

An italian cooking site
JavaScript
1
star
45

waku-infinite-scroll

TypeScript
1
star