Маттерн Pub/Sub (Видавець-Підписник)

Спосіб розсилки повідомлень багатьом отримувачам одночасно.

🌐 Терміни іншими мовами:

In the Pub/Sub model, a publisher categorizes messages into 'topics' without knowing who will receive them. Subscribers express interest in one or more topics and only receive messages that are of interest. This allows for massive scale as one message can be broadcast to millions of listeners instantly.

        graph LR
  Center["Маттерн Pub/Sub (Видавець-Підписник)"]:::main
  Rel_message_broker["message-broker"]:::related -.-> Center
  click Rel_message_broker "/terms/message-broker"
  Rel_encryption["encryption"]:::related -.-> Center
  click Rel_encryption "/terms/encryption"
  Rel_all_or_none_order["all-or-none-order"]:::related -.-> Center
  click Rel_all_or_none_order "/terms/all-or-none-order"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧠 Перевірка знань

1 / 1

🧒 Простими словами

Pub/Sub — це як радіостанція. 'Видавець' — це діджей, який ставить музику. Він не знає, хто саме його слухає. Будь-яка людина з радіо може 'Підписатися' на станцію, налаштувавшись на потрібну хвилю. Одна пісня звучить один раз, а чують її тисячі людей одночасно!

🤓 Expert Deep Dive

Лежить в основі систем чатів, сповіщень на телефоні та стрічок новин у реальному часі.

📚 Джерела