Skip to content

Latest commit

 

History

History
executable file
·
276 lines (195 loc) · 10.3 KB

README.md

File metadata and controls

executable file
·
276 lines (195 loc) · 10.3 KB

Rust Linux Windows


Logo

Rusty-Bridge

A blazingly fast and ultra small solution for message transfer from point A to point B
[todo] Explore the docs »

[todo] View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. Contact
  7. Acknowledgments

About The Project

⚠️ If you are interested in this project, please contact me. I am not supporting it or working on it further at the moment, and it likely may not compile without some configuration first as I stopped working on it, mid-changes.

This project is not currently in development, but it's here for my own review or others to review as there were many fun techniques used to implement abstraction and maintain speed. It is not finished but I lost interest in continuing it further for now. It likely won't compile right away either. If you are interested in this project, feel free to contact me.

Rusty-Bridge is a program to build flexible data transformations and sending from point A to point B. It is built to be highly modular. It can be built to accept data from any source, and to send it to any destination. In between, it can be configured to work with all kinds of data transforms, message persistence, metrics viewing, configuration strategy, and more.

Rusty-Bridge can be built for almost any system. It runs with a tiny footprint and fast performance. It is designed to make adding connectivity between any two points, a breeze. Ballpark figures put the figures undder, Size: 10MB, RAM: under 12MB, CPU @ 200msg/s, ~1%. Of course, this is system dependent.

(back to top)

Built With

  • Rust
  • love-shield

(back to top)

Getting Started

Rusty-Bridge is designed to be easy to get up and running

Prerequisites

You will need these tools to compile Rusty-Bridge

  • Rust
    # https://www.rust-lang.org/tools/install
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Build and Run

  1. Clone the repo
    git clone https://github.com/RockyGitHub/rusty-bridge.git &&
    cd rusty-bridge
  2. Run -- This currently won't work without specifying the feature flags, but I am pursuing reactivating the dev default features
    cargo run
    # You can specify additional logs with an env var
    RUST_LOG=debug cargo run
  3. Build for release
    cargo build --features="cloud-adapter/special-hivemq, data-source/dev, mini-config/dev" --release
    # Add the target if you are trying to compile for a different target architecture
    # ex: --target=armv7-unknown-linux-gnueabihf     or    --target=x86_64-pc-windows-gnu
    # See this page possible targets: https://doc.rust-lang.org/rustc/platform-support.html
  4. You can also use a pre-made script found in the tools directory

(back to top)

Usage

Rusty-Bridge is built out of many different libraries. This helps keep things manageable, resusable, and testable. The project uses what's known as a workspace. This means there are many projects within this one project. For example, Special-AnA is handled within one library, special-hivemq uses that library, and North-Adapters compiles in special-hivemq if the feature flag is selected.

A cool element to this is that testing and example code is extremely easy within each of these libraries. A few of them include an example binary that gives a brief view on how to use the library. It's particularly handy for quick tests and seeing how the code is to be used.

Rusty-Bridge supports providing real-time metrics about its activity. This is one of my favorite parts. See the docs here

Example of RTT (round trip time) for msgs: Logo

Device reporting is also used, information will be sent containing system data on startup and thereafter dynamic data, such as memory available, processor use, etc, is sent. The intent is to serve a page in which all connected edges can be discovered. This page does not exist yet but in the tools directory, you can find a service to host a local endpoint. It can be used to test this feature.

Supported Modules

Rusty-Bridge supports a multitude of configurations. The most commonly changed modules include the Data-Source, North-Adapter, Configuration, and the Transform. There are many other configurable options as well, please see these docs to review those.

When building with cargo build you can specify the features to be built with it by passing the features flag. For example,

cargo build --features="data-source/mqtt, cloud-adapter/special-hivemq"

Every module has a dev option that is used by default

Data-Source

data-source/<option>

  • MQTT - mqtt
  • HTTP_REST - http-rest

North-Adapter

cloud-adapter/<option>

  • HiveMQ - special-hivemq

Transform

msg-transforms/<option>

Configuration

mini-config/<option>

  • toml-shield - toml *currently within dev instead

Additional Feature flags

Data-Server

Rusty-Bridge/<option>

  • data-server [default]
  • none

Persistence

Not implemented yet msg-persistence/<option>

  • sled

Alarms

Not implemented yet

Command and Control

Not implemented yet

(back to top)

Roadmap

(not currently in development)

  • [Device Management]
  • Persistence
    • sled
  • Alarm module
  • Command and Control module
  • Zero-Transform
  • File Uploader

Don't see what you want? Suggest it!

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

  1. todo

(back to top)

Contact

Christopher Davidoff - email

(back to top)

Acknowledgments

(back to top)

Thank you