All Projects → Fishrock123 → Bob

Fishrock123 / Bob

Licence: mit
🚰 binary data "streams+" via data producers, data consumers, and pull flow.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bob

Sneakerbot
Stars: ✭ 33 (-51.47%)
Mutual labels:  source
Tr2main
Tomb Raider II Injector Dynamic Library
Stars: ✭ 46 (-32.35%)
Mutual labels:  source
Wxpython Examples
Source code examples from the ZetCode's wxPython tutorial
Stars: ✭ 60 (-11.76%)
Mutual labels:  source
Comcast.github.io
The main Open Source portal for Comcast
Stars: ✭ 36 (-47.06%)
Mutual labels:  source
Delta Architecture
Streaming data changes to a Data Lake with Debezium and Delta Lake pipeline
Stars: ✭ 43 (-36.76%)
Mutual labels:  streams
Stream Splicer
streaming pipeline with a mutable configuration
Stars: ✭ 52 (-23.53%)
Mutual labels:  streams
Capture Stream
Capture stream output.
Stars: ✭ 10 (-85.29%)
Mutual labels:  streams
Streams
Apache Streams
Stars: ✭ 65 (-4.41%)
Mutual labels:  streams
Opentomb
An open-source Tomb Raider 1-5 engine remake
Stars: ✭ 1,035 (+1422.06%)
Mutual labels:  source
Cypher Stream
Neo4j Cypher queries as Node.js object streams
Stars: ✭ 58 (-14.71%)
Mutual labels:  streams
Labeled Stream Splicer
stream splicer with labels
Stars: ✭ 37 (-45.59%)
Mutual labels:  streams
Gatsby Source Instagram All
⚛️📸 Gatsby source plugin for fetching all your instagram posts
Stars: ✭ 42 (-38.24%)
Mutual labels:  source
Android Toy
不积跬步 无以至千里
Stars: ✭ 54 (-20.59%)
Mutual labels:  source
Why Are My Node Streams Hanging
Some supplemental node streams documentation
Stars: ✭ 36 (-47.06%)
Mutual labels:  streams
Logisim
Logisim Italian Fork
Stars: ✭ 61 (-10.29%)
Mutual labels:  source
Node Scalable Blob Store
A file system blob store that is designed to prevent conflicts when used with a distributed file system or storage area network
Stars: ✭ 31 (-54.41%)
Mutual labels:  streams
Audio player flutter
🎧 Apple Music / Tidal Audio Player for Flutter
Stars: ✭ 52 (-23.53%)
Mutual labels:  streams
Linux
Armbian kernel mirrors
Stars: ✭ 66 (-2.94%)
Mutual labels:  source
Obs Streamfx
StreamFX is a plugin for OBS Studio which adds many new effects, filters, sources, transitions and encoders - all for free! Be it 3D Transform, Blur, complex Masking, or even custom shaders, you'll find it all here.
Stars: ✭ 1,128 (+1558.82%)
Mutual labels:  source
Staged Streams.scala
Stars: ✭ 55 (-19.12%)
Mutual labels:  streams

BOB

A binary data "streams+" API & implementations via data producers, data consumers, and pull flow.

The name? BLOB — Matteo Collina.

Bytes Over Buffers — Thomas Watson

This is a Node.js strategic initiative aiming to improve Node.js streaming data interfaces, both within Node.js core internally, and hopefully also as future public APIs.

Flow of data & errors though BOB sinks & sources

Published Modules

The following modules contain usable components (sources, sinks, or transforms) and are published to npm.

The following modules are not published but are 'functional'.

API Reference

The following files serve as the API's reference:

Examples

The composition of the classes looks like this:

const { Stream } = require('bob-streams')

const source = new Source(/* args */)
const xform = new Transform(/* args */)
const sink = new Sink(/* args */)

const stream = new Stream(source, xform, sink)
stream.start(error => {
  // The stream is finished when this is called.
})

An entire passthrough could look like this:

class PassThrough {
  bindSource (source) {
    source.bindSink(this)
    this.source = source
    return this
  }

  bindSink (sink) {
    this.sink = sink
  }

  next (status, error, buffer, bytes) {
    this.sink.next(status, error, buffer, bytes)
  }

  pull (error, buffer) {
    this.source.pull(error, buffer)
  }
}

API Extension Reference

The following files serve as API extension references:

  • extension-stop - Tell a source to stop.
    • Useful for dealing with timeouts on network APIs.

Project Approach

High-level timeline:

  • Prototype separate from core entirely.
  • Move into nodejs org once JS & C++ APIs are significantly prototyped.
  • Begin transitioning Node.js internals once the APIs and perf are proved.
  • If an internal transition works out well, begin planning public APIs.

All of these steps necessitate the buy-in of many stakeholders, both in Node.js core and the greater Node.js ecosystem. This is a long-term project by necessity and design.

Goals

Some collective goals for this initiative.

  • Both performance and ease-of-use are key.
  • Implementable in a performant and usable way for both JS and C++.
  • Browser portability is preferable.

Protocol

As a preface, "protocol" refers to a system with "producer / source" and "consumer / sink" endpoints.

The Protocol itself must be simple:

  • Pull-based: The consumer requests ("pulls") data from the producer.
  • Binary-only: Data is binary buffers only, "object mode" and string encodings are not supported at the protocol level.
  • Stateless: The protocol must not require state to be maintained out-of-band.
    • Non-normative: While the protocol itself does not require out-of-band state, actual operations almost always do.
    • Minimize state assumed between calls.
  • One-to-one: The protocol assumes a one-to-one relationship between producer and consumer.
  • Timing agnostic: The protocol makes no timing (sync or async) assumptions.
  • No buffering: The protocol must not require buffering (although specific implementations might).
    • Non-normative: While the protocol itself does not require buffering, starting sources almost always do (including transforms).
  • In-line errors and EOF: Errors, data, and EOF ("end") should flow through the same call path.

Consumer

  • Should make no assumption on the timing of when data will be received (sync or async).
  • Should own any preallocated memory (the buffer).
  • Must never make more than one data request upstream at the same time.

Performance

Please see performance.md for profiling results & information.

Current results estimate a 30% decrease of CPU time in bad cases, and up to 8x decrease in good cases. This should correlate to overall throughput but may not be exact.

Project Layout

API reference examples sit in the top-level directory and are prefixed by reference-. These are functional and tested when practical, notably reference-verify, reference-passthrough, and verify-buffered-transform.

Other helpers, such as Stream(), reside in the /helpers/ and /tests/helpers directories. All useful and usable components in this repo are exported from index.js with the bob-streams npm module.

Functional sources, sinks, and so on can be found in their own npm modules. See [Published Modules](#Published Modules).

Development

Tests

npm install && npm test

Building the addons

The addons are presently very out-of-date.

You must have a local install of Node master @ ~ 694ac6de5ba2591c8d3d56017b2423bd3e39f769

npm i node-gyp
node-gyp rebuild --nodedir=your/local/node/dir -C ./addons/passthrough
node-gyp rebuild --nodedir=your/local/node/dir -C ./addons/fs-sink
node-gyp rebuild --nodedir=your/local/node/dir -C ./addons/fs-source

License

MIT LicensedContributions via DCO 1.1

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].