From a151d50ca9ad1d631a94febdb65bcfdfa4a394c9 Mon Sep 17 00:00:00 2001
From: dzak27567 <fadhlurohmandzaki@gmail.com>
Date: Thu, 27 Mar 2025 15:16:19 +0700
Subject: [PATCH] Answer Reflection Subscriber-2

---
 README.md | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md
index f9b0858..ee7f627 100644
--- a/README.md
+++ b/README.md
@@ -68,16 +68,16 @@ You can install Postman via this website: https://www.postman.com/downloads/
     -   [x] Commit: `Implement list_all_as_string function in Notification repository.`
     -   [x] Write answers of your learning module's "Reflection Subscriber-1" questions in this README.
 -   **STAGE 2: Implement services and controllers**
-    -   [ ] Commit: `Create Notification service struct skeleton.`
-    -   [ ] Commit: `Implement subscribe function in Notification service.`
-    -   [ ] Commit: `Implement subscribe function in Notification controller.`
-    -   [ ] Commit: `Implement unsubscribe function in Notification service.`
-    -   [ ] Commit: `Implement unsubscribe function in Notification controller.`
-    -   [ ] Commit: `Implement receive_notification function in Notification service.`
-    -   [ ] Commit: `Implement receive function in Notification controller.`
-    -   [ ] Commit: `Implement list_messages function in Notification service.`
-    -   [ ] Commit: `Implement list function in Notification controller.`
-    -   [ ] Write answers of your learning module's "Reflection Subscriber-2" questions in this README.
+    -   [x] Commit: `Create Notification service struct skeleton.`
+    -   [x] Commit: `Implement subscribe function in Notification service.`
+    -   [x] Commit: `Implement subscribe function in Notification controller.`
+    -   [x] Commit: `Implement unsubscribe function in Notification service.`
+    -   [x] Commit: `Implement unsubscribe function in Notification controller.`
+    -   [x] Commit: `Implement receive_notification function in Notification service.`
+    -   [x] Commit: `Implement receive function in Notification controller.`
+    -   [x] Commit: `Implement list_messages function in Notification service.`
+    -   [x] Commit: `Implement list function in Notification controller.`
+    -   [x] Write answers of your learning module's "Reflection Subscriber-2" questions in this README.
 
 ## Your Reflections
 This is the place for you to write reflections:
@@ -95,3 +95,14 @@ This is the place for you to write reflections:
 
 
 #### Reflection Subscriber-2
+> Have you explored things outside of the steps in the tutorial, for example: src/lib.rs? If not, explain why you did not do so. If yes, explain things that you have learned from those other parts of code.
+
+1.Saya mencoba memahami isi dari src/lib.rs dan menemukan bahwa file ini berperan penting dalam konfigurasi aplikasi. Salah satu hal menarik yang saya pelajari adalah bagaimana lazy_static! digunakan untuk membuat REQWEST_CLIENT dan APP_CONFIG sebagai variabel statis yang diinisialisasi sekali dan dapat digunakan di seluruh aplikasi. Selain itu, AppConfig mengatur konfigurasi aplikasi dengan nilai default, tetapi bisa diubah menggunakan variabel lingkungan (.env) melalui Figment. Saya juga memperhatikan bahwa ada tipe Result<T, E> yang sudah dikustomisasi untuk menangani error dengan format JSON, yang membuat penanganan error menjadi lebih terstruktur.
+
+> Since you have completed the tutorial by now and have tried to test your notification system by spawning multiple instances of Receiver, explain how Observer pattern eases you to plug in more subscribers. How about spawning more than one instance of Main app, will it still be easy enough to add to the system?
+
+2. Dengan pola Observer, menambahkan instance Subscriber baru sangat mudah—cukup dengan mengatur port berbeda tanpa konfigurasi tambahan. Namun, menambahkan instance baru dari Main app memerlukan lebih banyak langkah, seperti menyesuaikan konfigurasi di Receiver dan memastikan setiap Subscriber melakukan subscribe secara manual ke Main app yang baru. Untuk menyederhanakan proses ini, implementasi subscribe dan unsubscribe di Receiver perlu diperbarui agar dapat berkomunikasi dengan semua instance Main app.
+
+> Have you tried to make your own Tests, or enhance documentation on your Postman collection? If you have tried those features, tell us whether it is useful for your work (it can be your tutorial work or your Group Project).
+
+3. Saya belum pernah mencoba membuat tes sendiri di Postman, tetapi dari koleksi tes yang tersedia, fitur ini tampaknya sangat berguna. Dengan Postman, saya dapat menguji API tanpa harus menulis kode pengujian secara manual.
-- 
GitLab