Home

Awesome

Bondy logo

Version<br> Docker Pulls Docker Build (master) Docker Build (develop) Docker Build (latest-tag) <br>Architectures

Bondy

The distributed application networking platform

Bondy is an open source, always-on and scalable application networking platform connecting all elements of a distributed application—offering service and event mesh capabilities combined.

From web and mobile apps to IoT devices and backend microservices, Bondy allows everything to talk using one simple and secured communication protocol in a decoupled and dynamic way.

Bondy implements the open Web Application Messaging Protocol (WAMP).

<br><br>

<p align="center"> <img src="https://github.com/Leapsight/bondy/blob/develop/doc/assets/bondy_cluster.png?raw=true" alt="drawing" width="600"/> </p> <br><br>

Documentation

For our work-in-progress documentation for v1.0.0 go to https://developer.bondy.io.

Supported WAMP features

Authentication

In addition Bondy provides:

Advanced RPC features

Advanced Pub/Sub features

Transport

Transport Serialization

How is Bondy different than other WAMP routers?

Bondy provides a unique combination of features which sets it apart from other application networking solutions and WAMP routers in terms of scalability, reliability, high-performance, development and operational simplicity.

Quick Start

Docker

The fastest way to get started is by using our official docker images.

  1. Make sure you have Docker installed and running.
  2. Download the examples/custom_config folder to a location of your choice, then cd to that location and run the following command (If you already cloned the Bondy repository then just cd to the location of the repo).
docker run \
--rm \
-e BONDY_ERL_NODENAME=bondy1@127.0.0.1 \
-e BONDY_ERL_DISTRIBUTED_COOKIE=bondy \
-u 0:1000 \
-p 18080:18080 \
-p 18081:18081 \
-p 18082:18082 \
-p 18083:18083 \
-p 18084:18084 \
-p 18085:18085 \
-v "$(PWD)/examples/custom_config/etc:/bondy/etc" \
-v "/tmp/data:/bondy/data" \
leapsight/bondy:master

Building from source

Requirements

Building

Clone this repository and cd to the location where you cloned it.

To generate a Bondy release to be used in production execute the following command which will generate a tarball containing the release at $(PWD)/_build/prod/rel/.

make release

Untar and copy the resulting tarball to the location where you want to install Bondy e.g. ~/tmp/bondy.

tar -zxvf _build/prod/rel/bondy-1.0.0-rc.27.tar.qz -C ~/tmp/bondy

Running

To run Bondy, cd to the location where you installed it e.g. ~/tmp/bondy and run the following command which will print all the options.

bin/bondy

For example, to run Bondy with output to stdout do

bin/bondy foreground

And to run Bondy with an interactive Erlang shell do

bin/bondy console

Local cluster testing

Run a first node

We will start a node named bondy1@127.0.0.1 which uses the following variables from the config file (config/test/node_1_vars.config).

TransportDescriptionPort
HTTPREST API GATEWAY18080
HTTPREST API GATEWAY18083
HTTPREST Admin API18081
HTTPSREST Admin API18084
WebsocketsWAMP18080
TCPWAMP Raw Socket18082
TLSWAMP Raw Socket18085
make node1

Create a Realm

WAMP is a session-based protocol. Each session belongs to a Realm.

curl -X "POST" "http://localhost:18081/realms/" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -H 'Accept: application/json; charset=utf-8' \
     -d $'{
  "uri": "com.myrealm",
  "description": "My First Realm"
}'

Disable Security

We will disable security to avoid setting up credentials at this moment.

curl -X "DELETE" "http://localhost:18081/realms/com.myrealm/security_enabled" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -H 'Accept: application/json; charset=utf-8'

Run a second node

We start a second node named bondy2@127.0.0.1 which uses the following variables from the config file (config/test/node_2_vars.config).

TransportDescriptionPort
HTTPREST API GATEWAY18180
HTTPREST API GATEWAY18183
HTTPREST Admin API18181
HTTPSREST Admin API18184
WebsocketsWAMP18180
TCPWAMP Raw Socket18182
TLSWAMP Raw Socket18185
make node2

After a minute the two nodes will automatically connect. From now on all new Bondy control plane state changes will be propagated in real-time through broadcasting. One minute after joining the cluster, the Active Anti-entropy service will trigger an exchange after which the Realm we have created in bondy1@127.0.0.1 will have been replicated to bondy2@127.0.0.1.

Run a third node

make node3

Resources


Copyright by Leapsight, material licensed under the CC-BY-SA 4.0, provided as-is without any warranties, Bondy documentation (https://developer.bondy.io).