added media fixes, search, push updates, pwa, metrics. preparing release 1.0
CI / Go (build + vet + test) (push) Canceled after 0s
CI / Web (build + lint) (push) Canceled after 0s

This commit is contained in:
vantablackTea
2026-09-27 23:26:15 +03:00
parent 855a62755c
commit 6fc6d977bf
59 changed files with 6823 additions and 113 deletions
+21
View File
@@ -0,0 +1,21 @@
# ADR 0002: In-memory WebSocket hub
- Status: accepted
- Date: 2026-09
## Context
Realtime delivery (messages, typing, presence, read receipts) must reach
connected clients immediately. Options: external broker (Redis pub/sub,
NATS), Postgres LISTEN/NOTIFY, or an in-process hub.
## Decision
Use an in-process hub: `map[userID] -> connections` plus
`map[conversationID] -> subscribers`, guarded by a mutex. Membership and
read-state are resolved through a `MembershipProvider` interface implemented
by the store.
## Consequences
- Sub-millisecond fan-out, no extra moving parts.
- Presence checks (`IsOnline`) are lock-free reads used by the push notifier.
- Multi-node scaling would require a broker; the hub's publish methods are
the seam where that would plug in.