feat: replace ascii architecture diagrams in the realtime readme and resources docs with prose and tables

This commit is contained in:
Matthew Meszaros
2026-06-10 18:27:42 +02:00
parent 14a535701e
commit 5b735bb528
3 changed files with 8 additions and 37 deletions
+1 -11
View File
@@ -4,17 +4,7 @@ WebSocket gateway for real-time events in Warmbly. Built with Phoenix Channels a
## Architecture
```
┌─────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Go Backend │────>│ Google Pub/Sub │────>│ Elixir Realtime │
└─────────────┘ └─────────────────┘ └────────┬────────┘
│
│ WebSocket
v
┌─────────────────┐
│ React Frontend │
└─────────────────┘
```
The Go backend publishes events to Google Pub/Sub. The Elixir realtime service consumes them and fans each event out to the React frontend over Phoenix Channel WebSockets.
## Channels
+6 -15
View File
@@ -11,21 +11,12 @@ EMSG provides a lightweight alternative to JSON for storing email bodies, with:
## Binary Layout
```
┌──────────────────────────────────────────┐
│ Magic Number (4 bytes): "EMSG" │
├──────────────────────────────────────────┤
│ Version (1 byte): 0x01 │
├──────────────────────────────────────────┤
│ Flags (4 bytes): bitmask of sections │
├──────────────────────────────────────────┤
│ Section 1: [Length 4B][Data...] │
├──────────────────────────────────────────┤
│ Section 2: [Length 4B][Data...] │
├──────────────────────────────────────────┤
│ ... │
└──────────────────────────────────────────┘
```
| Field | Size | Value |
|-------|------|-------|
| Magic number | 4 bytes | `"EMSG"` |
| Version | 1 byte | `0x01` |
| Flags | 4 bytes | Bitmask of the sections that follow |
| Section 1..N | 4 bytes + data each | `[Length 4B][Data...]`, one per flag bit set |
## Flags
+1 -11
View File
@@ -4,17 +4,7 @@ Warmbly uses Apache Kafka for asynchronous event streaming between services, wit
## Overview
```
┌─────────────┐ ┌─────────────┐ ┌─────────────────┐
│ Tracking │────>│ Kafka │────>│ Consumer │
│ Service │ │ │ │ │
└─────────────┘ │ │ └─────────────────┘
│ │
┌─────────────┐ │ │ ┌─────────────────┐
│ Backend │────>│ │────>│ Worker │
│ │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────────┘
```
Two producers write to Kafka and two consumers read from it: the tracking service publishes events that the consumer processes, and the backend publishes commands that the workers execute.
## Kafka Topics