Key-value storage with torrent-like capabilities.
Let's say we have master node A and following nodes Bx
A: Insert key K1 with value V1 into table T1
... <magic happens> ...
B1: Received K1-V1 from A
B2: Received K1-V1 from B1
...
B10: Received K1-V1 from B5
Group of peers create swarm around the table and can leech data from each other.
Trident is based on Iroh, the library for replicating key-value stream over open set of peers in the Internet.
author
- entity, identified by its key and allowed to read and/or write to tabletable
- an ordered key-value storage that may be replicatedkey
- any valid UTF8 stringvalue
/file
/blob
- any bytestable ticket
- unique string allowing anyone in the Internet to start replication of table to its instance of Trident
mkdir trident
docker pull izihawa/trident:latest
docker run izihawa/trident:latest generate-config /trident > trident/config.yaml
docker run -it -p 7080:80 -v $(pwd)/trident:/trident izihawa/trident:latest serve --config-path /trident/config.yaml
curl -H "Content-Type: application/json" -X POST "http://127.0.0.1:7080/tables/document/import/" \
--data '{"ticket": "<table_ticket>", "storage": "default", "download_policy": {"EverythingExcept": []}}'
Force syncing may be required to download the blobs that have been added by other nodes to the table before import.
curl -H "Content-Type: application/json" -X POST --data '{"download_policy": {"EverythingExcept": []}, "threads": 32}' "http://127.0.0.1:7080/tables/my_table/sync/"
curl "http://127.0.0.1:7080/tables/my_table/"
Force syncing may be required to download the blobs that have been added by other nodes to the table before import.
curl "http://127.0.0.1:7080/tables/my_table/<key_name>/"