mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-09 00:02:17 +00:00
feat: replace ascii architecture diagrams in the realtime readme and resources docs with prose and tables
This commit is contained in:
+1
-11
@@ -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
@@ -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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user