🍇 程式語言
- JavaScript & Node.js
🥥 設計模式
Hey! Go Design Patterns
- DAY 1:Hey! Go Design Patterns: https://ithelp.ithome.com.tw/articles/10260929
🍈 數據結構與演算法
SortSet
PriorityQueue
BuildHeap
minimum-waiting-time
class-photos
Tower of Hanoi
one's complement, two's complement
- one's complement: 正與負範圍的絕對值相同,會產生-0的現象
- two's complement: 正與負範圍的絕對值不同,正從0開始,負從-1開始,這也使得負數與正數最大的絕對值不同,負數會比正數大1 (e.g. -128 ~ -1 ~ +0 ~ +127)
刷題
- grind169
- neetcode
- algoexpert
- Golang Leetcode 刷題筆記: https://mp.weixin.qq.com/s/EaDLaLy3YjrNiSoNofwMMA
資料結構
- Array與List的差異: http://sharecoder.blogspot.com/2012/10/arraylist.html
- B+樹跟紅黑樹哪個搜尋速度更快?:
Take this with a pinch of salt: // 如果在硬碟這種慢速IO的載體上,建議使用B樹 B-tree when you're managing more than thousands of items and you're paging them from a disk or some slow storage medium. // 如果插入、刪除、檢索相當頻繁,建議使用紅黑樹 RB tree when you're doing fairly frequent inserts, deletes and retrievals on the tree. // 如果插入、刪除相對於檢索不頻繁時,建議使用AVL樹 AVL tree when your inserts and deletes are infrequent relative to your retrievals.
- 線上動畫解釋tree的新增、查找、刪除: https://www.cs.usfca.edu/~galles/visualization/Algorithms.html
🍉 資料儲存
資料庫儲存密碼
- base64: 完全安全,可以直接decode
- encrypt: 不安全,如果取得私鑰可解密
- hash: 不安全,可能會被彩虹表攻擊
- salt+hash: 大致安全,可能會被超級電腦攻擊,但攻擊成本高
- bcrypt: 安全,可增加超級電腦攻擊的成本,使攻擊成本過高導致無法攻擊
MySQL 資料破碎
- 長度可變資料欄位(varchar 或 nvarchar)導致資料表破碎嚴重: https://dotblogs.azurewebsites.net/rockchang/2017/05/08/110423
MySQL Lock
- MySQL Deadlock案例: https://github.com/aneasystone/mysql-deadlocks
- Single Query Select & Update: https://khiav223577.github.io/blog/2019/02/07/不使用-lock-又要避免-race-condition,可能嗎?/
MySQL 慢查詢
MySQL SQL 指令
- JOIN & UNION 圖解: https://sam.webspace.tw/2019/07/11/SQL-JOIN/
MySQL 索引
- 用對這些場景下的數據庫索引,領導說我有點東西: https://mp.weixin.qq.com/s/4K3borSZXt-yc5t5UJnJpQ
- 如何優化mysql的範圍查詢: https://cloud.tencent.com/developer/article/1767984
- 了解MySQL索引的BST、Balanced BST、B樹、B+樹底層: https://mark-lin.com/posts/20190911/
- 為什麼MySQL的Innodb使用B+樹而不是紅黑樹作為索引: https://mp.weixin.qq.com/s?__biz=MzIwNDAyOTI2Nw==&mid=2247483893&idx=1&sn=6f894a5cc2676073e50bacbdee5e6478&chksm=96c72dc9a1b0a4dfa95600ebf5ad7db9d804afbad6c7396078ab7f85d10c7516d602715172db&token=2074428159&lang=zh_CN#rd
SQL基礎語法練習
Redis
- 一文講透 Redis 事務 (事務模式 VS Lua 腳本): https://www.cnblogs.com/makemylife/p/17299566.html
- 先更新數據庫還是先更新緩存?: https://mp.weixin.qq.com/s/SPgtpfgv6bz2AfPa1CYYeQ
- Lua中有寫操作不能使用帶隨機性質的讀操作,如TIME,需用redis.replicate_commands()解決: https://www.cnblogs.com/zhaoyongjie-z/p/14313046.html
- 為啥 redis 使用跳表(skiplist)而不是使用 red-black?: https://www.zhihu.com/question/20202931
🍋 分布式服務
OutBox Pattern
Docker
- Docker從入門到干活,看這一篇足矣: https://mp.weixin.qq.com/s/YlcvlUQ-xkz25PuYkeEQqw
分佈式事務
驗證
- JWT:
- 基於 JWT + Refresh Token 的用戶認證實踐: https://zhuanlan.zhihu.com/p/52300092
- Why Does OAuth v2 Have Both Access and Refresh Tokens?: https://stackoverflow.com/questions/3487991/why-does-oauth-v2-have-both-access-and-refresh-tokens
- OAuth 2.0 Token Exchange: https://datatracker.ietf.org/doc/html/rfc8693
- 安全性:
- 零基礎資安系列(一)-認識 CSRF(Cross Site Request Forgery): https://tech-blog.cymetrics.io/posts/jo/zerobased-cross-site-request-forgery/
- 零基礎資安系列(二)-認識 XSS(Cross-Site Scripting): https://tech-blog.cymetrics.io/posts/jo/zerobased-cross-site-scripting/
- 零基礎資安系列(三)-網站安全三本柱(Secure & SameSite & HttpOnly): https://tech-blog.cymetrics.io/posts/jo/zerobased-secure-samesite-httponly/
- 當瀏覽器全面停用三方 Cookie: https://zhuanlan.zhihu.com/p/131256002
限流
- 限流種類:
- 令牌桶(token bucket)
- 漏桶法(leaky bucket)
- 恆定速路拿取token的方式對於redis來說不好實作,可用GCRA的方式實作
- 固定窗口法(fixed window)
- 滑動日制法(sliding log)
- 滑動窗口法(sliding window)
- redis 5種限流實作: https://medium.com/@SaiRahulAkarapu/rate-limiting-algorithms-using-redis-eb4427b47e33
- token bucket實作有點問題,導致實作結果與fixed window是一樣的
- Golang token bucket實作: https://himanshu-007.medium.com/simple-rate-limiter-in-golang-using-token-bucket-algorithm-388d0596d1e4
熔斷
- 億級流量網關設計思路,學到了: https://mp.weixin.qq.com/s/J0aSVry1-Ss1OTA-jQAX3w
- 簡單理解微服務限流、降級、熔斷: https://juejin.cn/post/7150278137044008990
中間件
- Kafka:
- 從面試角度一文學完 Kafka: https://mp.weixin.qq.com/s/o-rqnOH4FHeHaz0VqoHnFg
- 我是如何將一個老系統的kafka消費者服務的性能提升近百倍的: https://www.cnblogs.com/softwarearch/p/16443128.html
Kafka詳解系列文:
🍌 測試
測試框架或套件的選擇
🫐 前端
🥕 運維
- 交易系統
- 撮合引擎:
- https://himanshu-007.medium.com/simple-rate-limiter-in-golang-using-token-bucket-algorithm-388d0596d1e4
- https://github.com/yzimhao/trading_engine
- https://github.com/stingbo/gome
- https://github.com/gitbitex/gitbitex-spot
- 衍伸引擎(基於Java實作): https://github.com/gitbitex/gitbitex-new
- https://github.com/xiiiew/lightning-engine
- 撮合引擎緩存與MQ概念: https://zhuanlan.zhihu.com/p/95033793
- 撮合引擎核心概念: https://zhuanlan.zhihu.com/p/92274215
- 證券交易系統撮合引擎的設計: https://www.liaoxuefeng.com/article/1452011784503329
- 證券交易系統設計與開發: https://www.liaoxuefeng.com/article/1185272483766752
- 交易系統架構演進之路(一):1.0版: https://juejin.cn/post/6900444689628037133
- 可以看看他系列文演進的思路
- 圖形工具
- mermaid
- Week28 - 讓你心裡的邏輯具現化的念能力工具 Mermaid: https://ithelp.ithome.com.tw/articles/10234553
- miro
- figma