dominion

package module
v0.0.0-...-407825d Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

README

Documentation Code Quality Build Status Coverage FOSSA Status

Dominion

Golang distributed system for service ecosystem management

This library serves on an IoT network were services (lights, speakers, thermostat, cameras, processing...) will be auto-started, auto-distributed, and (maybe) auto-scaled. The Dominion & Domains are sorts of managers of all devices which are participating. They manage service start, maintance, and discovery.

Abstractions

Dominion (leader)

Run the Domain with go run cmd/dominion/main.go

Don't forget to set DOMINION_CONFIG_FILE example

Listen for new Domains by:

  1. Wait for ZeroConf Broadcasts advertizing a Domain
  2. Dial Domain & establish lasting connection

Review Domains by:

  1. Repeadetly send heartbeat to Domains to keep connection alive
  2. Update Domains service list from heartbeat reply

Review Domain's Services by:

  1. Routinely reviewing Domains and checking that required services are available/started
  2. Routinely reviewing Services and checking that dependencies are available/started
Domain (follower)

Run the Domain with go run cmd/domain/main.go

Don't forget to set DOMAIN_CONFIG_FILE example

Domains find a Dominion by:

  1. Identifying that they are lonely (no history of a dominion or heartbeats stopped)
  2. Broadcasting to the network using ZeroConf

Domains remain in a Dominion by:

  1. Listening for incomming Heartbeat RPCs
  2. Update stored Dominion's identity

Domains start Services by:

  1. Listening for incomming StartService RPCs
  2. Calling make in the specified Service Directory
Service (Ecosystem)

Services do whatever you want them too. Services are language agnostic. They can locate other services through the Dominion's GRPC server. Service dependencies are defined in the DOMINION_CONFIG_FILE

Services I use -> ExMachina

Utilized Libraries

github.com/blang/semver

google.golang.org/grpc

github.com/grandcat/zeroconf

github.com/BurntSushi/toml

Planned Development

  1. Expose Logfiles - Dominion & Domain offer routes with logfiles
  2. Connection encryption - encrypt RPCs
  3. Identity verification - sign communication with preestablished keypairs

Development Tools

gRPC & protoc are used by go generate to update bitbox/grpc.

gRPCox is a lightweight docker container for easy manual testing.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() semver.Version

Types

This section is empty.

Jump to

Keyboard shortcuts

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