Building a Unified API Gateway for Cross-Cloud AI Services: A Secure and Scalable Enterprise Solution

blog logo

In today’s enterprise environment, Generative AI technology has become key to enhancing business efficiency and innovation. However, with the diversification and decentralization of AI services, how to uniformly manage and call these services has become a challenge. This article will introduce how to use Golang to develop a unified API Gateway for cross-cloud AI services, achieving a secure and scalable enterprise-level solution.

This was my second public talk at the 2025 iThome CloudSummit Taiwan. Below is the outline of the talk.

  1. Authentication and Authorization
  2. Multi-Cloud AI Backend Integration (Azure OpenAI, AWS Bedrock, Google Gemini AI, etc.)
  3. Traffic Control and Resource Management
  4. Monitoring and Metrics Aggregation
[Read More]

跨雲端 AI 服務統一 API Gateway:安全、可擴展的企業級解決方案

blog logo

在當今的企業環境中,Generative AI 技術已經成為提升業務效率和創新能力的關鍵。然而,隨著 AI 服務的多樣化和分散化,如何統一管理和調用這些服務成為了一個挑戰。本文將介紹如何使用 Golang 開發一個跨雲端 AI 服務的統一 API Gateway,實現安全、可擴展的企業級解決方案。

這是我在 2025 年 iThome 臺灣雲端大會 (CloudSummit) 的第二場公開演講,底下是演講的內容大綱。

  1. 身份驗證與授權
  2. 多雲人工智慧後端整合 ( Azure OpenAIAWS BedrockGoogle Gemini AI …. )
  3. 流量控制與資源管理
  4. 監控與指標聚合
[Read More]

Step-by-Step Guide to Building MCP Server and Client with Golang (Model Context Protocol)

blog logo

In 2025, I delivered a workshop at the iThome Taiwan Cloud Summit in Taipei, titled “Step-by-Step Guide to Building MCP Server and Client with Golang (Model Context Protocol)”. The goal of this workshop was to help developers understand how to implement the MCP protocol using Golang, providing practical code examples and hands-on guidance. I have organized all workshop materials into a GitHub repository, which you can find at go-training/mcp-workshop. For detailed workshop content, please refer to this link.

[Read More]

一步步學會用 Golang 開發 MCP 伺服器與客戶端 (Model Context Protocol)

blog logo

2025 年在台北 iThome 臺灣雲端大會 (CloudSummit) 給一場 Workshop,主題是「一步步學會用 Golang 開發 MCP 伺服器與客戶端 (Model Context Protocol)」。這次的工作坊旨在幫助開發者了解如何使用 Golang 實現 MCP 協議,並提供實際的程式碼範例和操作指南。我已經先將 Workshop 的內容整理成一個 GitHub Repo,您可以在 go-training/mcp-workshop 找到相關資源。詳細 Workshop 內容,請參考此連結

[Read More]

Learning Go Language with GitLab API

logo

Introduction

People often ask me how to learn Go language, and I usually suggest they start with a real project to quickly learn the language’s features. Personally, I started with small projects and gradually expanded their scope, from contributing to documentation to open-source projects, then learning how to modify the source code, and finally writing my own project. This learning method allows you to become familiar with the features of the Go language more quickly.

[Read More]

使用 GitLab API 學習 Go 語言

logo

前言

常有人問我如何學習 Go 語言,我通常建議他們從實際專案開始,這樣可以更快掌握語言特性。我個人也是先寫小專案,再逐步擴大範圍,從貢獻文件到開源專案,進而學習如何修改原始碼,最後再自己寫一個專案。這樣的學習方式能讓你更快熟悉 Go 語言的特性。

[Read More]

如何設計一套具備 Container 容器化技術的 CI/CD 平台 - Drone 開源專案

logo

今年一樣報名了 2024 年台北 Cloud Summit 活動,講的主題是『如何設計一套具備 Container 容器化技術的 CI/CD 平台?』,我相信大家在團隊內一定都有使用 CI/CD 工具,像是 Jenkins、GitLab CI、Travis CI、Circle CI 等等,這些工具都是非常好用的,但是想要在自己的環境中建置一套 CI/CD 平台,你會怎麼做呢?這次會帶您深入了解 Drone CI/CD 開源工具,並且透過實際的 Demo 來說明如何設計一套具備 Container 容器化技術的 CI/CD 平台。藉由 Drone 原始碼的解析,讓您了解 Drone 的運作原理,並且透過 Drone 的 Plugin 機制,讓您可以自行開發 Drone 的 Plugin,讓 Drone 可以更加符合您的需求。

[Read More]

Using singleflight in Go language to solve Cache Hotspot Invalid

photo

The diagram above illustrates a commonly used architecture in implementing web services, which involves adding a cache between the service and the database to reduce the load on the database. However, when implementing service integration, three major cache problems are often encountered: Cache Avalanche, Hotspot Invalid, Cache Penetration. Among them, Cache Hotspot Invalid is a very common issue. When the data in the cache expires or disappears, a large number of requests will simultaneously hit the backend database, causing an excessive load on the database and even leading to database crashes, as shown in the diagram where the cache key of a certain article expires. This article will introduce how to use the singleflight built into the Go language to solve the Cache Hotspot Invalid problem. This is a feature in the sync package that can prevent duplicate requests from hitting the backend database simultaneously.

photo

[Read More]

在 Go 語言用 singleflight 解決快取擊穿 (Cache Hotspot Invalid)

photo

上圖是在實作 Web 服務時常用的架構,會在服務跟資料庫之間加上快取,以減少資料庫的負載。然而在實作服務串接時,常常會遇到快取三大問題:雪崩、擊穿、穿透,其中 Cache Hotspot Invalid (快取擊穿) 是一個非常常見的問題,當快取中的資料過期或消失時,大量的請求會同時打到後端資料庫,這會導致資料庫的負載過大,甚至會導致資料庫掛掉,如下圖某篇文章的 cache key 過期。這篇文章將會介紹如何使用 Go 語言內建的 singleflight 來解決快取擊穿的問題,這是 sync 套件中的一個功能,可以避免重複的請求同時打到後端資料庫。

photo

[Read More]

生成式 AI CodeGPT 開發經驗談 - 台北 ModernWeb

photo

很高興可以到台北 ModerWeb 分享『生成式 AI CodeGPT 開發經驗談』,沒想到這主題這麼多人有興趣,第一次遇到滿場的現象。這場主要講授在今年 3 月由我自己開源的 CodeGPT 工具,身為軟體工程師,每天都一定會寫 Commit Message,而此工具會針對修改的 Code Diff 進行閱讀,並給出一次性的 Commit Message,讓軟體工程師不用再煩惱該如何寫 Commit Message。大家可以看看上面的封面圖,就可以知道我每天需要花多少時間在寫有用可閱讀的 Commit。

[Read More]