All Projects → orbitdb → Ipfs Log

orbitdb / Ipfs Log

Licence: mit
Append-only log CRDT on IPFS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ipfs Log

Orbit Db
Peer-to-Peer Databases for the Decentralized Web
Stars: ✭ 6,381 (+2272.12%)
Mutual labels:  crdt, p2p, ipfs
Peer Pad
📝 Online editor providing collaborative editing in really real-time using CRDTs and IPFS.
Stars: ✭ 564 (+109.67%)
Mutual labels:  crdt, p2p, ipfs
Berty
Berty is a secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network
Stars: ✭ 5,101 (+1796.28%)
Mutual labels:  crdt, p2p, ipfs
Y Ipfs Connector
Y.js connector over IPFS
Stars: ✭ 49 (-81.78%)
Mutual labels:  crdt, p2p, ipfs
pop
Run a point-of-presence within Myel, the community powered content delivery network.
Stars: ✭ 28 (-89.59%)
Mutual labels:  ipfs, p2p
go-multiverse
Decentralized Version Control System
Stars: ✭ 76 (-71.75%)
Mutual labels:  ipfs, p2p
viddist
[not functional] A completely decentralized alternative to e.g. YouTube
Stars: ✭ 22 (-91.82%)
Mutual labels:  ipfs, p2p
godless
Peer-to-peer lite database over IPFS
Stars: ✭ 72 (-73.23%)
Mutual labels:  ipfs, crdt
Gun
An open source cybersecurity protocol for syncing decentralized graph data.
Stars: ✭ 15,172 (+5540.15%)
Mutual labels:  crdt, p2p
field-manual
The Offical User's Guide to OrbitDB
Stars: ✭ 178 (-33.83%)
Mutual labels:  ipfs, p2p
awesome-orbitdb
Useful resources for using OrbitDB and building projects on it
Stars: ✭ 87 (-67.66%)
Mutual labels:  ipfs, p2p
dynamic-data-and-capabilities
[ARCHIVED] Dynamic Data and Capabilities in IPFS Working Group
Stars: ✭ 57 (-78.81%)
Mutual labels:  ipfs, crdt
Redwood
A highly-configurable, distributed, realtime database that manages a state tree shared among many peers.
Stars: ✭ 218 (-18.96%)
Mutual labels:  crdt, p2p
rdoc
Conflict-free replicated JSON implementation in native Go
Stars: ✭ 76 (-71.75%)
Mutual labels:  p2p, crdt
Peer Base
Build real-time collaborative DApps on top of IPFS
Stars: ✭ 208 (-22.68%)
Mutual labels:  crdt, ipfs
ipvpn
[WIP] Easy-to-use decentralized secure overlay private network (for any device)
Stars: ✭ 24 (-91.08%)
Mutual labels:  ipfs, p2p
mute-structs
MUTE-structs is a Typescript library that provides an implementation of the LogootSplit CRDT algorithm.
Stars: ✭ 14 (-94.8%)
Mutual labels:  p2p, crdt
meanOs
Mean Operating System - The first decentralized, artificially intelligent, MEAN.js stack, operating system. Mean OS is the only operating system hosted anonymous using a P2P network and a suite of non-standard in-browser delivery mechanisms. Mean OS proudly supports Brave and Tor, be free!
Stars: ✭ 62 (-76.95%)
Mutual labels:  ipfs, p2p
js-http-client
[DEPRECATED] Official Textile JS HTTP Wrapper Client
Stars: ✭ 29 (-89.22%)
Mutual labels:  ipfs, p2p
orbit-core
Orbit communication protocol and library
Stars: ✭ 70 (-73.98%)
Mutual labels:  ipfs, p2p

ipfs-log

npm CircleCI Status Gitter Matrix Discord

An append-only log on IPFS.

ipfs-log is an immutable, operation-based conflict-free replicated data structure (CRDT) for distributed systems. It's an append-only log that can be used to model a mutable, shared state between peers in p2p applications.

Every entry in the log is saved in IPFS and each points to a hash of previous entry(ies) forming a graph. Logs can be forked and joined back together.

The module works in Node.js and Browsers.

           Log A                Log B
             |                    |
     logA.append("one")   logB.append("hello")
             |                    |
             v                    v
          +-----+             +-------+
          |"one"|             |"hello"|
          +-----+             +-------+
             |                    |
     logA.append("two")   logB.append("world")
             |                    |
             v                    v
       +-----------+       +---------------+
       |"one","two"|       |"hello","world"|
       +-----------+       +---------------+
             |                    |
             |                    |
       logA.join(logB) <----------+
             |
             v
+---------------------------+
|"one","hello","two","world"|
+---------------------------+

Table of Contents

Background

IPFS Log has a few use cases:

  • CRDTs
  • Database operations log
  • Feed of data
  • Track a version of a file
  • Messaging

It was originally created for, and currently used in, orbit-db - a distributed peer-to-peer database on IPFS.

Requirements

  • Node.js v8.6.0 or newer (uses ... spread syntax)
  • Preferably you should use an LTS version of node.js (even numbered 8, 10, etc)

Install

This project uses npm and nodejs.

npm install ipfs-log

Usage

See the API documentation and examples for more details.

Quick Start

Install dependencies:

npm install ipfs-log ipfs

Run a simple program:

// For js-ipfs >= 0.38

const Log = require("ipfs-log");
const IdentityProvider = require("orbit-db-identity-provider");
const IPFS = require("ipfs");

const start = async () => {
  const identity = await IdentityProvider.createIdentity({ id: "peerid" });
  const ipfs = await IPFS.create({ repo: "./path-for-js-ipfs-repo" });
  const log = new Log(ipfs, identity);

  await log.append({ some: "data" });
  await log.append("text");
  console.log(log.values.map((e) => e.payload));
};

start();

// [ { some: 'data' }, 'text' ]

Node.js

See examples for details.

If your platforms requires ES5-compatible JavaScript, there's a build in lib/es5/.

Browser

See examples/browser for details.

The distribution package for browsers is located in dist/ipfslog.min.js

If your platforms requires ES5-compatible JavaScript, there's a build in lib/es5/.

API

See API Documentation for full details.

Tests

Run all tests:

npm test

Run tests with js-ipfs only (default):

mocha

Run tests with go-ipfs only:

TEST=go mocha

Benchmarking

To use the benchmark runner:

node --expose-gc benchmarks/runner/index.js -r --grep append-stress --stress-limit Infinity

This will run the append-stress benchmarks until it is canceled. For more information, see the Benchmarking README.

Build

Run the following command before you commit.

make rebuild

This will ensure that dependencies and built files are all based on the current code base.

Benchmarks

There's a benchmark suite in benchmarks/ that can be run with:

node benchmarks/benchmark-append.js
node benchmarks/benchmark-join.js
node benchmarks/benchmark-expand.js

There's append and join benchmarks for browsers in benchmarks/browser/ which you can run by opening the .html files in your browser.

Contribute

If you find a bug or something is broken, let us know! PRs and issues are gladly accepted too. Take a look at the open issues, too, to see if there is anything that you could do or someone else has already done. Here are some things I know I need:

TODO

  • Support for payload encryption

License

MIT © 2016-2018 Protocol Labs Inc., 2016-2019 Haja Networks Oy

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].