<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Codeseeker2024 on Medium]]></title>
        <description><![CDATA[Stories by Codeseeker2024 on Medium]]></description>
        <link>https://medium.com/@codeseeker2024?source=rss-0b55066235d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*m0qDM5fMRaB-3EWuB7yksw.png</url>
            <title>Stories by Codeseeker2024 on Medium</title>
            <link>https://medium.com/@codeseeker2024?source=rss-0b55066235d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 17:37:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@codeseeker2024/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ 資料架構演進：從交易到洞察 —OLTP、OLAP、Data Lake、Lakehouse 全解析]]></title>
            <link>https://medium.com/@codeseeker2024/%E8%B3%87%E6%96%99%E6%9E%B6%E6%A7%8B%E6%BC%94%E9%80%B2-%E5%BE%9E%E4%BA%A4%E6%98%93%E5%88%B0%E6%B4%9E%E5%AF%9F-oltp-olap-data-lake-lakehouse-%E5%85%A8%E8%A7%A3%E6%9E%90-8dd3f8eaff2b?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8dd3f8eaff2b</guid>
            <category><![CDATA[data-lake]]></category>
            <category><![CDATA[data-architecture]]></category>
            <category><![CDATA[data-warehouse]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-lakehouse]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Mon, 13 Oct 2025 05:52:38 GMT</pubDate>
            <atom:updated>2025-10-13T05:52:38.492Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>當企業開始從「資料收集」走向「資料驅動決策」，背後的資料架構也經歷了一場進化。<br> 從最初的交易資料庫（OLTP），到分析倉儲（OLAP）、資料湖（Data Lake），再到結合兩者優勢的湖倉架構（Lakehouse），每一次演進都讓資料價值的提取更快、更深、更智慧。</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k58n89rMl_-Hn7juATSbxA.png" /></figure><h3>🏦 OLTP（Online Transaction Processing）</h3><p>🔸 <strong>定義</strong><br> OLTP 系統專注於高頻率的即時交易處理，是資料庫最初的主要應用形式。</p><p>🔸 <strong>核心應用情境</strong><br> 適用於銀行交易、電子商務訂單、會員註冊、庫存管理等需要高一致性與即時回應的情境。</p><p>🔸 <strong>技術特性</strong><br> 強調 <strong>ACID（原子性、一致性、隔離性、持久性）</strong>，採用 <strong>Row-based 儲存</strong>，支援高併發讀寫。</p><p>🔸 <strong>常見工具</strong><br> MySQL、PostgreSQL、Oracle、SQL Server。</p><h3>📊 OLAP（Online Analytical Processing）</h3><p>🔸 <strong>定義</strong><br> OLAP 系統，又稱資料倉儲（Data Warehouse），專為 <strong>批次分析與決策支援</strong> 而設計，強調查詢效率與多維度分析。</p><p>🔸 <strong>核心應用情境</strong><br> 用於商業智慧（BI）、財務分析、行銷報表、預測模型建構等，需要大量聚合運算與跨時間分析的場景。</p><p>🔸 <strong>技術特性</strong><br> 採用 <strong>Schema-on-Write</strong> 模式與 <strong>Columnar Storage（欄式儲存）</strong>，預先定義結構以提升聚合效能。</p><p>🔸 <strong>常見工具</strong><br> ClickHouse、Greenplum、Snowflake、BigQuery、Redshift。</p><h3>🌊 Data Lake（資料湖）</h3><p>🔸 <strong>定義</strong><br> Data Lake 是一種集中式儲存庫，用於保存企業的所有原始資料，支援結構化、半結構化與非結構化資料。</p><p>🔸 <strong>核心應用情境</strong><br> 用於資料收集、清理、轉換與機器學習訓練，可整合 CSV、JSON、XML、影像、影片、IoT Log 等多種來源。</p><p>🔸 <strong>技術特性</strong><br> 採用 <strong>Schema-on-Read</strong> 模式，讀取時才定義結構，靈活但缺乏 ACID 一致性與治理機制。</p><p>🔸 <strong>常見工具</strong><br> Amazon S3、HDFS、Azure Data Lake、Hadoop。</p><p>💬 <strong>挑戰</strong>：若缺乏結構與治理策略，容易淪為「Data Swamp（資料沼澤）」。</p><h3>🧠 Lakehouse（Data Lake + Warehouse）</h3><p>🔸 <strong>定義</strong><br> Lakehouse 是結合 Data Lake 的彈性與 Data Warehouse 的治理能力的新一代架構。<br> 它在資料湖上實現 <strong>ACID Transaction、Schema 管理與 SQL 查詢支援</strong>，形成統一的資料平台。</p><p>🔸 <strong>核心應用情境</strong><br> 同時支援資料分析（BI）與機器學習（ML）工作流程，避免資料重複儲存與管道分裂問題。</p><p>🔸 <strong>技術特性</strong><br> 以 Parquet 為底層格式，結合 <strong>Delta Lake、Apache Iceberg、Apache Hudi</strong> 等技術確保一致性與版本控制。</p><p>🔸 <strong>常見工具</strong><br> Databricks、Snowflake、Apache Iceberg、Apache Hudi。</p><h3>🔁 資料系統演進圖</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkf6RQ4I4oNEdl39ckV0ww.png" /></figure><h3>⚖️ 四者比較表</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*abMBUGNwM3qcqrFdDKeDMQ.png" /></figure><h3>💡 結語：從交易到智慧</h3><p>OLTP 是「資料誕生」的起點，OLAP 是「資料洞察」的過程，<br>Data Lake 是「資料集中」的舞台，而 Lakehouse 則是讓資料真正「產生價值」的終點。</p><p>在這個資料驅動的時代，懂得如何選擇與整合這四種架構，<br>不只是工程問題，更是企業能否從資料中創造競爭力的關鍵。</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dd3f8eaff2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[資料庫系統的鎖定機制在各情境下存在的必要性]]></title>
            <link>https://medium.com/@codeseeker2024/%E8%B3%87%E6%96%99%E5%BA%AB%E7%B3%BB%E7%B5%B1%E7%9A%84%E9%8E%96%E5%AE%9A%E6%A9%9F%E5%88%B6%E5%9C%A8%E5%90%84%E6%83%85%E5%A2%83%E4%B8%8B%E5%AD%98%E5%9C%A8%E7%9A%84%E5%BF%85%E8%A6%81%E6%80%A7-45289f7dfd4f?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/45289f7dfd4f</guid>
            <category><![CDATA[exclusive-lock]]></category>
            <category><![CDATA[database-locking]]></category>
            <category><![CDATA[shared-lock]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[concurrency]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Fri, 03 Oct 2025 08:15:45 GMT</pubDate>
            <atom:updated>2025-10-03T08:15:45.435Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>在資料庫系統中，<strong>鎖定機制（Database Locking）</strong> 是確保資料一致性的關鍵手段。當多個使用者或交易同時存取資料庫時，若沒有妥善的鎖定機制，極可能造成資料錯誤與不一致。本文將透過兩個經典案例，說明為何鎖定在不同情境下是必要的。</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vmBZtqUl-H4IU2VYaOScaA.png" /></figure><h3>💵案例一「銀行ATM交易」</h3><p>銀行ATM交易中，假設你的帳戶有1000元，此時有兩個並發操作：</p><p>操作A：你在ATM提款500元</p><p>操作B：你的配偶同時在另一台ATM提款600元</p><p>如果沒有鎖定機制，可能發生：</p><p>1. A和B同時讀取餘額：都看到1000元</p><p>2. A計算：1000–500=500，準備寫入</p><p>3. B計算：1000–600=400，準備寫入</p><p>4. 結果：最後寫入的覆蓋前一個，帳戶餘額可能是500或400</p><p>但實際上兩筆提款都成功了（實際應該拒絕其中一筆）</p><h4>✨ 解決方案：</h4><p>當操作A開始執行轉帳時，對該帳戶加上「排他鎖」，此時：</p><p>🔹 操作B無法對同一帳戶進行提款（需等待A完成）</p><p>🔹 餘額查詢可以進行，但會讀取到「鎖定前的狀態」或「交易完成後的狀態」</p><p>（取決於資料庫的隔離級別設定）</p><p>這確保了帳戶餘額的正確性，避免超額提領。</p><h3>●🛒案例二 「電商購物時的庫存控制問題」：</h3><p>某商品剩餘庫存為1件，消費者A和B幾乎同時點擊「立即購買」：</p><h4>📌 情境一：沒有鎖定機制（會超賣）</h4><p>1. A的請求：查詢庫存 → 顯示剩餘1件 → 可以購買</p><p>2. B的請求：查詢庫存 → 顯示剩餘1件 → 可以購買</p><p>3. A確認訂單 → 扣減庫存：1–1=0</p><p>4. B確認訂單 → 扣減庫存：1–1=0</p><p>5. 結果：兩筆訂單都成立，但實際只有1件商品（超賣！）</p><h4>✨ 解決方案一：悲觀鎖（適合高競爭商品，如秒殺活動）</h4><p>當A開始結帳流程時：</p><p>1. 對該商品庫存加上「排他鎖」（SELECT … FOR UPDATE）</p><p>2. 確認庫存足夠 → 扣減庫存 → 建立訂單 → 釋放鎖</p><p>3. B的請求必須等待A完成，此時查詢到庫存為0，顯示「已售完」</p><p>4. 優點：絕對不會超賣</p><p>5. 缺點：併發性能較低，等待時間長</p><h4>✨ 解決方案二：樂觀鎖（適合一般商品）</h4><p>不先鎖定，而是在最後更新時檢查：</p><p>1. A讀取：庫存=1（版本號=v1）</p><p>2. B讀取：庫存=1（版本號=v1）</p><p>3. A更新：WHERE 庫存=1 AND 版本=v1，成功 → 庫存變0（版本號=v2）</p><p>4. B更新：WHERE 庫存=1 AND 版本=v1，失敗（版本已改變）→ 提示「商品已售完」</p><p>5. 優點：高併發性能好</p><p>6. 缺點：衝突時需要重試</p><h4>📍 實務補充：</h4><p>🔹「加入購物車」通常不鎖定庫存（否則放著不買會佔用庫存）</p><p>🔹真正的鎖定發生在「提交訂單」或「進入結帳頁面」時</p><p>🔹大型電商通常設定「購物車保留時間」（如15分鐘），超時自動釋放</p><p>經由上面兩種案例，我們可以知道資料庫併發在實務上的應用。</p><h3>🏹資料庫併發控制的目標:</h3><p>👉解決當多個使用者或交易試圖同時存取和更改資料時可能發生的問題</p><p>🔎為了解決這種併發導致的資料不一致性，來源提出了資料庫鎖定（Database Locking）作為解決方案:</p><p>1.排他鎖（又稱寫入鎖定或寫鎖）主要用於資料庫的寫入、更新或編輯操作。</p><p>💡在排他鎖定存在期間，其他交易無法對同一資料取得排他鎖或共享鎖</p><p>2.共享鎖（又稱讀取鎖定或讀鎖）主要用於資料庫的讀取操作。</p><p>💡一旦共享鎖定被取得，沒有人可以對該帳戶取得排他鎖定，因此無法更新資料</p><h3>🎯結語</h3><p>🛡️共享鎖定和排他鎖定完全是彼此的對立面。它們之間的衝突是確保資料一致性的核心機制。</p><p>引入共享鎖定和排他鎖定是為了確保系統的一致性 (consistency)，即使這種機制會犧牲併發性作為代價，但對於銀行這種高度講求一致性的產業來說資料一致性更為重要。</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45289f7dfd4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FastAPI × Kafka 整合的 4 個關鍵：設定、Producer、Consumer、lifespan 啟停]]></title>
            <link>https://medium.com/@codeseeker2024/fastapi-kafka-%E6%95%B4%E5%90%88%E7%9A%84-4-%E5%80%8B%E9%97%9C%E9%8D%B5-%E8%A8%AD%E5%AE%9A-producer-consumer-lifespan-%E5%95%9F%E5%81%9C-61a80ba881c8?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/61a80ba881c8</guid>
            <category><![CDATA[lifespan]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[pydantic]]></category>
            <category><![CDATA[system-integration]]></category>
            <category><![CDATA[kafka]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Mon, 08 Sep 2025 07:07:07 GMT</pubDate>
            <atom:updated>2025-09-08T07:07:07.598Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>把 Kafka 連線與序列化等細節封裝進 <em>KafkaSettings</em>，用 <em>env_nested_delimiter=&quot;__&quot;</em> 管理巢狀環境變數；Producer 提供 <em>publish()</em> 做單點出入口；Consumer 實作 Rebalance Listener，處理分區收回／分配；最後用 FastAPI <em>lifespan</em> 在應用啟動／關閉時，可靠地啟停 Producer/Consumer。</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6-N61ZqWVg6UTWKwh-W1Bg.png" /></figure><h3>為什麼要先把 Kafka 參數「釐清再整合」？</h3><p>在和 FastAPI 整合前，先用獨立腳本 <strong>直接連線 Broker 測試</strong>（能 produce/consume 成功）能省掉大量除錯時間。等連線穩定，再把參數納入設定系統、進入應用程式生命週期。</p><p>📄requirements.txt(需求套件)</p><pre>fastapi<br>uvicorn[standard]<br>pydantic-settings<br>python-dotenv<br>kafka-python</pre><h3>1) 設定管理：用 Pydantic v2 巢狀設定，乾淨又可測</h3><p>把 Kafka 相關參數抽一個「子設定」：KafkaSettings，再由 Settings 聚合管理。關鍵在 SettingsConfigDict(env_nested_delimiter=&quot;__&quot;)，讓我們能用像 KAFKA__BOOTSTRAP_SERVERS 這樣的 env 來覆寫巢狀欄位。</p><p>📄.env 範例（支援 SASL，如不需要就移除相關設定）</p><pre># Kafka 基本<br>KAFKA__BOOTSTRAP_SERVERS=localhost:9092,localhost:9093<br>KAFKA__CLIENT_ID=fastapi-service<br><br># SASL（選用）<br>KAFKA__SECURITY_PROTOCOL=SASL_PLAINTEXT<br>KAFKA__SASL_MECHANISM=SCRAM-SHA-512<br>KAFKA__SASL_PLAIN_USERNAME=app_user<br>KAFKA__SASL_PLAIN_PASSWORD=super_secret<br><br># Topic 與群組<br>KAFKA__TOPIC_EVENTS=events<br>KAFKA__GROUP_ID=fastapi-consumer<br><br># 其他應用設定（舉例）<br>DEFAULT_SCHEMA=public</pre><p>📄settings.py</p><pre>from functools import lru_cache<br>from typing import List, Optional<br>from pydantic import Field<br>from pydantic_settings import BaseSettings, SettingsConfigDict<br><br>class KafkaSettings(BaseSettings):<br>    # 不要在這裡設 env_prefix；我們改由外層 Settings 用巢狀 + delimiter 管理<br>    bootstrap_servers: List[str] = Field(default_factory=lambda: [&quot;localhost:9092&quot;])<br>    client_id: str = &quot;fastapi-service&quot;<br><br>    # 安全性（選用）<br>    security_protocol: str = &quot;PLAINTEXT&quot;  # 或 SASL_PLAINTEXT / SASL_SSL / SSL<br>    sasl_mechanism: Optional[str] = None  # 例如 &quot;SCRAM-SHA-512&quot;<br>    sasl_plain_username: Optional[str] = None<br>    sasl_plain_password: Optional[str] = None<br><br>    # Topics &amp; Group<br>    topic_events: str = &quot;events&quot;<br>    group_id: str = &quot;fastapi-consumer&quot;<br><br>    # 進階 Producer 參數（依需要開放）<br>    acks: str = &quot;all&quot;<br>    linger_ms: int = 0<br>    enable_idempotence: bool = True<br><br>class Settings(BaseSettings):<br>    model_config = SettingsConfigDict(<br>        env_file=&quot;.env&quot;,<br>        env_nested_delimiter=&quot;__&quot;,<br>        case_sensitive=False,<br>    )<br>    default_schema: str = &quot;public&quot;<br>    kafka: KafkaSettings = Field(default_factory=KafkaSettings)<br><br>@lru_cache<br>def get_settings() -&gt; Settings:<br>    return Settings()</pre><p><strong>這樣做的好處</strong>：</p><ul><li><strong>命名空間清楚</strong>：所有 Kafka 參數都放在 settings.kafka.*</li><li><strong>單一職責</strong>：連線、序列化、主題名稱等都在 KafkaSettings，避免 kwargs 四散</li><li><strong>易於擴充</strong>：要多一組 Kafka？加一個 kafka2: KafkaSettings 就好</li><li><strong>支援巢狀 env</strong>：KAFKA__... 風格乾淨、不易出錯</li><li><strong>測試友善</strong>：替換掉 KafkaSettings 就能注入不同 broker/user/topic 組合</li></ul><h3>2) Producer：專注一個 publish() 出口</h3><p>使用 <a href="https://pypi.org/project/kafka-python/">kafka-python</a>（同步版）。在服務內只暴露一個 publish()，其他地方都呼叫它，能夠：</p><ul><li>統一序列化（JSON → bytes）</li><li>集中錯誤處理（KafkaError）</li><li>方便調整 retry／acks 行為</li></ul><pre># app/messaging/producer.py<br>import json<br>from dataclasses import dataclass<br>from typing import Iterable, Optional<br><br>from kafka import KafkaProducer<br>from kafka.errors import KafkaError<br><br><br>def create_producer(cfg) -&gt; KafkaProducer:<br>    kwargs = {<br>        &quot;bootstrap_servers&quot;: cfg.bootstrap_servers,<br>        &quot;client_id&quot;: cfg.client_id,<br>        &quot;value_serializer&quot;: lambda v: json.dumps(v).encode(&quot;utf-8&quot;),<br>        &quot;acks&quot;: cfg.acks,           # 建議 &quot;all&quot;：更強的傳遞保障<br>        &quot;linger_ms&quot;: cfg.linger_ms  # 批次延遲，0 表立即<br>    }<br>    if getattr(cfg, &quot;security_protocol&quot;, None) and cfg.security_protocol != &quot;PLAINTEXT&quot;:<br>        kwargs.update({<br>            &quot;security_protocol&quot;: cfg.security_protocol,<br>            &quot;sasl_mechanism&quot;: cfg.sasl_mechanism,<br>            &quot;sasl_plain_username&quot;: cfg.sasl_plain_username,<br>            &quot;sasl_plain_password&quot;: cfg.sasl_plain_password,<br>        })<br>    return KafkaProducer(**kwargs)<br><br><br>def publish(<br>    producer: KafkaProducer,<br>    topic: str,<br>    value: dict,<br>    key: Optional[bytes] = None,<br>    headers: Optional[list[tuple[str, bytes]]] = None,<br>):<br>    future = producer.send(topic, value=value, key=key, headers=headers)<br>    try:<br>        rec = future.get(timeout=10)<br>        return {&quot;topic&quot;: rec.topic, &quot;partition&quot;: rec.partition, &quot;offset&quot;: rec.offset}<br>    except KafkaError as e:<br>        # TODO: 換成你專案的 logger / APM 追蹤<br>        raise RuntimeError(f&quot;Kafka publish failed: {e}&quot;) from e<br><br><br>@dataclass<br>class ProducerHandle:<br>    &quot;&quot;&quot;方便在 lifespan 關閉時帶著一個統一的物件。&quot;&quot;&quot;<br>    producer: KafkaProducer<br><br><br>def start_producer(<br>    cfg,<br>    *,<br>    warmup_topics: Optional[Iterable[str]] = None,<br>) -&gt; ProducerHandle:<br>    &quot;&quot;&quot;<br>    在 FastAPI lifespan 啟動階段呼叫。<br>    可選擇透過 partitions_for() 預先抓取 metadata 來做健康檢查。<br>    &quot;&quot;&quot;<br>    producer = create_producer(cfg)<br><br>    # 預熱：抓 metadata（若 topic 不存在，這裡可以及早發現 None）<br>    if warmup_topics:<br>        for t in warmup_topics:<br>            try:<br>                parts = producer.partitions_for(t)  # 會觸發 metadata 抓取<br>                if parts is None:<br>                    # 可視需求改成 raise，或僅記錄警告<br>                    print(f&quot;[producer] warmup: topic &#39;{t}&#39; not found (partitions=None)&quot;)<br>                else:<br>                    print(f&quot;[producer] warmup: topic &#39;{t}&#39; partitions={sorted(parts)}&quot;)<br>            except Exception as e:<br>                # 不阻斷應用啟動，但建議在 logger 中記錄<br>                print(f&quot;[producer] warmup for topic &#39;{t}&#39; failed: {e}&quot;)<br><br>    return ProducerHandle(producer=producer)<br><br><br>def stop_producer(<br>    handle: ProducerHandle | KafkaProducer | None,<br>    *,<br>    flush_timeout_s: float = 5.0,<br>) -&gt; None:<br>    &quot;&quot;&quot;<br>    在 FastAPI lifespan 結束階段呼叫：flush 並關閉 Producer。<br>    同時相容直接傳 KafkaProducer 或 ProducerHandle。<br>    &quot;&quot;&quot;<br>    if handle is None:<br>        return<br><br>    producer: KafkaProducer = handle.producer if hasattr(handle, &quot;producer&quot;) else handle  # type: ignore[assignment]<br>    try:<br>        producer.flush(timeout=flush_timeout_s)<br>    except Exception as e:<br>        print(f&quot;[producer] flush failed: {e}&quot;)<br><br>    try:<br>        producer.close(timeout=flush_timeout_s)<br>    except Exception as e:<br>        print(f&quot;[producer] close failed: {e}&quot;)</pre><h3>3) Consumer：實作 Rebalance Listener，穩住狀態切換</h3><p>同一個 group.id 內，只要拓撲或訂閱改變就會 <strong>rebalance</strong>（分區重新分配）。典型觸發：</p><ul><li>新 consumer 加入／離開（重啟、crash）</li><li>心跳逾時（session.timeout.ms），或 poll 太久（max.poll.interval.ms）</li><li>topic 的 partition 數或訂閱 topics 變動</li></ul><p><strong>在 </strong><strong>rebalance 前後要做的事</strong>：</p><ul><li><strong>revoked</strong>（被收回前）：同步 commit 當前 offset、釋放資源、將未處理工作丟回佇列</li><li><strong>assigned</strong>（分配完成）：恢復處理狀態、必要時 seek()、初始化資源後開始處理</li></ul><pre># app/messaging/consumer.py<br>import json<br>import threading<br>from kafka import KafkaConsumer<br>from kafka.errors import KafkaError<br><br>class _RebalanceListener(ConsumerRebalanceListener):<br>    def __init__(self, consumer, enable_auto_commit: bool):<br>        self.consumer = consumer<br>        self.enable_auto_commit = enable_auto_commit<br><br>    def on_partitions_revoked(self, revoked):<br>        print(f&quot;[Consumer] Revoked: {list(revoked)}&quot;)<br>        if not self.enable_auto_commit:<br>            print(&quot;[Consumer] Commit on revoke&quot;)<br>            self.consumer.commit()<br><br>    def on_partitions_assigned(self, assigned):<br>        print(f&quot;[Consumer] Assigned: {list(assigned)}&quot;)<br>        # 需要就這裡做 seek/狀態恢復<br><br>def create_consumer(cfg) -&gt; KafkaConsumer:<br>    kwargs = {<br>        &quot;bootstrap_servers&quot;: cfg.bootstrap_servers,<br>        &quot;group_id&quot;: cfg.group_id,<br>        &quot;client_id&quot;: cfg.client_id,<br>        &quot;enable_auto_commit&quot;: False,       # 成功處理後才手動 commit<br>        &quot;auto_offset_reset&quot;: &quot;earliest&quot;,   # 首次無 committed offset 的策略<br>        &quot;value_deserializer&quot;: lambda b: json.loads(b.decode(&quot;utf-8&quot;)),<br>        &quot;session_timeout_ms&quot;: 10000,<br>        &quot;max_poll_interval_ms&quot;: 300000,<br>    }<br>    if getattr(cfg, &quot;security_protocol&quot;, None) and cfg.security_protocol != &quot;PLAINTEXT&quot;:<br>        kwargs.update({<br>            &quot;security_protocol&quot;: cfg.security_protocol,<br>            &quot;sasl_mechanism&quot;: cfg.sasl_mechanism,<br>            &quot;sasl_plain_username&quot;: cfg.sasl_plain_username,<br>            &quot;sasl_plain_password&quot;: cfg.sasl_plain_password,<br>        })<br><br>    consumer = KafkaConsumer(**kwargs)<br>    listener = RebalanceListener(consumer, enable_auto_commit=kwargs[&quot;enable_auto_commit&quot;])<br>    consumer.subscribe([cfg.topic_events], listener=listener)<br>    return consumer<br><br><br>def consume_loop(<br>    consumer: KafkaConsumer,<br>    stop_event: threading.Event,<br>    handle_message: Callable[[object], None],  # ConsumerRecord in practice<br>    poll_timeout_ms: int = 1000,<br>):<br>    try:<br>        while not stop_event.is_set():<br>            records = consumer.poll(timeout_ms=poll_timeout_ms)<br>            for _tp, messages in (records or {}).items():<br>                for msg in messages:<br>                    try:<br>                        handle_message(msg)  # 你的商業邏輯<br>                        consumer.commit()    # 僅成功處理才提交<br>                    except Exception as e:<br>                        # TODO: 錯誤追蹤／DLQ／重試策略<br>                        print(f&quot;[consume] handle failed: {e}&quot;)<br>    finally:<br>        try:<br>            consumer.close()<br>        except Exception as e:<br>            print(f&quot;[consume] consumer close failed: {e}&quot;)<br><br><br>@dataclass<br>class ConsumerWorker:<br>    consumer: KafkaConsumer<br>    thread: threading.Thread<br>    stop_event: threading.Event<br><br><br>def start_consumer(<br>    cfg,<br>    handle_message: Callable[[object], None],<br>    *,<br>    daemon: bool = True,<br>    thread_name: str = &quot;kafka-consumer&quot;,<br>    poll_timeout_ms: int = 1000,<br>) -&gt; ConsumerWorker:<br>    &quot;&quot;&quot;<br>    在 FastAPI lifespan 啟動：建立 consumer、開背景 Thread 跑 consume_loop。<br>    回傳 ConsumerWorker 以便 stop_consumer 使用。<br>    &quot;&quot;&quot;<br>    consumer = create_consumer(cfg)<br>    stop_event = threading.Event()<br>    thread = threading.Thread(<br>        target=consume_loop,<br>        args=(consumer, stop_event, handle_message, poll_timeout_ms),<br>        daemon=daemon,<br>        name=thread_name,<br>    )<br>    thread.start()<br>    return ConsumerWorker(consumer=consumer, thread=thread, stop_event=stop_event)<br><br><br>def stop_consumer(worker: Optional[ConsumerWorker], *, join_timeout: float = 5.0) -&gt; None:<br>    &quot;&quot;&quot;<br>    在 FastAPI lifespan 結束：優雅停止背景 Thread 與關閉 consumer。<br>    &quot;&quot;&quot;<br>    if not worker:<br>        return<br><br>    # 若執行緒仍在運作，送出停止訊號<br>    if worker.thread.is_alive():<br>        worker.stop_event.set()<br>        worker.thread.join(timeout=join_timeout)<br><br>    # 保險起見，確保 consumer 被關閉（consume_loop 的 finally 也會 close）<br>    try:<br>        worker.consumer.close()<br>    except Exception:<br>        pass</pre><p>● 補充: 什麼是再平衡（rebalance）？</p><p>同一個 group.id 裡有多個 consumer，共同分食一個/多個 topic 的 partitions。只要群組拓撲或訂閱有變動，Kafka 就會把 partitions 重新分配，這個過程就叫 rebalance。常見觸發：</p><p>🔸有新 consumer 加入/離開（進程重啟、crash）</p><p>🔸consumer 心跳逾時（session.timeout.ms）、或 poll 太久（max.poll.interval.ms）</p><p>🔸topic 的 partition 數改變、或 訂閱的 topics 改變</p><h3>4) FastAPI lifespan：統一管理啟停流程</h3><h3>為什麼放在 lifespan？</h3><ul><li><strong>集中資源管理</strong>：應用啟動時建立 Producer/Consumer，關閉時安全釋放。</li><li><strong>避免分散初始化</strong>：把 DB schema、訊息系統、排程等開機流程統一管理。</li><li><strong>與設定一致</strong>：一律由 get_settings() 注入 settings.kafka。</li></ul><pre># app/main.py<br>from contextlib import asynccontextmanager<br>from fastapi import FastAPI, APIRouter, Request<br><br>from app.config.settings import get_settings<br>from app.messaging.producer import start_producer, stop_producer, publish<br>from app.messaging.consumer import start_consumer, stop_consumer, ConsumerWorker<br><br>router = APIRouter()<br><br>@router.post(&quot;/events&quot;)<br>async def emit_event(payload: dict, request: Request):<br>    &quot;&quot;&quot;<br>    將任意 JSON payload送到預設的 events topic。<br>    &quot;&quot;&quot;<br>    app = request.app<br>    meta = publish(<br>        app.state.producer_handle.producer,<br>        app.state.settings.kafka.topic_events,<br>        value=payload,<br>    )<br>    return {&quot;status&quot;: &quot;queued&quot;, &quot;metadata&quot;: meta}<br><br>@router.get(&quot;/health&quot;)<br>async def health(request: Request):<br>    &quot;&quot;&quot;<br>    簡單健康檢查：確認 Producer 可取得 topic 的 partitions metadata。<br>    &quot;&quot;&quot;<br>    app = request.app<br>    producer = app.state.producer_handle.producer<br>    topic = app.state.settings.kafka.topic_events<br>    parts = producer.partitions_for(topic)<br>    return {<br>        &quot;status&quot;: &quot;ok&quot; if parts is not None else &quot;unknown&quot;,<br>        &quot;topic&quot;: topic,<br>        &quot;partitions&quot;: sorted(parts) if parts else None,<br>    }<br><br>def _handle_message(msg):<br>    &quot;&quot;&quot;<br>    Consumer 處理函式：依需求替換為你的商業邏輯。<br>    msg.value 已由 consumer 的 value_deserializer 反序列化為 dict。<br>    &quot;&quot;&quot;<br>    print(f&quot;[consume] {msg.topic}@{msg.partition}#{msg.offset} -&gt; {msg.value}&quot;)<br><br>@asynccontextmanager<br>async def lifespan(app: FastAPI):<br>    &quot;&quot;&quot;<br>    應用生命週期管理：<br>    - 啟動：建立 Producer（可預熱）、啟動 Consumer（背景 Thread）<br>    - 關閉：先停 Consumer，再 flush/close Producer<br>    &quot;&quot;&quot;<br>    settings = get_settings()<br><br>    # 1) 啟動 Producer（可選擇預熱以提前拉 metadata）<br>    producer_handle = start_producer(<br>        settings.kafka,<br>        warmup_topics=[settings.kafka.topic_events],<br>    )<br><br>    # 2) 啟動 Consumer（同步 client 以 Thread 背景執行）<br>    consumer_worker: ConsumerWorker = start_consumer(<br>        settings.kafka,<br>        handle_message=_handle_message,<br>    )<br><br>    # 3) 掛到 app.state 供路由與其他元件使用<br>    app.state.settings = settings<br>    app.state.producer_handle = producer_handle<br>    app.state.consumer_worker = consumer_worker<br><br>    try:<br>        yield<br>    finally:<br>        # 關閉順序：先停 consumer，避免在關閉期間還持續拉訊息<br>        stop_consumer(app.state.consumer_worker)<br>        stop_producer(app.state.producer_handle)<br><br>def create_app() -&gt; FastAPI:<br>    app = FastAPI(lifespan=lifespan)<br>    app.include_router(router)<br>    return app<br><br>app = create_app()</pre><h3>📜常見踩雷與排查清單</h3><ul><li><strong>主機與連線</strong>：bootstrap_servers 必須是 <strong>Broker 對外可達</strong> 的位址與 Port（Docker/K8s 下特別容易卡）。</li><li><strong>協定與機制</strong>：若 Broker 啟用 SASL/SSL，<strong>Producer/Consumer 參數要一致</strong>（security_protocol、sasl_mechanism 等）。</li><li><strong>Topic/權限</strong>：Topic 是否存在？帳號是否有對應 ACL？</li><li><strong>群組與偏移</strong>：group.id 變更會影響 offset；auto_offset_reset 僅在「該群組沒有 committed offset」時生效。</li><li><strong>Rebalance</strong>：避免 handler 卡太久，合理設定 max_poll_interval_ms，失敗重試需搭配死信（dead letter）或外部重試機制。</li><li><strong>序列化</strong>：雙方要有一致的（de）serializer；本文示範 JSON。</li><li><strong>Kafka UI 顯示</strong>：UI 的「Consumers」常只顯示 <strong>活躍中</strong> 的群組與分配，<strong>有生產不代表 UI 一定看到 consumer</strong>。先以 CLI 或程式驗證。</li></ul><h3>📏可擴充的方向</h3><ul><li><strong>多 Kafka 叢集 / 多 Topic</strong>：在 Settings 再加一個 kafka2: KafkaSettings，或在 KafkaSettings 裡加多個 topic 欄位。</li><li><strong>非同步化</strong>：改用 aiokafka，直接在 FastAPI 事件迴圈中運作（不開 thread）。</li><li><strong>觀測性</strong>：把 publish()/consume_loop 接上 metrics（如 Prometheus）與 tracing（如 OpenTelemetry）。</li><li><strong>錯誤處理策略</strong>：引入重試、退避（backoff）與死信佇列（DLQ）設計。</li></ul><h3>🎯結語</h3><p>把 Kafka 參數與行為聚焦在一個設定與幾個明確的入口（publish()、consume_loop()），再用 FastAPI lifespan 做生命週期管理，你的整合會 <strong>更穩定、好維護、易測試</strong>。等骨架成熟，再逐步導入非同步、觀測性與更完整的錯誤處理策略就很自然了</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61a80ba881c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[三個我在前後端整合中踩過的坑（JWT、FastAPI、Ingress）]]></title>
            <link>https://medium.com/@codeseeker2024/%E4%B8%89%E5%80%8B%E6%88%91%E5%9C%A8%E5%89%8D%E5%BE%8C%E7%AB%AF%E6%95%B4%E5%90%88%E4%B8%AD%E8%B8%A9%E9%81%8E%E7%9A%84%E5%9D%91-jwt-fastapi-ingress-c28a3ce1df3e?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c28a3ce1df3e</guid>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[cookies]]></category>
            <category><![CDATA[ingress]]></category>
            <category><![CDATA[fastapi]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 09:34:26 GMT</pubDate>
            <atom:updated>2025-08-27T09:34:26.416Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>在這一兩周的開發過程，我主要卡在 <strong>權限驗證</strong> 的環節。<br> 一開始我以為只是 JWT 帶在 Headers 的問題，結果一路排查下來才發現問題更廣，也可能是出在 Cookies、FastAPI 的驗證方式，甚至到正式部署的 Ingress 設定。</blockquote><blockquote>回頭來看，這段過程算是我跨過很大的一關，也有不少新的體悟。以下整理三個我覺得最容易踩到的坑。</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IoMvKOmWkLsUmFj8d_Ln2Q.png" /></figure><h3>1️⃣ JWT 存放位置：Headers vs Cookies</h3><p>JWT 到底放在哪裡，實際上會影響驗證流程：</p><ul><li>如果放在 <strong>Headers (Authorization)</strong>，通常搭配 Bearer Token 使用，算是比較標準的做法。</li><li>但有時候，系統可能把 JWT 塞在 <strong>Cookies</strong> 裡。這時候，如果驗證邏輯沒寫好，就會出現「本機測試過，但正式環境打不通」的狀況。</li></ul><p>👉 我的解法：<br> 最後我讓系統同時支援 <strong>Headers 與 Cookies 驗證</strong>，並且在開發初期就把驗證流程設計清楚，避免掉進「以為 JWT 一定在 Authorization header」的陷阱。</p><h3>2️⃣ FastAPI 的 HTTPBearer 驗證</h3><p>在 FastAPI 中，HTTPBearer() 是個很常用的工具，但它有一個容易被忽略的點：<br>🔸 它會<strong>直接檢查 Authorization header 的格式</strong>，只要沒過，就會立刻回傳 403 Forbidden。</p><p>🔸這看似方便，但其實有點「隱形的坑」，因為通常我們在專案一開始就用了，後面就很難懷疑它是問題來源。</p><p>👉 我的解法：<br> 我後來改成自己寫一個 <strong>dependency</strong>，把 JWT 的解析與驗證邏輯獨立出來，並能同時處理 Header / Cookie。這樣不會被 HTTPBearer 鎖死。</p><h3>3️⃣ Ingress 與 API 路徑規則</h3><p>最後一個問題是在正式叢集部署時出現的。<br> Ingress 對 API 路徑有嚴格規則，如果沒對應好，就會出現：</p><ul><li>405 Method Not Allowed</li><li>404 Not Found</li></ul><p>這也是一個「環境才會爆出來」的坑，本機測試完全正常，但上到 K8s 就歪掉。</p><p>👉 我的解法：<br> 確定 <strong>Ingress path 與後端 router 路徑一致</strong>，並在 CI/CD 流程中加上簡單的 endpoint 健康檢查，避免部署後才發現。</p><h3>🌱 學到的新概念：Schema Driven Form</h3><p>除了踩坑，這次也讓我學到一個新的思維：<br> 過去我習慣依賴後端框架直接渲染前端畫面，現在開始接觸 <strong>Schema Driven 的表單設計</strong>。</p><p>這讓我更清楚感受到「前後端分離」的差異：</p><ul><li>不再是後端決定前端長什麼樣子</li><li>而是前端依照 Schema 動態生成畫面</li><li>修改表單結構時，不必重寫整個前端頁面，維護成本更低</li></ul><h3>🎯 總結</h3><p>🔸這兩周雖然遇到不少挑戰，但也算是跨過一個大檻：</p><ul><li>把 <strong>JWT 驗證</strong> 從單一 Header 擴展到支援 Cookies</li><li>理解了 FastAPI <strong>HTTPBearer 的限制</strong></li><li>也踩過 Ingress <strong>路徑配置的坑</strong></li></ul><p>🔸同時，我對 <strong>Schema Driven Form</strong> 有了初步認識，這比單純解決 bug 更有價值，因為它改變了我設計系統的思維。</p><p>🔸最後小小成果是：<br>我也比之前更熟悉 <strong>Postman</strong> 的使用，測試 API 流程變得順手很多，後續開發效率會更好。</p><p>📌 如果你也正在做前後端整合，希望這三個坑能幫你省下一些時間。</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c28a3ce1df3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[四款高效繪圖工具：系統分析師與專案經理的必備夥伴]]></title>
            <link>https://medium.com/@codeseeker2024/%E5%9B%9B%E6%AC%BE%E9%AB%98%E6%95%88%E7%B9%AA%E5%9C%96%E5%B7%A5%E5%85%B7-%E7%B3%BB%E7%B5%B1%E5%88%86%E6%9E%90%E5%B8%AB%E8%88%87%E5%B0%88%E6%A1%88%E7%B6%93%E7%90%86%E7%9A%84%E5%BF%85%E5%82%99%E5%A4%A5%E4%BC%B4-d3220f74287f?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3220f74287f</guid>
            <category><![CDATA[system-analysis]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[sequence-diagrams]]></category>
            <category><![CDATA[uml]]></category>
            <category><![CDATA[entity-relationship-model]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Tue, 12 Aug 2025 05:43:28 GMT</pubDate>
            <atom:updated>2025-08-12T05:52:02.694Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>無論是系統分析師還是專案經理，日常工作中經常需要繪製 <strong>流程圖、架構圖、ER 圖</strong> 等各類圖表，來協助溝通與決策。<br> 一款好用的繪圖工具，不僅能讓視覺呈現更專業，也能大幅提升製作效率。</blockquote><blockquote>以下精選 <strong>4 款我常用且容易上手的繪圖工具</strong>，涵蓋從流程設計到資料庫建模的多種需求。</blockquote><h3>1️⃣ diagrams.net（舊名 draw.io）</h3><p>URL : <a href="https://www.drawio.com/">https://www.drawio.com/</a></p><p>● XML檔案範例 :</p><pre>&lt;mxfile host=&quot;app.diagrams.net&quot;&gt;<br>  &lt;diagram name=&quot;電商平台系統架構&quot;&gt;<br>    &lt;mxGraphModel&gt;<br>      &lt;root&gt;<br>        &lt;mxCell id=&quot;0&quot; /&gt;<br>        &lt;mxCell id=&quot;1&quot; parent=&quot;0&quot; /&gt;<br>        &lt;mxCell id=&quot;2&quot; value=&quot;前端 Web / App&quot; style=&quot;rounded=1;fillColor=#dae8fc;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;<br>          &lt;mxGeometry x=&quot;60&quot; y=&quot;60&quot; width=&quot;140&quot; height=&quot;40&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;3&quot; value=&quot;API Gateway&quot; style=&quot;rounded=1;fillColor=#fff2cc;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;<br>          &lt;mxGeometry x=&quot;260&quot; y=&quot;60&quot; width=&quot;140&quot; height=&quot;40&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;4&quot; value=&quot;後端服務&quot; style=&quot;rounded=1;fillColor=#d5e8d4;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;<br>          &lt;mxGeometry x=&quot;260&quot; y=&quot;160&quot; width=&quot;140&quot; height=&quot;40&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;5&quot; value=&quot;資料庫 MySQL / Redis&quot; style=&quot;rounded=1;fillColor=#f8cecc;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;<br>          &lt;mxGeometry x=&quot;460&quot; y=&quot;160&quot; width=&quot;180&quot; height=&quot;40&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;6&quot; value=&quot;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;2&quot; target=&quot;3&quot;&gt;<br>          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;7&quot; value=&quot;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;3&quot; target=&quot;4&quot;&gt;<br>          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;8&quot; value=&quot;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;4&quot; target=&quot;5&quot;&gt;<br>          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>      &lt;/root&gt;<br>    &lt;/mxGraphModel&gt;<br>  &lt;/diagram&gt;<br>&lt;/mxfile&gt;</pre><p>● 流程圖(.png):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*7G8d3N1Xa4j7NmfRKlo-XA.png" /></figure><p>● 操作介面:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Rou7ZHyH6pHddUTMMNgEw.png" /></figure><p>✨<strong>優勢</strong></p><ul><li>免費使用，功能齊全</li><li>支援多種格式與雲端同步（Google Drive、OneDrive 等）</li><li>內建豐富圖形庫（UML、泳道圖、流程圖等）</li></ul><p>⛩️<strong>適用場景</strong></p><ul><li>系統架構圖</li><li>專案規劃圖</li><li>組織結構圖</li><li>線上 / 離線繪圖</li></ul><h3>2️⃣ Lucidchart</h3><p>URL : <a href="https://www.lucidchart.com/pages">https://www.lucidchart.com/pages</a></p><p>● XML檔案範例 :</p><pre>&lt;mxfile host=&quot;app.diagrams.net&quot;&gt;<br>  &lt;diagram name=&quot;電商平台系統架構&quot;&gt;<br>    &lt;mxGraphModel&gt;<br>      &lt;root&gt;<br>        &lt;mxCell id=&quot;0&quot; /&gt;<br>        &lt;mxCell id=&quot;1&quot; parent=&quot;0&quot; /&gt;<br>        &lt;mxCell id=&quot;2&quot; value=&quot;前端 Web / App&quot; style=&quot;rounded=1;fillColor=#dae8fc;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;<br>          &lt;mxGeometry x=&quot;60&quot; y=&quot;60&quot; width=&quot;140&quot; height=&quot;40&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;3&quot; value=&quot;API Gateway&quot; style=&quot;rounded=1;fillColor=#fff2cc;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;<br>          &lt;mxGeometry x=&quot;260&quot; y=&quot;60&quot; width=&quot;140&quot; height=&quot;40&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;4&quot; value=&quot;後端服務&quot; style=&quot;rounded=1;fillColor=#d5e8d4;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;<br>          &lt;mxGeometry x=&quot;260&quot; y=&quot;160&quot; width=&quot;140&quot; height=&quot;40&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;5&quot; value=&quot;資料庫 MySQL / Redis&quot; style=&quot;rounded=1;fillColor=#f8cecc;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;<br>          &lt;mxGeometry x=&quot;460&quot; y=&quot;160&quot; width=&quot;180&quot; height=&quot;40&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;6&quot; value=&quot;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;2&quot; target=&quot;3&quot;&gt;<br>          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;7&quot; value=&quot;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;3&quot; target=&quot;4&quot;&gt;<br>          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>        &lt;mxCell id=&quot;8&quot; value=&quot;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;4&quot; target=&quot;5&quot;&gt;<br>          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;<br>        &lt;/mxCell&gt;<br>      &lt;/root&gt;<br>    &lt;/mxGraphModel&gt;<br>  &lt;/diagram&gt;<br>&lt;/mxfile&gt;</pre><p>● 流程圖(.png):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*C3vZ7pfij6Y6NjkGFNaGyA.png" /></figure><p>● 操作介面:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HLmA6Q5b9VmxlXOwjI2Asg.png" /></figure><p>✨<strong>優勢</strong></p><ul><li>介面直覺，容易上手</li><li>支援多人即時協作</li><li>提供大量範本</li><li>可與 Google Workspace、Slack、Jira 等工具整合</li></ul><p>⛩️<strong>適用場景</strong></p><ul><li>跨部門專案繪圖</li><li>業務流程設計</li><li>系統設計圖</li><li>甘特圖製作</li></ul><h3>3️⃣ dbdiagram.io</h3><p>URL : <a href="https://dbdiagram.io/home">https://dbdiagram.io/home</a></p><p>● DSL範例 :</p><pre>Table Department {<br>  id int [pk]<br>  name varchar<br>}<br><br>Table Employee {<br>  id int [pk]<br>  name varchar<br>  department_id int [ref: &gt; Department.id]<br>  title varchar<br>}<br><br>Table Project {<br>  id int [pk]<br>  name varchar<br>  start_date date<br>  end_date date<br>  owner_id int [ref: &gt; Employee.id]<br>}</pre><p>● 資料庫關聯圖(.png)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VZXDcN_0l8zl7R4Qd5DA-g.png" /></figure><p>● 操作介面:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FBPig_PrJVsG3sNuD_tpDw.png" /></figure><p>✨<strong>優勢</strong></p><ul><li>以簡單 DSL 語法快速生成 ER 圖</li><li>支援 SQL 匯入與輸出</li><li>易於分享與協作</li></ul><p>⛩️<strong>適用場景</strong></p><ul><li>資料庫設計</li><li>系統分析初期資料討論</li><li>ERD 文件化與維護</li></ul><h3>4️⃣ PlantText（基於 PlantUML）</h3><p>URL : <a href="https://www.planttext.com/">https://www.planttext.com/</a></p><p>● PlantUML範例:</p><pre>@startuml<br>actor User<br>participant &quot;Login Page&quot; as LP<br>participant &quot;Auth Service&quot; as AS<br>database &quot;DB&quot; as DB<br><br>User -&gt; LP : 輸入帳密<br>LP -&gt; AS : 傳送登入請求<br>AS -&gt; DB : 驗證帳密<br>DB --&gt; AS : 回傳結果<br>AS --&gt; LP : 發送 JWT Token<br>LP --&gt; User : 顯示登入成功<br>@enduml</pre><p>● 循序圖(.png)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*2B4jfElxIRdLk9YzP0B1BQ.png" /></figure><p>● 操作介面:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Y4APvbCN56DDoOCrmc74g.png" /></figure><p>✨<strong>優勢</strong></p><ul><li>透過文字語法生成 UML 圖</li><li>易於版本控管（Git）</li><li>支援多種類型圖表（流程圖、序列圖、類別圖等）</li></ul><p>⛩️<strong>適用場景</strong></p><ul><li>在程式碼中嵌入圖表</li><li>Git 控管下的圖表維護</li><li>技術文件視覺化</li></ul><h3>🎯總結</h3><p>選擇一款順手的繪圖工具，能有效提升文件產出與溝通效率。<br>建議先試用幾款，找到最符合自己需求的工具後，深入學習它的進階功能。<br><strong>不一定要花大錢，也能做出專業又高效的圖表成果。</strong></p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3220f74287f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ GitHub Pages 免費部署個人履歷靜態網站：5–10 分鐘搞定]]></title>
            <link>https://medium.com/@codeseeker2024/github-pages-%E5%85%8D%E8%B2%BB%E9%83%A8%E7%BD%B2%E5%80%8B%E4%BA%BA%E5%B1%A5%E6%AD%B7%E9%9D%9C%E6%85%8B%E7%B6%B2%E7%AB%99-5-10-%E5%88%86%E9%90%98%E6%90%9E%E5%AE%9A-016c698957e5?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/016c698957e5</guid>
            <category><![CDATA[portfolio]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[static-site]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[github-pages]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Sun, 10 Aug 2025 11:31:48 GMT</pubDate>
            <atom:updated>2025-08-10T11:31:48.666Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>製作自己的個人履歷並放上專案，是許多前端課程常見的實作單元。</blockquote><blockquote>部署方式有很多種，例如雲端主機、Render 等，但今天要介紹的是最簡單的方法 — — <strong>利用 GitHub Pages，從現有的 Repository 快速部署靜態網站</strong>。</blockquote><blockquote>⚡全程只需 <strong>5–10 分鐘</strong>，就能讓你的履歷上線！</blockquote><h3>🫧GitHub Pages 的兩種模式</h3><h3>1️⃣ 主站模式</h3><ul><li><strong>Repository 名稱</strong>： &lt;使用者名稱&gt;.github.io</li><li><strong>網站網址</strong>： https://&lt;使用者名稱&gt;.github.io/</li></ul><h3>2️⃣ 專案模式</h3><ul><li><strong>Repository 名稱</strong>：可自訂，例如 my-project-site</li><li><strong>網站網址</strong>： https://&lt;使用者名稱&gt;.github.io/my-project-site/</li></ul><p>🔔 <strong>記得啟用 GitHub Pages</strong><br> 進入 <strong>Settings → Pages</strong>，進行以下設定：</p><ol><li><strong>Build and deployment</strong> → 選 Deploy from a branch</li><li><strong>Branch</strong> 選 main，資料夾選 /（root）</li></ol><h3>🗡️實作步驟</h3><h4><strong>1. 建立檔案</strong>（HTML、CSS）</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JgfA0vByyttfsnB5ymgcCw.png" /></figure><h4>2. 建立一個 <strong>GitHub Repository</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9opq76JVpo3xOlVLpZl_og.png" /></figure><h4>3.在本地 <strong>初始化 Git</strong></h4><pre>git init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dt_UdxzMsVqwA1FQ6uKezA.png" /></figure><h4><strong>4.新增檔案至暫存區</strong></h4><pre>git add .</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YhIjn4-6DUyxgveSVGcjUw.png" /></figure><h4><strong>5.建立 commit 並切到主分支</strong></h4><pre>git commit -m &quot;Initial commit&quot; <br>git branch -M main</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-zxFkG3UfmHTWZF3JQG4Q.png" /></figure><h4><strong>6.綁定遠端 repo 並推送</strong></h4><pre>git remote add origin https://github.com/&lt;使用者名稱&gt;/&lt;repo名稱&gt;.git<br>git push -u origin main</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dpff4ygJsDacFnCcvOgkRg.png" /></figure><h4><strong>7.至 Settings → Pages 啟用 GitHub Pages</strong></h4><ul><li>打開你的 <strong>GitHub Repository</strong> 頁面</li><li>點擊上方選單的 <strong>Settings</strong>（設定）</li><li>左側選單找到 <strong>Pages</strong>（或搜尋 “Pages”）</li><li>在 <strong>Build and deployment</strong> 區塊，將 <strong>Source</strong> 設為 <strong>Deploy from a branch</strong></li><li>在 <strong>Branch</strong> 選擇 main 分支</li><li>在 <strong>資料夾（/root）</strong> 選 /（root）</li><li>按下 <strong>Save</strong>（儲存）</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jS_rnzT7KNPlRmpB97btRQ.png" /></figure><h4><strong>8.開啟 GitHub Pages 提供的網址，查看你的履歷網站</strong> 🎉</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V9Dhgp6dQRGAoDbEVkAD9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*131g-6ZnJEyMwl8yRqG3jg.png" /></figure><h3>⚠️注意事項</h3><p><strong>一、網址規則</strong></p><ul><li>主站模式網址結尾必須是 .github.io</li><li>專案模式則會以 https://&lt;使用者名稱&gt;.github.io/&lt;專案名稱&gt;/ 形式顯示</li></ul><p><strong>二、啟用 Pages 設定</strong></p><ul><li>記得到 <strong>Settings → Pages</strong> 啟用</li><li>分支選擇 main</li><li>資料夾選 /（root）或 /docs（視專案檔案位置而定）</li></ul><p><strong>三、檔案命名規則</strong></p><ul><li>入口檔案必須為 index.html（區分大小寫）</li><li>如果入口檔案命名錯誤，會直接顯示 404</li></ul><p><strong>四、更新網站內容</strong></p><ul><li>修改檔案後必須重新 git add .、git commit、git push 才會更新</li><li>更新後 GitHub Pages 可能需要 30 秒～2 分鐘才會顯示最新內容</li></ul><p><strong>五、快取問題</strong></p><ul><li>有時候瀏覽器快取會導致看不到更新內容，可嘗試強制重新整理（Ctrl + F5 / Cmd + Shift + R）</li></ul><p>💡GitHub Pages 是一個免費又簡單的方法，讓你的履歷與作品快速上線。<br> 不用額外伺服器、不用買網域，幾分鐘就能完成，超適合初學者與想快速展示作品的開發者！</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=016c698957e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Amazon Web Services（AWS）－常用服務與應用場景]]></title>
            <link>https://medium.com/@codeseeker2024/amazon-web-services-aws-%E5%B8%B8%E7%94%A8%E6%9C%8D%E5%8B%99%E8%88%87%E6%87%89%E7%94%A8%E5%A0%B4%E6%99%AF-65ff30407226?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/65ff30407226</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aurora]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-iam]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Fri, 08 Aug 2025 02:59:19 GMT</pubDate>
            <atom:updated>2025-08-08T02:59:19.664Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>在 AWS 生態系中，服務種類繁多，但若你是剛接觸雲端技術的新手開發者、資料工程師，或是希望建立穩定雲端架構的團隊成員，以下這 <strong>8 項核心服務</strong> 是最常出現在網站部署、網路資源管理、權限控管與日誌監控等實務應用中的關鍵角色。</blockquote><p>以下將逐一簡介，幫助你快速掌握它們的用途與優勢 👇</p><h3>1️.S3 — 靜態檔案儲存</h3><p>適用於網站資源、圖片、備份資料等物件的高可用儲存方案，支援版本控制與自動備份，是部署前端靜態網站或儲存使用者上傳資料的常見選擇。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0LGCogdYmJ6_CCchAVjM3w.png" /></figure><h3>2️.Lambda — Serverless 計算服務</h3><p>無需管理伺服器，只需撰寫程式邏輯即可執行事件驅動流程，如處理 API 請求、圖片轉換、資料串流等。具備自動擴展與高彈性特性，是打造微服務架構的重要一員。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u4OJrR8HNAg_bO1jtgpopg.png" /></figure><h3>3️.VPC — 虛擬私有雲（Virtual Private Cloud）</h3><p>建構一個專屬、隔離且可控的網路空間，讓你自訂 IP 位址、子網（Subnet）、路由表與防火牆規則，是保護內部資源的第一道防線。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FhouCeBX5eSC8Yo6qiPcQg.png" /></figure><h3>4️.CloudFormation — 基礎架構即程式碼（IaC）</h3><p>透過 YAML 或 JSON 檔案描述你的 AWS 架構，自動化部署與重複建置環境，大幅提升 DevOps 團隊的效率與版本可控性。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y4URp6XzG6_Pld19wH2NiA.png" /></figure><h3>5️.API Gateway — API 請求入口</h3><p>作為前端與後端之間的橋梁，整合 Lambda、認證服務與日誌監控，能靈活處理 RESTful 與 WebSocket API，是 Serverless 架構中的關鍵元件。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pqj2Dj3rnshHdzkeNtkGjQ.png" /></figure><h3>6️.Aurora / RDS — 管理式關聯式資料庫</h3><p>提供高效能、安全、可擴充的資料庫平台，支援 MySQL、PostgreSQL、SQL Server 等引擎。Aurora 是 AWS 自家優化版本，效能更強，適合中大型應用。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y0dOppMrCupMWojeosWnnQ.png" /></figure><h3>7️.CloudWatch — 監控與日誌服務</h3><p>集中收集應用與資源的指標、日誌與警示設定，支援自動告警與儀表板展示，是 Observability（可觀測性）架構中不可或缺的工具。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bsacZI4chEE-F0-bgyzfPQ.png" /></figure><h3>8️.IAM — 身分與權限控管（Identity and Access Management）</h3><p>管理 AWS 中的使用者、角色與服務之間的存取權限，遵守最小權限原則，確保雲端資源的安全性與可控性。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W9G8XUW4COwIivYac74nwg.png" /></figure><h3>🎯 結語：從這 8 項服務開始，打造穩健的雲端架構</h3><p>無論你是剛入門 AWS，或是準備規劃大型雲端專案，這 <strong>8 大服務</strong> 幾乎涵蓋了運算、儲存、網路、安全、部署與監控的所有核心環節。掌握它們，將大幅提升你在雲端開發與維運上的效率與彈性。</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65ff30407226" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Google Cloud 常用服務與應用場景整理]]></title>
            <link>https://medium.com/@codeseeker2024/google-cloud-%E5%B8%B8%E7%94%A8%E6%9C%8D%E5%8B%99%E8%88%87%E6%87%89%E7%94%A8%E5%A0%B4%E6%99%AF%E6%95%B4%E7%90%86-7e7da67b2e89?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e7da67b2e89</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[vertex-ai]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[gke]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 10:16:14 GMT</pubDate>
            <atom:updated>2025-08-07T10:16:14.830Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>在雲端開發、資料分析與 AI 專案中，Google Cloud 提供了一系列強大且彈性的工具。以下整理出 <strong>5 項在實務上常被使用的服務</strong>，以及它們各自對應的 <strong>典型應用場景</strong>，無論你是資料科學家、DevOps 工程師或是 AI 開發者，都能找到適合的解決方案。</blockquote><h3>1️.BigQuery — 大數據分析的核心引擎</h3><p><strong>定位：</strong> 雲端資料倉儲與數據分析工具<br><strong>適用場景：</strong></p><ul><li>分析 TB / PB 級的資料集</li><li>建立即時查詢與資料模型</li><li>搭配 BI 工具快速產出報表</li></ul><p>BigQuery 是處理大規模資料的絕佳選擇，支援標準 SQL 查詢，並與 Looker、Data Studio 等視覺化工具深度整合，適合需要高效能查詢的數據團隊。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oImiCiycQGr7dxwKiUTTPA.png" /></figure><h3>2️. Cloud Run — 無伺服器的容器部署服務</h3><p><strong>定位：</strong> 託管容器化應用程式的平台<br><strong>適用場景：</strong></p><ul><li>快速部署 RESTful API 或前端應用</li><li>部署 Python、Node.js、Go 等應用</li><li>利用 HTTP 請求觸發的事件驅動架構</li></ul><p>Cloud Run 支援自動擴縮與秒級啟動時間，是建置輕量應用與微服務的理想選擇。你只需提供容器映像檔，其餘交給 Google 管理。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F4tVacTayrx-qk87V6NZQg.png" /></figure><h3>3️. GKE (Google Kubernetes Engine) — 原生 K8s 管理平台</h3><p><strong>定位：</strong> Kubernetes 容器編排與資源管理平台<br><strong>適用場景：</strong></p><ul><li>大規模部署微服務</li><li>跨區域部署高可用服務</li><li>自動化資源調度與 CI/CD 整合</li></ul><p>GKE 提供穩定、可擴展的 Kubernetes 基礎架構，並支援多種 DevOps 工具與 GitOps 流程，是企業級服務的首選平台。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2MD70uiv0Ko_1Y_q14MquQ.png" /></figure><h3>4️. Vertex AI — 一站式 AI 模型訓練與部署平台</h3><p><strong>定位：</strong> 雲端 AI/ML 生命週期整合平台<br><strong>適用場景：</strong></p><ul><li>快速建立與訓練自訂機器學習模型</li><li>MLOps 自動化工作流程</li><li>自動化模型部署與監控</li></ul><p>Vertex AI 把訓練、部署、評估模型的流程集中於一處，讓資料科學家與 ML 工程師能更專注於模型本身，而非基礎設施管理。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t2f8X0L3M97_NlWOdqd4XQ.png" /></figure><h3>5️. Looker — 資料分析與視覺化平台</h3><p><strong>定位：</strong> 支援語意模型層的商業智慧工具<br><strong>適用場景：</strong></p><ul><li>建立自助式儀表板與報表</li><li>建構語意模型以統一資料定義</li><li>對接多種資料來源進行即時視覺化</li></ul><p>Looker 的語意模型層讓資料團隊能定義一致的商業邏輯，並提供使用者簡單的操作介面，是資料驅動決策的關鍵工具。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AKdvvNXPH-QmOzCAo7ignQ.png" /></figure><h3>🎯 總結</h3><p>這五項服務構成了 Google Cloud 生態系中的「基礎建設」與「應用層支柱」，從部署應用、管理容器，到數據分析與 AI 模型開發，皆能找到最適合的工具與平台。</p><p>如果你正在規劃雲端架構、AI 專案或資料治理流程，不妨從這幾項服務開始熟悉，相信能為你的開發效率與系統穩定性帶來質的提升。</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e7da67b2e89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[✒️《GraphQL × FastAPI》實作 Mutation 操作：打造安全又彈性的資料寫入 API]]></title>
            <link>https://medium.com/@codeseeker2024/%EF%B8%8F-graphql-fastapi-%E5%AF%A6%E4%BD%9C-mutation-%E6%93%8D%E4%BD%9C-%E6%89%93%E9%80%A0%E5%AE%89%E5%85%A8%E5%8F%88%E5%BD%88%E6%80%A7%E7%9A%84%E8%B3%87%E6%96%99%E5%AF%AB%E5%85%A5-api-322d4fabb6bc?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/322d4fabb6bc</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[rest-api]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 10:51:25 GMT</pubDate>
            <atom:updated>2025-08-07T01:44:26.173Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>在前兩篇文章中，我們已完成 <strong>查詢（Query）功能的整合(</strong><a href="https://medium.com/@codeseeker2024/graphql-fastapi-%E6%89%93%E9%80%A0%E7%8F%BE%E4%BB%A3%E5%8C%96-api-%E6%9E%B6%E6%A7%8B-%E5%AF%A6%E7%8F%BE%E6%9F%A5%E8%A9%A2%E8%88%87%E5%AF%AB%E5%85%A5%E5%88%86%E9%9B%A2%E8%A8%AD%E8%A8%88-13e6958df23b">💫《GraphQL × FastAPI》打造現代化 API 架構：實現查詢與寫入分離設計！</a><strong>)</strong>，並透過 <strong>JWT 驗證機制</strong> 確保 API 安全性(<a href="https://medium.com/@codeseeker2024/graphql-fastapi-graphql-query-jwt-%E6%AC%8A%E9%99%90%E6%95%B4%E5%90%88%E5%AF%A6%E4%BD%9C%E6%8C%87%E5%8D%97-27d01cf8c606">🔐《GraphQL × FastAPI》GraphQL Query × JWT 權限整合實作指南</a>)。然而，對於多數實務應用而言，「<strong>資料寫入</strong>」往往才是 API 的主要核心。</blockquote><blockquote>無論是新增使用者、修改設定或刪除紀錄，這些行為在 GraphQL 架構中，都屬於 <strong>Mutation 操作</strong>。因此，本文將帶你一步步實作 Mutation，並結合權限驗證與安全性控制，打造一套 <strong>安全、可擴充且彈性的寫入 API 架構</strong>。</blockquote><h3>🔍 為什麼需要 Mutation？</h3><p>在 GraphQL 中，Mutation 是專門處理「<strong>資料變更（Create / Update / Delete）</strong>」的操作類型。與查詢（Query）一樣，它也支援：</p><ul><li>欄位自選（前端只拿自己需要的欄位）</li><li>單一請求中同時取得變更後資料（如新增後直接回傳該筆紀錄）</li></ul><p>這大幅減少了資料傳輸的冗餘，提升了前後端溝通效率。</p><h3>🛠️ Mutation 實作步驟</h3><p>以下以一個簡化版本的 Employee 實體為例，帶你逐步實作 GraphQL 的 Mutation 操作。</p><h3>1️⃣ 在 models.py 中新增對應的寫入邏輯</h3><p>●models.py:</p><pre>from pydantic import BaseModel<br>from typing import ClassVar, List<br><br>class User(BaseModel):<br>    id: int<br>    username: str<br>    email: str<br>    roles: List[str] = []<br>    <br>    # 類別變數（全域資料暫存，模擬資料庫）<br>    _users: ClassVar[List[&quot;User&quot;]] = []<br>    _next_id: ClassVar[int] = 1<br><br>    @classmethod<br>    def create(cls, username: str, email: str, roles: List[str] = None) -&gt; &quot;User&quot;:<br>        if roles is None:<br>            roles = []<br>        <br>        user = cls(<br>            id=cls._next_id,<br>            username=username,<br>            email=email,<br>            roles=roles<br>        )<br> <br>        cls._users.append(user)<br>        cls._next_id += 1<br>        return user<br>    <br>    @classmethod<br>    def all(cls) -&gt; List[&quot;User&quot;]:<br>        return cls._users.copy()</pre><h3>2️⃣ 在 schema.py 中定義 Mutation 類別與 resolver</h3><p>●schema.py:</p><pre>import strawberry<br>from typing import List<br>from models import User <br><br>@strawberry.type<br>class UserType:<br>    id: int<br>    username: str<br>    email: str<br>    roles: List[str] <br><br># Query（查詢使用者）<br>@strawberry.type<br>class Query:<br>    @strawberry.field<br>    def all_users(self) -&gt; List[UserType]:<br>        from models import User<br>        return [UserType(**u.model_dump()) for u in User.all()]<br>    <br># Mutation（建立使用者）<br>@strawberry.type<br>class Mutation:<br>    @strawberry.mutation<br>    def create_user(self, username: str, email: str, roles: List[str]) -&gt; UserType:<br>        user = User.create(username=username, email=email, roles=roles)<br>        return UserType(<br>            id=user.id,<br>            username=user.username,<br>            email=user.email,<br>            roles=user.roles  <br>        )<br><br># 組合schema<br>schema = strawberry.Schema(query=Query, mutation=Mutation)</pre><h3>3️⃣ 使用 Nitro 測試 Mutation</h3><p>1.建立Mutation(建立使用者):</p><p>● 發送POST請求並帶上參數及JWT Token於Headers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xILfb7ek62r3eBZMLdF1PA.png" /></figure><pre>mutation MyMutation {<br>  createUser(email: &quot;aaron@outlook.com&quot;, roles: &quot;工程師&quot;, username: &quot;aaron&quot;) {<br>    email<br>    id<br>    roles<br>    username<br>  }<br>}</pre><p>● 回傳的Schema:</p><pre>{<br>  &quot;data&quot;: {<br>    &quot;createUser&quot;: {<br>      &quot;email&quot;: &quot;aaron@outlook.com&quot;,<br>      &quot;id&quot;: 1,<br>      &quot;roles&quot;: [<br>        &quot;工程師&quot;<br>      ],<br>      &quot;username&quot;: &quot;aaron&quot;<br>    }<br>  }<br>}</pre><p>2.建立Query(查詢使用者):</p><p>● 發送GET請求:</p><pre>query MyQuery {<br>  allUsers {<br>    email<br>    id<br>    roles<br>    username<br>  }<br>}</pre><p>● 回傳的schema:</p><pre>{<br>  &quot;data&quot;: {<br>    &quot;allUsers&quot;: [<br>      {<br>        &quot;email&quot;: &quot;aaron@outlook.com&quot;,<br>        &quot;id&quot;: 1,<br>        &quot;roles&quot;: [<br>          &quot;工程師&quot;<br>        ],<br>        &quot;username&quot;: &quot;aaron&quot;<br>      }<br>    ]<br>  }<br>}</pre><h3>🔐 補充：加入權限驗證與資料驗證</h3><p>為了讓 Mutation 更貼近實務，我們可以加入以下強化措施：</p><h3>🔦 角色驗證</h3><p>限制只有特定角色（例如 admin）才可執行 Mutation，可透過 context 取得 user 資訊：</p><p>● 範例 :</p><pre>@strawberry.mutation<br>def create_employee(self, input: EmployeeInput, info: Info) -&gt; Employee:<br>    user = info.context[&quot;user&quot;]<br>    if &quot;admin&quot; not in user[&quot;roles&quot;]:<br>        raise Exception(&quot;Unauthorized&quot;)<br>    return Employee.create(input.model_dump())</pre><h3>🔦 輸入資料驗證</h3><p>善用 Pydantic 或自定義檢查邏輯，避免不當或惡意輸入：</p><p>● 範例 :</p><pre>@strawberry.input<br>class EmployeeInput:<br>    id: int<br>    name: Annotated[str, strawberry.argument(description=&quot;不可為空&quot;)]<br>    email: str<br>    position: Optional[str]</pre><p>若你使用的是 async 資料庫操作（如 SQLModel + AsyncSession），記得在 Resolver 中加上 async/await：</p><p>● 範例 :</p><pre>@strawberry.mutation<br>async def create_employee(self, input: EmployeeInput) -&gt; Employee:<br>    async with async_session() as session:<br>        employee = EmployeeModel(**input.model_dump())<br>        session.add(employee)<br>        await session.commit()<br>        return employee</pre><h3>📌 勘誤與補充說明</h3><p>在上一篇查詢篇章中，我們曾以 BaseModel 作為資料模型進行展示，<strong>但實際上那並不是 ORM 模型</strong>，只是為了教學簡化而設計。</p><p>✅ 在實務專案中，建議使用 <strong>SQLAlchemy ORM</strong> 或 <strong>SQLModel</strong> 定義資料表，並於 Resolver 中統一操作資料庫，能確保：</p><ul><li>資料一致性</li><li>支援交易與 rollback</li><li>未來擴充性更高</li></ul><h3>🎯 結語</h3><p>Mutation 是 GraphQL 實作中的關鍵一環，不僅讓資料寫入更彈性，也讓前後端可以在單一請求中同步更新與回傳資料。</p><p>配合 <strong>JWT 驗證、角色控管、輸入驗證與非同步支援</strong>，你可以打造出一套<strong>安全、擴充性強且貼近實務的 API 架構</strong>！</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=322d4fabb6bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[《GraphQL × FastAPI》GraphQL Query × JWT 權限整合實作指南]]></title>
            <link>https://medium.com/@codeseeker2024/graphql-fastapi-graphql-query-jwt-%E6%AC%8A%E9%99%90%E6%95%B4%E5%90%88%E5%AF%A6%E4%BD%9C%E6%8C%87%E5%8D%97-27d01cf8c606?source=rss-0b55066235d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/27d01cf8c606</guid>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[nitro]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[jwt]]></category>
            <dc:creator><![CDATA[Codeseeker2024]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 03:42:37 GMT</pubDate>
            <atom:updated>2025-08-06T03:45:32.653Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>在上一篇文章<a href="https://medium.com/@codeseeker2024/graphql-fastapi-%E6%89%93%E9%80%A0%E7%8F%BE%E4%BB%A3%E5%8C%96-api-%E6%9E%B6%E6%A7%8B-%E5%AF%A6%E7%8F%BE%E6%9F%A5%E8%A9%A2%E8%88%87%E5%AF%AB%E5%85%A5%E5%88%86%E9%9B%A2%E8%A8%AD%E8%A8%88-13e6958df23b">💫《GraphQL × FastAPI》打造現代化 API 架構：實現查詢與寫入分離設計！</a>中，我們介紹了如何將 GraphQL 整合至 FastAPI，打造一套彈性強大的查詢 API。</blockquote><blockquote>不過在實務應用中，API 安全性是一大關鍵。因此，本篇將進一步說明如何為 GraphQL API 加入 JWT 驗證機制，確保只有「合法登入的使用者」才能取得敏感資料，打造貼近真實場景的安全查詢流程，建立安全且實用的現代 API 架構，並透過 Nitro 實際驗證</blockquote><h3>🔑 為什麼要導入 JWT？</h3><p>🔈JWT（JSON Web Token）是一種常見的 Token 驗證機制，能在無需儲存 session 的情況下安全地傳遞使用者資訊。<br> 導入 JWT 的好處包括：</p><ul><li>✅ 確保只有合法使用者能存取 API</li><li>✅ Token 自包含（包含用戶資訊與過期時間）</li><li>✅ 相容於 REST 與 GraphQL 架構</li><li>✅ 易於整合第三方登入或 SSO</li></ul><p>因此，為 GraphQL API 加上 JWT 驗證，是邁向實戰環境不可或缺的一步。</p><h3>🛠️ JWT 整合 GraphQL 步驟</h3><p>以下是整個整合流程的七個步驟：</p><h3>1️⃣ 安裝套件與生成金鑰</h3><p>🔈安裝必要的套件，如 python-jose 用於加解密 JWT。</p><pre>pip install -r requirements.txt</pre><p>▪ requirements.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*1x9e943uLfp4XtB-SgIOog.png" /></figure><p>▪並透過 OpenSSL 生成 RSA 金鑰：</p><pre>openssl genrsa -out keys/private_key.pem 2048<br>openssl rsa -in keys/private_key.pem -pubout -out keys/public_key.pem</pre><h3>2️⃣ 建立 schema.py</h3><p>🔈定義 GraphQL 的查詢邏輯與資料欄位：</p><p>▪ schema.py</p><pre># schema.py<br>import strawberry<br>from typing import List<br>from models import User  # 或定義 strawberry type<br><br>@strawberry.type<br>class UserType:<br>    id: int<br>    username: str<br>    email: str<br>    roles: List[str] <br><br>@strawberry.type<br>class Query:<br>    @strawberry.field<br>    def current_user(self, info) -&gt; UserType:<br>        user = info.context[&quot;user&quot;]<br>        print(&quot;👤 user payload:&quot;, user)  # 建議 debug 用<br><br>        return UserType(<br>            id=user.get(&quot;id&quot;, 0),  # 如果 JWT 裡沒帶 id，預設為 0<br>            username=user.get(&quot;username&quot;, &quot;unknown&quot;),<br>            email=user.get(&quot;email&quot;, &quot;unknown@example.com&quot;),<br>            roles=user.get(&quot;roles&quot;) or []  # 保證不為 None<br>        )<br><br>schema = strawberry.Schema(query=Query)</pre><h3>3️⃣ 建立 models.py</h3><p>🔈定義資料表模型，例如 User，搭配 ORM 操作資料庫。</p><p>▪ models.py</p><pre>from pydantic import BaseModel<br><br>class User(BaseModel):<br>    id: int<br>    username: str<br>    email: str</pre><h3>4️⃣建立 auth.py</h3><p>🔈載入公鑰與 .env 中設定的 issuer，解碼 JWT 並回傳使用者資訊：EXPECTED_ISSUER)</p><p>▪ .env</p><pre>EXPECTED_ISS=https://auth.codeseeker.dev</pre><p>▪ auth.py</p><pre># auth.py<br>from fastapi import HTTPException<br>from jose import jwt, JWTError, ExpiredSignatureError<br>from pathlib import Path<br>import os<br><br># 載入公鑰與演算法<br>PUBLIC_KEY = Path(&quot;keys/public_key.pem&quot;).read_text()<br>ALGORITHM = &quot;RS256&quot;<br><br># 載入簽發者（issuer）設定<br>EXPECTED_ISS = os.getenv(&quot;EXPECTED_ISS&quot;)  # 例: https://auth.codeseeker.dev<br><br>def verify_jwt(token: str) -&gt; dict:<br>    try:<br>        # 解碼 JWT<br>        payload = jwt.decode(token, PUBLIC_KEY, algorithms=[ALGORITHM])<br>        print(&quot;🔎 payload:&quot;, payload)<br>        print(&quot;🔐 EXPECTED_ISS:&quot;, EXPECTED_ISS)<br>        # 驗證 issuer 是否正確<br>        if payload.get(&quot;iss&quot;) != EXPECTED_ISS:<br>            raise HTTPException(status_code=403, detail=&quot;Invalid token issuer&quot;)<br><br>        return payload  # 回傳 user 資訊<br>    except ExpiredSignatureError:<br>        raise HTTPException(status_code=401, detail=&quot;Token has expired&quot;)<br>    except JWTError:<br>        raise HTTPException(status_code=401, detail=&quot;Invalid JWT&quot;)<br>    except Exception:<br>        raise HTTPException(status_code=400, detail=&quot;Token decode failed&quot;)</pre><h3>5️⃣ 建立jwt_generate.py</h3><p>▪ jwt_generate.py</p><pre># generate_jwt.py<br>from jose import jwt<br>from datetime import datetime, timedelta,timezone<br>from pathlib import Path<br><br># 載入私鑰<br>private_key = Path(&quot;keys/private_key.pem&quot;).read_text()<br><br># JWT payload：你可以依需求自定義欄位<br>payload = {<br>    &quot;id&quot;: &quot;user123&quot;,                       # 使用者 ID<br>    &quot;username&quot;: &quot;aaron&quot;,                   # 自定義欄位<br>    &quot;roles&quot;: [&quot;admin&quot;],                    # 權限角色<br>    &quot;iss&quot;: &quot;https://auth.codeseeker.dev&quot;,  # 簽發者<br>    &quot;exp&quot;: datetime.now(timezone.utc) + timedelta(hours=2)<br>}<br><br># 產出 JWT<br>token = jwt.encode(payload, private_key, algorithm=&quot;RS256&quot;)<br>print(&quot;🔐 JWT token:\n&quot;, token)</pre><p>▪ 執行此.py檔產出測試用token</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ikoQSc4pZi-Qn1NeEXLfQg.png" /></figure><h3>6️⃣ 建立main.py</h3><p>建立 FastAPI 主程式，註冊 GraphQL 路由並加上 CORSMiddleware 以解決跨域問題：</p><p>▪ main.py</p><pre>from dotenv import load_dotenv<br><br>load_dotenv()  # 這行會載入當前資料夾的 .env 檔案<br><br>from fastapi import FastAPI, Request, Header, HTTPException<br>from strawberry.fastapi import GraphQLRouter<br>from schema import schema<br>from auth import verify_jwt<br>from fastapi.middleware.cors import CORSMiddleware<br><br><br>app = FastAPI()<br><br>app.add_middleware(<br>    CORSMiddleware,<br>    allow_origins=[&quot;*&quot;],  # 或指定 Nitro 所使用的網域<br>    allow_credentials=True,<br>    allow_methods=[&quot;*&quot;],<br>    allow_headers=[&quot;*&quot;],  # 這個非常重要，必須允許 Authorization header<br>)<br><br>async def get_context(request: Request, authorization: str = Header(None)):<br>    if authorization:<br>        scheme, token = authorization.split()<br>        if scheme.lower() != &quot;bearer&quot;:<br>            raise HTTPException(status_code=403, detail=&quot;Invalid auth header&quot;)<br>        user = verify_jwt(token)<br>    else:<br>        user = {&quot;id&quot;: 0, &quot;username&quot;: &quot;guest&quot;, &quot;email&quot;: &quot;guest@example.com&quot;}<br><br>    return {&quot;user&quot;: user}<br><br>graphql_app = GraphQLRouter(schema, context_getter=get_context)<br>app.include_router(graphql_app, prefix=&quot;/graphql&quot;)</pre><h3>7️⃣ 使用 Nitro 測試 API</h3><p>前往 Nitro GraphQL IDE，連上本地端的 /graphql API，並在 Headers 加上：</p><p>▪ HTTP Endpoint填上註冊的GraphQL路由 : <a href="http://127.0.0.1:8082/graphql">http://127.0.0.1:8082/graphql</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*L0VdmLS_K-nLyxxATrJMVA.png" /></figure><p>▪ Autohrization的區塊</p><p>📍選擇Type : Bearer</p><p>📍Token : 貼上先前執行jwt_generate.py生成的JWT Token</p><p>▪ 完成上述兩個連線設定，點擊Apply</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*1ItBfPCl8_xwTUPpc41nTw.png" /></figure><p>▪ 點擊右上方”Reload Schema”，顯示綠色🟢即為成功!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKvkyWpWUWzSZLbXldbACA.png" /></figure><h3>🧠 實作提醒事項</h3><p>以下幾點是實作過程中的關鍵注意：</p><ul><li>🌟 <strong>務必先執行 </strong><strong>jwt_generate.py</strong>，產出測試用 JWT token。</li><li>✔️ load_dotenv() 請放在最前面，確保 .env 變數可正確載入。</li><li>✔️ 加上 CORSMiddleware 解決跨域錯誤，否則瀏覽器請求會被阻擋。</li><li>✔️ Nitro GraphQL IDE首頁畫面與連結如下:</li></ul><p>URL : <a href="https://chillicream.com/products/nitro/">https://chillicream.com/products/nitro/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-WVau71HmBolbzmaAPvzzA.png" /></figure><h3>🎯結語：讓 GraphQL API 更接近實戰</h3><p>整合 GraphQL 與 JWT 的過程，不僅讓我們理解「前端查詢」與「後端驗證」之間的關係，也讓開發的 API 架構更接近真實應用場景。</p><p>如果這篇文章對你有幫助，歡迎按下「👏」或追蹤我的 <a href="https://www.instagram.com/codeseeker2024/">instagram</a> 或是<a href="https://www.threads.com/@codeseeker2024">threads</a> 帳號，我將持續分享更多 Kubernetes 、CI/CD、雲端服務、後端開發、資料工程的實戰心得！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27d01cf8c606" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>