Message Blaster Bot

Text "start general" to fiftyfiftyonearizona.48 to receive updates on events and more from FiftyFiftyOneArizona

A message blaster hosted by FiftyFiftyOneArizona

This is an in-house solution built by our webmaster to handle message blasts (mass messaging people with updates).

It is built allowing support for multiple channels so that other groups could have their own set of subscribers. It also seamlessly supports an arbitrary amount of transport methods. Currently, this system only supports Signal but it can be expanded to seamlessly include SMS and others.

About This System

This section contains information about various data structures the system uses. Please reference the source code as linked for each term if you want a more precise explanation. It is designed to have as few moving parts as possible and have stable, reliable behavior during power loss & interruptions.

A rough UML class diagram showing each object running on the system

Red boxes are data structures, the blue box is a Go interface, and the black boxes are more class-like objects.

Channel

Represents a “topic” (or similar) that users can subscribe to.

Subscription

Represents a Channel-Subscriber pair.

BlastID

Represents a string of text sent to a channel.

Subscriber

Represents one account on a given postman. It is used to identify users for both Incoming and Outgoing messages alike.

Postman

Provides a simple interface on top of one end transport system (Signal, SMS, etc.)

Box

Handles caching finalized outgoing messages in order to enforce a rate limit on top of the Postman interface.

Registry

Effectively a map between a string and a Box. It abstracts away each individual box object into a string that each Subscriber holds.

Bot

Takes incoming messages and responds to them. It is what the users interact with when subscribing, unsubscribing, etc.

Blaster

Handles ensuring that if one part of a blast is sent, all of it is sent. This object handles the main algorithm for ensuring consistent behavior.

Substore

Provides an interface on top of a persistent database to store subscriptions.

AllowedChannels

Used by the Bot to enforce what channels users are allowed to subscribe to.

AllowedSenders

Used by the Bot to enforce what subscribers (which users) are allowed to send blasts on which channels.