Skip to main content

MoaT Link

% start synopsis % start main

Moat-Link is a library that distributes messages between several possible back-ends, channel arrangements or encodings.

The associated server links these backends into one coherent system, provide message history, documentation, and whatnot.

% end synopsis

Rationale

Often, services have differing ideas how to encode "their" messages. For instance, Home Assistant likes JSON, except for boolean content which is encoded as "ON" and "OFF". On the other hand, encodings like msgpack or CBOR replace the overhead of textual analysis and repeated division by ten with typed binary data.

MoaT-KV supported this usecase via its own MQTT server, which is based on hbmqtt. Unfortunately hbmqtt is unsupported, high-overhead, and doesn't support MQTT 5. MoaT-KV adds its own overhead and doesn't support non-retained messages.

Structure

MoaT-Link consists of a couple of related services.

Server

The main server records messages in its history, affords redundancy, can re-supply the MQTT server with retained state, and so on.

Translator

Translators send and receive messages from other channels or topics.

For instance, Home Assistant's default of device state/cmd/control in one single hierarchy doesn't always mesh well with other systems' ideas.

Persistency, Redundancy

There can be multiple MoaT-Link servers. Clients automatically reconnect when one of them disconnects or becomes unresponsive.

Planned: support for multiple MQTT servers.

Error handling

In a system that aspires to be reliable, misbehaving code needs to record that it failed. MoaT-Link comes with a wrapper that auto-creates a problem report, or deletes it when the problem no longer occurs.

TODO: basic infrastructure exists but reporting needs a heap of code and there are a few parts that would benefit from error-handling wrappers.

Of course, if the system that handles error reporting fails … there's nobody to send an error. Thus, MoaT-Link also has a keepalive mechanism that can automatically notify you as soon as one of the critical components is down.

(This part works …)

Data Schema

Any large system suffers from data rot. The optional moat-link-schema package adds JSON Schema based validation, schema lookup, and mismatch reporting for MoaT-Link data.

Web view

Last but not least, we want a HTML front-end for introspection and debugging.

Message Encoding

MoaT-Link supports various encodings, most notably CBOR and msgpack. Its native default is CBOR because, unlike msgpack, CBOR's extensions are simply normal (but tagged) data structures and thus are introspectable.

% end main

Metadata

Release files for moat-link 0.10.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moat-link 0.10.15
File Size Uploaded
moat_link-0.10.15.tar.gz 99.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moat-link 0.10.15
File Interpreter ABI Platform
moat_link-0.10.15-py3-none-any.whl Python 3 none any Details

Total release size: 210.1 kB

Release history Release notifications | RSS feed

This release

0.10.15 This release

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.45

2 release files

0.2.44

2 release files

0.2.43

2 release files

0.2.36

2 release files

0.2.35

2 release files

0.2.34

2 release files

0.2.17

2 release files

0.2.16

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page