Skip to content

Commit 878aa6e

Browse files
committed
docs: update sequence to diagram
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
1 parent d176005 commit 878aa6e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

01-system-design/06-scenario/03-social-media.adoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,28 @@ Rel(interaction_service, notification_system, "Triggers notifications", "HTTPS")
8383

8484
[source, mermaid]
8585
----
86+
sequenceDiagram
87+
participant 🧑 as User
88+
participant 🌐 as Web/Mobile App
89+
participant 🛡 as API Gateway
90+
participant 🐦 as Tweet Service
91+
participant 🧑‍🤝‍🧑 as User Service
92+
participant 📥 as Feed Service
93+
participant ⚡ as Redis Cache
94+
participant 🗃️ as Feed DB
95+
participant 🔔 as Notification System
96+
participant 📊 as Analytics Service
97+
98+
🧑->>🌐: Create new tweet
99+
🌐->>🛡: POST /tweet
100+
🛡->>🐦: Handle tweet creation
101+
🐦->>🧑‍🤝‍🧑: Get list of followers
102+
🐦->>📥: Push tweet to followers' feed (fan-out)
103+
📥->>🗃️: Persist tweet in timelines
104+
📥->>⚡: Update hot cache (if trending)
105+
🐦->>🔔: Notify followers
106+
🐦->>📊: Track tweet event
107+
🐦-->>🛡: Tweet created
108+
🛡-->>🌐: 201 Created
109+
🌐-->>🧑: Tweet posted successfully
86110
----

0 commit comments

Comments
 (0)