Giter Site home page Giter Site logo

ssb-ebt-fork-staltz's Introduction

ssb-ebt

Adapter for epidemic-broadcast-trees to secure-scuttlebutt

testing/debugging

There are several scripts in ./debug which I used for testing ebt replicaiton.

use ./debug/remote.js <address> to connect to an sbot running ebt and replicate. Running this won't store anything locally, it will just download everything drop it on the floor. This is used to test performance of ebt on a server.

I normally see values between 2k and 3k messages per second, that replicates 100k messages in under a minute.

api

ebt.block (from, to, blocking)

blocks a peer and disallows them from connecting. They are also removed from peers, so there is no connecting to them. Also disallows peers to pass on data to them.

ebt.replicate (opts)

creates a duplex replication stream to the remote peer. when two peers connect, the peer who initiated the call (the client) should call this. It is not intended to be called by the user.

ebt.request (feedId, toReplicate)

request that feedId be replicated. toReplicate is a boolean, replicate feed if true. If set to false, replication is immediately stopped.

ebt.peerStatus (id, cb)

query the status of replication for a given feed id. returns a small data structure showing the replication state for all peers we are currently connected to.

output looks like this:

{
  "id": "@EMovhfIrFk4NihAKnRNhrfRaqIhBv1Wj8pTxJNgvCCY=.ed25519",
  "seq": 13293, //the sequence we have locally.
  "peers": {
    //where each of these peers are up to:
    "@TRE4lNNXrtx3KK9Tgks2so2PjCP6w9tRvsy7wyqiyo4=.ed25519": {
      "seq": 13293, //the sequence this peer has acknowledged, we definitely know they have this number.
      "replicating": {
        "tx": true,
        "rx": true,
        "sent": 13293, //the sequence we have sent to this peer. They _probably_ have this, but not gauranteed.
        "requested": 13293 //the sequence we requested from this peer
      }
    },
    "@h1fDsZgwBtZndnRDHCFV84TMZYl16m3zhyTTQsE/V94=.ed25519": {
      "seq": 13293,
      "replicating": {
        "tx": true,
        "rx": false,
        "sent": 13293,
        "requested": 13293
      }
    }
  }
}

License

MIT

ssb-ebt-fork-staltz's People

Contributors

arj03 avatar christianbundy avatar dominictarr avatar mixmix avatar mmckegg avatar

Watchers

 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.