• Stars
    star
    265
  • Rank 154,577 (Top 4 %)
  • Language
    C
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated almost 9 years ago

Reviews

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

Repository Details

sqltorrent

Sqltorrent is a custom VFS for sqlite which allows applications to query an sqlite database contained within a torrent. Queries can be processed immediately after the database has been opened, even though the database file is still being downloaded. Pieces of the file which are required to complete a query are prioritized so that queries complete reasonably quickly even if only a small fraction of the whole database has been downloaded.

Building

The Visual Studio projects expect Boost and libtorrent to be available in the "boost" and "libtorrent-rasterbar" directories adjacent to the sqltorrent directory. The Boost Build jam file can be configured to build against the installed versions of Boost and libtorrent (the default) or to look for them in the directories indicated by the environment variables BOOST_ROOT and TORRENT_ROOT by setting the use-boost and use-torrent build parameters to source.

Using

WARNING: sqltorrent is currently NOT thread safe. Only one query may be outstanding to any database using sqltorrent.

If your application is using sqlite directly via the C/C++ interface you can call sqltorrent_init(0) to register the VFS. You can then use the VFS by calling sqlite3_open_v2 and passing the path to the .torrent file as the filename and "torrent" as the zVfs name.

If your application is using sqlite via bindings which expose the sqlite3_load_extension function you can use that to load sqltorrent built as a shared library. Because loading an extension at runtime requires an open database, you will need to open an empty in-memory database and use that to load sqltorrent. Once loaded sqltorrent will become the default VFS so any non-torrented databases you want to use must be opened before you load the extension. The in-memory database you use to load sqltorrent must be kept open for as long as you have open databases using sqltorrent.

Creating torrents

Sqltorrent currently only supports torrents containing a single sqlite database file. For efficiency the piece size of the torrent should be kept fairly small, around 32KB. It is also recommended to set the page size equal to the piece size when creating the sqlite database.

More Repositories

1

libutp

uTorrent Transport Protocol library
C++
1,074
star
2

bootstrap-dht

DHT bootstrap server
C++
401
star
3

bittorrent.org

HTML
356
star
4

go-btfs

BTFS - The First Scalable Decentralized Storage System - A Foundational Platform for Decentralized Applications
HTML
231
star
5

btc

Command-line BitTorrent remote control (btc)
Python
153
star
6

scout

Securely locate peers without central servers
C
151
star
7

webui

JavaScript
112
star
8

bencode

Python
75
star
9

libbtdht

C++
38
star
10

Helix

BitTorrent Tracker
C++
32
star
11

okui

An okay OpenGL-based UI framework.
C++
30
star
12

btfs-dashboard

A Client helps users to manage their BTFS nodes
JavaScript
25
star
13

scraps

Useful scraps of C++.
C++
21
star
14

BTIPs

The BTFS Improvement Proposal repository
18
star
15

sync_api_sample

Python
11
star
16

ut-signing-tool

C++
10
star
17

libbtutils

C++
10
star
18

sync_slack

BitTorrent Sync sample integration with Slack
Python
8
star
19

utorrent_help

Utorrent and bittorrent help files
CSS
7
star
20

simon

A tool to judge your code
Python
7
star
21

sitrep

Public-facing status reports for your infrastructure.
Python
7
star
22

librtmp

Ticket #5945
C
6
star
23

tornado-sqs

Python
6
star
24

social

Home of the social media library for Bittorrent Apps
JavaScript
5
star
25

widgets

The Bittorrent Widgets package is a collection of widgets that integrate with the Apps for BitTorrent SDK, and simplify common behaviors.
JavaScript
4
star
26

org.bittorrent.scribble

Clojure library for generating Graphite graph URLs
Clojure
4
star
27

boost_1_44_0

C++
3
star
28

live-build-environments

Build environments for our stuff
Shell
3
star
29

btfs-airdrop

Solidity
3
star
30

generator-btapp

yeoman webapp generator fork for a btapp sites
JavaScript
3
star
31

ipboard_proxy

Ruby
2
star
32

btfs-encryption

Go
2
star
33

jshackle

Helper macros for JNI programming
C++
2
star
34

docker-kubectl

Docker container for kubectl
1
star
35

live-ci-tools

A [small] collection of CI tools
Python
1
star
36

SDL

Fork of SDL with some minor tweaks
C
1
star
37

go-btfs-cmds

Go
1
star
38

cookbook-bt-foo

Ruby
1
star
39

libtommath-test

C
1
star
40

bigcouch-bin

bigcouch binary repo
Python
1
star
41

mongoose-context-protected-plugin

JavaScript
1
star
42

btfs-vault

Cheque protocol of BTFS node
JavaScript
1
star