broker

module
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2021 License: MIT

README

Build Status Coverage Report Go Report Card License MIT


Plantd Broker

This is beta software and is subject to API changes.

The message broker service is responsible for taking gRPC requests and converting them into equivalent ZeroMQ ones that are handled by services connected as workers.

Quick Start

To try things out without all the setup:

yarn --cwd app/ install
yarn --cwd app/ build
docker-compose up

The UI should be available at http://localhost, the API endpoint at localhost:9080/api/v1, and the broker endpoint at tcp://localhost:7200.

Setup

Dependencies

ZeroMQ/GoMQ has instructions here on a setup that requires

  • libsodium
  • libzmq
  • czmq

In Arch these can be installed by

pacman -S libsodium libzmq
git clone https://aur.archlinux.org/czmq.git
cd czmq
makepkg -si
Building
Broker

Build the gRPC service and messages using the protobuf repo.

cd broker
make
Admin Interface
cd app
yarn install
yarn build
Publishing
docker build -t registry.gitlab.com/plantd/broker:v1 -f ./build/Dockerfile .
docker push registry.gitlab.com/plantd/broker:v1

Roadmap

  • Move workers out

    The worker processes are currently within this service, but they do not need to be. These should exist in the associated services, and connect to this broker.

  • Implement the titanic pattern device
  • Implement load balancing
  • Add Curve for ZeroMQ security
  • Move pubsub bus from other service into this one

Directories

Path Synopsis
broker
cmd
examples
e2e
pkg
bus
mdp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL