Arxitektura
Bitta ilova uch transportni taqdim etadi — hammasi bir xil application yadrosini (use-case’lar)
ulashadi. Domen qatlami infratuzilmadan mustaqil (DDD / hexagonal):
domain → application → infrastructure / interfaces.
Uch transport
heading.anchorLabel| Transport | Vazifa |
|---|---|
| HTTP / REST | API + webhook (/webhooks/{provider}), health, metrics, admin panel |
| gRPC | Servis-servis: Notification / Template / Preference / Provider Service — REST bilan bir xil interfeys |
| Kafka | Consumer loyiha event’larini iste’mol qiladi (faqat consume) va yuborishga ulaydi |
Ma’lumot va state
heading.anchorLabel- PostgreSQL + typed so’rovlar. Yozuvlar (
notifications,delivery_attempts,callbacks) oylik partition qilinadi. - Queue = jadval. Worker
status='pending'yozuvlarniFOR UPDATE SKIP LOCKEDbilan oladi — alohida broker shart emas. - Background job’lar — dispatcher, scheduler, retry (kvadratik backoff), cleanup, partition maintenance.
- Realtime backplane — in-app socket fan-out uchun pluggable: Redis Pub/Sub yoki Firebase.
- DB-per-service — cross-service FK yo’q.
recipient_user_idlogical ref. Secret DB’da emas — faqatenv:/vault://reference.