Giter Site home page Giter Site logo

ssb-discovery-swarm's Introduction

ssb-discovery-swarm

A Scuttlebot plugin that exchanges invites with other sbots in a DHT

Every (internet) sbot which has this plugin installed will look for each other using discovery-swarm (backed by a Distributed Hash Table, DHT) and will exchange invites to follow each other.

Note: this is an experimental plugin and may cause strangers to replicate each other's feeds. The use of a DHT in Scuttlebutt still requires proper consideration and design.

Usage

 const createSbot = require('scuttlebot/index')
   .use(require('scuttlebot/plugins/plugins'))
   .use(require('scuttlebot/plugins/master'))
   .use(require('scuttlebot/plugins/gossip'))
   .use(require('scuttlebot/plugins/replicate'))
   .use(require('ssb-friends'))
   .use(require('ssb-blobs'))
   .use(require('ssb-backlinks'))
   .use(require('ssb-private'))
   .use(require('ssb-about'))
   .use(require('ssb-contacts'))
   .use(require('ssb-query'))
+  .use(require('ssb-discovery-swarm'))
   .use(require('scuttlebot/plugins/invite'))
   .use(require('scuttlebot/plugins/block'))
   .use(require('scuttlebot/plugins/local'))

You can configure the parameters for this plugin through the ssb config object. All parameters are optional and have default values, so manual configuration is not strictly required:

 var config = {
   // ...
+  swarm: {
+    port: 8007, // port to use in the swarm
+    maxPeers: 3, // maximum number of peers to connect with simultaneously
+    prefix: 'ssb-stuff', // id string to use to discover other compatible peers
+  },
   // ...
 }

Install

npm install --save ssb-discovery-swarm

License

MIT

ssb-discovery-swarm's People

Contributors

staltz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.