<Netflix 的軟體設計哲學:Hexagonal Archtecture>


Index 導言 前言 Chapter 1:高度的整合 Chapter 2:Monolith to Microservices Chapter 3:Hexagonal Architecture Core concepts Data Sources Transport Layer The dependency graph Chapter 4:Swapping data sources! Production 實際情況 隱藏 data source 的細節 Chapter 5:Testing strategy Interactors test Data sources test E2E test 心得與總結 導言 這篇是整理翻譯 <Ready for changes with Hexagonal Architecture>,其中 Netflix 工程師把它們從 Monolith 轉換到 Microservices 然後介紹 Hexagonal Architecture 種種細節。 建議各位讀者把這篇當成故事,更能了解 Microservices 和 Hexagonal Architecture 誕生的因果。 前言 隨著每年的 Netflix 成長,我們實作 Application 的時候必須維持很高的效率。我們的 Engineering 組織從編劇、播放、排程、供應商管理、獲取劇本內容…etc,管理超多的 Applications 。…
Read more ⟶

<How We Went All In on :sqlc/pgx for Postgres + Go>


註記:作者本人有攝影的興趣,我拿他的一張相片當封面 XD Index 導言 前言 Tour database/sql lib/pq pgx go-pg gorm Research Queries as strings ORMs sqlc Codegen pgx support appears Caveats and workarounds Summary and future 導言 這篇文章是專為 Go 開發者寫的,主要翻譯 <How We Went All In on sqlc/pgx for Postgres + Go>,這篇文章的作者本身在 Heroku 工作過也在 stripe 工作過,同時也是提出 Idempotent Key API 的人。 現在他在 Crunchy Data 開發 platform API,對於 Postgres 和 Go 都算是非常有經驗的專家,這篇文章會分享一些他對當前生態環境 Go 如何操作 Postgres 的一些看法。 前言 幾個月的實驗和研究後,我們跑了一些 DB-dependent Go app,我們得到一個結論就是 sqlc 可以說是最好的拿來使用的 Postgres (可以能其他 databases 也是)。而且在 Go code 也很容易使用,以下就讓來介紹一下我們的研究吧!…
Read more ⟶

<Notion 的 Data Model & Sharding Postgres>


Index 簡介 Notion 是啥? Blocks Blocks 的 Schema Blocks 的特色: Dynamic Change Blocks 怎麼組裝和運作起來呢? Render Tree Indentation Permissions Block 的生命週期 Creating and updating Real-time updates Reading blocks Sharding Sharding 要考慮的問題 Sharding 的解決策略 Sharding 的實際解決方案 Migrating to shards Double-writing with an audit log Backfilling old data Verifying data integrity Difficult lessons learned 早點 Shard 以 zero-downtime migration 為目標 使用 combined primary key 而不是分離的 partition key: 心得 簡介 這篇文章會統整 Notion 兩篇非常重要的工程部落格,分別是 <The data model behind Notion’s flexibility> 和 <Herding elephants: Lessons learned from sharding Postgres at Notion>,其簡單扼要地講述了 Notion 背後的工程設計,我一向喜歡研究自己覺得很好用的工具怎麼設計的,就讓我們來看看吧。…
Read more ⟶