Cord

Cord is a data streaming platform for composing, aggregating and distributing arbitrary streams. It uses a publish-subscribe model that allows multiple publishers to share their streams via a Cord Broker. Subscribers can then compose custom sinks using a regex-like pattern to access realtime data based on their individual requirements.

To interact with the Broker, Cord provides the Cord Client, which comprises a library and a CLI. As the project matures, this library will form the basis of a suite of adaptors for common technologies.

Modules

The Cord Project comprises three modules (crates in Rust parlance):

  1. Cord Broker - the server binary that aggregates and distributes arbitrary streams
  2. Cord Client - provides a library and CLI for interacting with Cord brokers
  3. Cord Message - an internal crate that defines the message envelope and codec for transmitting messages over the wire

Usage

First, start a new Cord Broker:

Docker

docker run -d -p 7101:7101 --rm cordproj/cord-broker:0

Cargo

cargo install cord-broker
cord-broker &

Next, use the Cord Client to interact with the Broker. You can implement Cord within your own project using the Client library (docs.rs), however the easiest way to get started is by using the CLI.

Subscribe to a namespace:

Docker

docker run --rm cordproj/cord-client:0 -a <broker_addr> sub /names

Cargo

cargo install cord-client
cord-client sub /namespaces

Publish to this namespace:

Docker

docker run -it --rm cordproj/cord-client:0 -a <broker_addr> pub /names

Cargo

cord-client pub /names

Etymology

Cord derives its name from the spinal cord. The long term goal of this project is to aggregate data from every part of your environment, so that the decisions you make within that environment are better informed. This is akin to the central nervous system, which uses the spinal cord to aggregate electrical feedback from nerve endings.