GithubHelp home page GithubHelp logo

js-bumblebee's Introduction

TypeScript version Node.js version BSD

Bumblebee

Bumblebee is a native javascript proxy that uses bee as the underlying client to the Swarm. The main motivation behind this project is to provide an entry point for an improved developer experience, harnessing the strength of the javascript ecosystem, to create a native javascript implementation of Swarm.

Setup

git clone [email protected]:ethersphere/js-bumblebee && cd js-bumblebee
npm i

Usage

Bumblebee currently proxies the existing bee project, using only the chunk api to interact with the network. So currently, in order to start bumblebee, you're going to need to run a bee node too. This is until a native libp2p implementation is avail to inject into bumblebee in order to do individual chunk operations over the network.

About running a bee node, visit the official repo. Once that's done, run your bumblebee using the the bee api as a backend:

npm run build
node ./build/src/main.js

Bumblebee will try by default to connect to your bee node at localhost:8080. You can specify a different bee listener with:

node ./build/src/main.js --bee-endpoint "localhost:6060"

Have a look at ./src/config/config.ts for possible CLI flags. This is a moving target and as of such not documented here at this moment.

Architecture

Bumblebee aims to be the cornerstore of the javascript implementation of Swarm. As of such, it envisions maintaining purity of interfaces between backend bee and the javascript proxy, this is to enable future integration with a native libp2p implementation of the Swarm protocols.

At this present moment, the proposed architecture could be described with the following diagram:

BUMBLEBEE PHASE 1


+-------------------------------------------------------------------------------------------+
|                                                                                           |
|    +------------+   +------------+  +-------------+  +-------------+   +---------------+  |
|    |            |   |            |  |             |  |             |   |               |  |
|    |   CRYPTO   |   |   SIGNER   |  |     SOC     |  |    FILE     |   |      PSS      |  |
|    |            |   |            |  |             |  |             |   |               |  |
|    +------------+   +------------+  +-------------+  +-------------+   +---------------+  |
|                                                                                           |
|    +----------------------------------------------------------------------------------+   |
|    |                   INTEROP WRAPPER / CHUNK ONLY OPERATIONS                        |   |
|    +----------------------------------------------------------------------------------+   |
|                                                                                           |
|    +----------------------------------------------------------------------------------+   |
|    |                                                                                  |   |
|    |                              BACKEND BEE CLIENT                                  |   |
|    |                                                                                  |   |
|    +----------------------------------------------------------------------------------+   |
|                                                                                           |
|    +----------------------------------------------------------------------------------+   |
|    |                                                                                  |   |
|    |                                    NETWORK                                       |   |
|    |                                                                                  |   |
|    +----------------------------------------------------------------------------------+   |
|                                                                                           |
+-------------------------------------------------------------------------------------------+

The bumblebee client is obliged not to deviate from the chunk-only interop layer (provided by the Client interface). The model should be revisited should any deviations arise. The client should be able to implement all higher-level functionalities using the chunk interface only.

Further working assumptions:

  • No persistent storage
  • No in-memory caching
  • No notion of p2p protocols
  • Browser compatible, complemented by a CI flow that makes sure this property is preserved
  • Components should be lean and ideally should be pulled out to separate repos as soon as possible

Contributing

Kindly read the styleguide here before PRing anything into the repo.

Etymology

This project is meant to harness higher-level abstractions and implementations over the lean bee client, hence the name Bumblebee, or in other words - an oversized bee :)

js-bumblebee's People

Contributors

acud avatar

Stargazers

2020.io avatar

Watchers

James Cloos 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.