Architecture: Should platform notifications (System A) and business commun...

Documentation for Sessions

🏗️ Architecture: Should platform notifications (System A) and business commun...

Date: 2026-03-19
Time: 17:51:04 UTC
Session: gspace1-241.4
Agent: architecture
Confidence: 94%
Status: ✅ Documented


📋 Decision Context

Question:

Should platform notifications (System A) and business communications (System B) share the same dispatch pipeline?

Task: Design notification system architecture — shared vs separate pipelines


🎯 Decision Made

Chosen:

No — two separate systems with shared delivery primitives. System A uses ProactiveDispatcherService (quiet hours, frequency cap, dedup, per-user dossier). System B uses a new DeliveryService with consent-based gating (GDPR/TCPA opt-in). Both use @libs-api/messaging-core (TwilioService, EmailService, VittoIdentityService) for actual delivery.

Options Considered:

  1. Unified pipeline with config flags to switch behavior
  2. Two separate systems with shared messaging-core primitives (chosen)
  3. Unified pipeline with separate safety guard modules

💭 Reasoning

The safety guard models are fundamentally incompatible. System A caps at 5 alerts/day per user with quiet hours — appropriate for developer alerts. System B must allow a business to send 50+ messages/day during a sale — applying System A's cap would break the feature. System A reads UserDossier and UserNotificationPrefs (L1 GoGrab users). System B reads CustomerConsent (L2 platform users) — different collections, different schemas, different compliance requirements. The shared layer is messaging-core which both already import. Rate limiting for System B uses Redis sliding window (because broadcast volumes justify it), while System A uses in-memory Maps (low volume, acceptable for single instance). Forcing them through one pipeline would require branching logic throughout the dispatcher that defeats the purpose of unification.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation