From 3c616e373f4a3871c9f47f8ae55eb72dbc596954 Mon Sep 17 00:00:00 2001
From: Christian Raphael Heryanto <christian.raphael@ui.ac.id>
Date: Fri, 28 Mar 2025 14:31:49 +0800
Subject: [PATCH] Reflection Publisher-3

---
 README.md | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/README.md b/README.md
index 391a7eb..18fa2fd 100644
--- a/README.md
+++ b/README.md
@@ -113,3 +113,28 @@ Using models only to handle everything in BambangShop would impact the codebase
 Personally, this has helped me alot in API testing. It allows me to make repeated requests quickly, which gives me more time to analyze and debug where my program went wrong. The environment variable interests me alot, as this feature lets us define certain variable such as BASE_URL and PORT which then can be used in the request creation.
 
 #### Reflection Publisher-3
+
+##### Push vs Pull model
+
+In this tutorial, we use the Push Model variation of the Observer pattern. This can be seen from the following facts:
+- The publisher actively sends the complete product data to all subscriber
+- The subscriber receive HTTP POST request
+- The subscriber don't need to make additional request to receive notifications
+
+##### Advantages/Disadvantage of using a Pull Model
+
+**Advantages**
+
+1. Better Error Handling: if a data retrieval fails, it can be retried.
+2. More Control for Subscribers: They have the option to pick when to fetch data.
+
+**Disadvantages**
+1. Complex: requires two separate endpoints
+2. High Latency: 2 round-trips to get updated information
+3. Increased Server Load: Publisher must handle individual data retrieval requests
+
+###### Impact of Single-Threading Notifications
+
+The usage of single-threading notifications would impact the program negatively. The notificaitons will be sent sequentially, after one another. If there's an unresponsive or slow subscriber, it'll delay the following subscribers to receive the notifications. As the program increase in users, the delay would increase proportionally.
+
+####
-- 
GitLab