ข้ามไปยังเนื้อหา

gRPC Design — From Zero to Hero

คอร์สแบบ standalone ตั้งแต่ผู้เริ่มต้นจนถึงขั้นสูง ว่าด้วยการออกแบบ API ด้วย gRPC และ Protocol Buffers ตั้งแต่ RPC model และ protobuf schema ไปจนถึง streaming, deadline, interceptor, load balancing, security และ gRPC-Web — ทุกหัวข้อมี .proto contract คู่กับตัวอย่าง Go, Python และ Node

gRPC Foundations

gRPC คืออะไร, RPC model, ทำไมต้องทำงานบน HTTP/2 และเทียบกับ REST อย่างไร เริ่ม →

Protocol Buffers

message และ field number, scalar type, enum, oneof, map, well-known type และการ evolve schema อย่างปลอดภัย ออกแบบ schema →

Service Definition

การนิยาม service, RPC ทั้ง 4 แบบ, การออกแบบ method signature และ error/status model ออกแบบ →

Building Services

code generation ด้วย protoc, การ implement server, การเขียน client, deadline และ cancellation สร้าง →

Streaming

server, client และ bidirectional streaming — พร้อม flow control ที่ทำให้ stream ทำงานได้ราบรื่น สตรีม →

Ecosystem & Advanced

gRPC-Web บน browser, REST/JSON transcoding, versioning ในระดับ scale, observability และ testing ต่อยอด →

Contract-first เสมอ

ทุกบทเรียนเริ่มจาก .proto — contract ที่เป็นกลางไม่ผูกกับภาษา — แล้วค่อยแสดง server และ client ที่ generate ออกมา เพื่อให้เห็นว่า schema ขับเคลื่อน code อย่างไร

สามภาษาเทียบกันชัด ๆ

ตัวอย่าง server และ client ใน Go, Python และ Node (TypeScript) ผ่านแท็บที่ sync กัน เลือกภาษาครั้งเดียวแล้วตามไปทุกที่

เน้นการออกแบบ ไม่ใช่แค่ syntax

ทุกหัวข้อครอบคลุมเหตุผลและ trade-off — เมื่อไรควร stream, ตั้ง deadline อย่างไร, evolve schema อย่างไรโดยไม่ทำให้ client พัง

ไดอะแกรมที่อธิบายได้

RPC lifecycle, HTTP/2 multiplexing, call ทั้ง 4 แบบ และ interceptor chain เป็นไดอะแกรม Mermaid ที่รองรับธีม สองภาษา (English / ไทย) พร้อมบันทึกความคืบหน้า quiz