← Back to Home

Golang Professional

Master Curriculum Roadmap: จาก JVM สู่ Senior/Lead Go Architect — 4 phases, 55 days

Phase 1: Unlearning & Idiomatic Go

Week 1–3 · Day 1–15 · Bare-metal values, errors, composition

Explore Phase 1 →

Phase 2: Concurrency & Runtime

Week 4–7 · Day 16–30 · Goroutines, channels, GMP, GC

Explore Phase 2 →

Phase 3: Production Engineering

Week 8–11 · Day 31–45 · HTTP, gRPC, pgx, observability

View roadmap →

Phase 4: Systems Performance

Week 12+ · Day 46–55 · Escape analysis, pprof, capstone

View roadmap →

🗺️ Day-by-Day Breakdown

Phase 1: Unlearning & Idiomatic Go · Day 1–15

ล้างภาพจำ Magic Annotations, Reflection และ Class Hierarchy สู่ความโปร่งใสของ Go: Values บน RAM, Memory Layout ไร้ Overhead และ Composition over Inheritance. เปิด Phase 1 →

สัปดาห์ที่ 1: Memory Architecture, Pointers & Data Internals

Day 1

Values vs Pointers & Pass-by-Value Mechanics

Stack vs Heap, Dereferencing, Unaddressable values, JVM Reference passing เทียบกับ Go Pure Value Copying

เปิดบทเรียน →
Day 2

Memory Alignment, Struct Padding & CPU Cache Lines

8-byte boundary, Struct field reordering, L1/L2 cache locality, False sharing เบื้องต้น

เปิดบทเรียน →
Day 3

Slice Internals (SliceHeader, Len, Cap & growslice)

Data ptr, Len, Cap, Reallocation trap, Sub-slice memory retention leaks

เปิดบทเรียน →
Day 4

Map Architecture Deep-Dive (hmap, bmap, Buckets & Evacuation)

Hash distribution, 8-key buckets, Overflow chains, Load factor 6.5, Non-thread-safe design

เปิดบทเรียน →
Day 5

String & Byte Buffer Internals (StringHeader & Immutability)

String memory sharing, Zero-copy conversions, Runes vs Bytes

เปิดบทเรียน →

สัปดาห์ที่ 2: Errors as Values & Object-Free Composition

Day 6

Error Fundamentals & The Sentinel Error Pattern

ทำไม Go ไม่มี Exception/Stack Traces, var Err..., errors.New vs fmt.Errorf

เปิดบทเรียน →
Day 7

Error Inspection Patterns (errors.Is, errors.As & Wrapping %w)

Tree traversal, Custom unwrappers, Structured contextual errors, Typed nil trap

เปิดบทเรียน →
Day 8

Panic, Recover & Process Boundaries

Panic ไม่ใช่ Exception, Goroutine panic recovery boundaries ใน Banking Engine

เปิดบทเรียน →
Day 9

Struct Embedding & Composition over Inheritance

Field/Method Promotion, Method Shadowing, Contiguous RAM layout

เปิดบทเรียน →
Day 10

Implicit Interfaces, iface vs eface & Dynamic Dispatch

Structural Duck Typing, 16-byte interface fat pointers, Method Sets, Dynamic dispatch latency

เปิดบทเรียน →

สัปดาห์ที่ 3: Idiomatic Architecture & Phase Deliverable

Day 11

Package-Oriented Design & Project Structure

จาก Spring Layer-Driven สู่ Go Domain-Driven Packages, Cyclic Dependency, internal/

เปิดบทเรียน →
Day 12

Standard Library I/O Mastery (io.Reader, io.Writer, bufio)

Streaming, Buffered scanning, Zero-copy สำหรับไฟล์ธุรกรรมขนาดใหญ่

เปิดบทเรียน →
Day 13

High-Performance Data Ingestion & Validation Engine

Event Parsing Pipeline, Memory pre-allocation, Bitmask error flags

เปิดบทเรียน →
Day 14

Phase 1 Deliverable (Part 1) — Architecture & Core Parsing Engine

CLI Financial Ledger Parser: In-place byte scanning, [12]byte fixed array packing

เปิดบทเรียน →
Day 15

Phase 1 Deliverable (Part 2) — Audit Report, Benchmarking & Zero-Alloc Review

Single-Pass summary, testing.B, พิสูจน์ 0 B/op, 0 allocs/op

เปิดบทเรียน →

Phase 2: Concurrency & Runtime Mastery · Day 16–30

เปลี่ยนจาก 1MB OS Threads ใน JVM สู่ 2KB Goroutines บน User-Space Scheduler และบริหาร State ด้วย Channel Pipelines ร่วมกับ Low-Level Sync. เปิด Phase 2 →

สัปดาห์ที่ 4: Concurrency Primitives & Channels

Day 16

Goroutines, Concurrency Primitives & Runtime Preemption

2KB Goroutine vs 1MB JVM Thread, Contiguous stack, Asynchronous preemption, Panic isolation

เปิดบทเรียน →
Day 17

Channels Deep-Dive: Buffered vs Unbuffered & hchan

Circular buffer, sudog, Wait queues, Holy Channel State Matrix (Nil, Open, Closed)

เปิดบทเรียน →
Day 18

Channel Multiplexing with select, Non-Blocking I/O & Timeouts

selectgo, Nil channel deactivation, time.After memory leak trap

เปิดบทเรียน →
Day 19

Channel Ownership, Directional Constraints & Streaming Pipelines

Type-safe directional channels (chan<-, <-chan), Fan-In / Fan-Out

เปิดบทเรียน →
Day 20

Low-Level Synchronization: sync.Mutex & sync.RWMutex

8-byte Mutex, Normal vs Starvation modes, Non-reentrancy by design

เปิดบทเรียน →

สัปดาห์ที่ 5: Advanced Coordination, Lifecycle & Lock-Free Primitives

Day 21

Coordination Primitives: WaitGroup, Once & Cond

WaitGroup atomic layout, sync.Once double-checked locking, sync.Cond signaling

เปิดบทเรียน →
Day 22

High-Performance Lock-Free Primitives with sync/atomic

CAS, Atomic Add/Load/Store, CPU Bus Locking vs Cache Coherency

กำลังจะมา
Day 23

Context Mastery: Lifecycle, Cancellation Tree & Value Propagation

Propagation graph, Timeout enforcement, หลีกเลี่ยง Value abuse ใน Banking pipeline

กำลังจะมา
Day 24

Concurrency Hazards & Diagnostics (go test -race)

Data races, Deadlocks, Goroutine leaks, ThreadSanitizer shadow memory

กำลังจะมา
Day 25

The Worker Pool Pattern (Bounded Concurrency & Backpressure)

High Ingestion Worker Pool, Static allocation, Throttling

กำลังจะมา

สัปดาห์ที่ 6–7: Go Runtime Internals & Phase Deliverable

Day 26

The GMP Scheduler: G, M, P & Work-Stealing

LRQ 256 slots, GRQ, Work-stealing, Network Poller handoff

กำลังจะมา
Day 27

System Call Preemption & Sysmon Monitor Loop

Syscall decoupling (P drops M), sysmon, Retake mechanism

กำลังจะมา
Day 28

Network Poller Internals (epoll, kqueue, iocp)

Non-blocking socket I/O, Goroutine parking/unparking

กำลังจะมา
Day 29

The Tricolor Concurrent Garbage Collector

Write Barrier, Mark-Sweep, Pacer, STW ระดับ sub-millisecond

กำลังจะมา
Day 30

Phase 2 Deliverable — High-Throughput Concurrent Ingestion Pipeline

Fan-out workers, Graceful shutdown, ตรวจด้วย -race 100%

กำลังจะมา

Phase 3: Production Engineering & Ecosystem · Day 31–45

สร้าง Distributed Services ระดับ Production-Grade สำหรับงาน Banking ที่ทนทาน ปลอดภัย และทดสอบได้จริงโดยไม่พึ่ง Magic Frameworks

สัปดาห์ที่ 8: High-Throughput Transport Layer

Day 31

HTTP Engine with Standard Library & Chi Router

net/http internals, Custom middleware, Context passing

กำลังจะมา
Day 32

HTTP Client Optimization, Connection Pooling & Tuning

MaxIdleConns, IdleConnTimeout, Keep-Alive, TCP socket reuse

กำลังจะมา
Day 33

Inter-Service RPC with gRPC & Protocol Buffers (Part 1)

Protobuf wire format, Schema definition, Protoc Go code generation

กำลังจะมา
Day 34

gRPC (Part 2) — Interceptors & Production Resilience

Auth/Logging/Metrics interceptors, Deadline propagation, Circuit breaking

กำลังจะมา
Day 35

gRPC Streaming for High-Volume Ingestion

Client-side, Server-side และ Bidirectional streaming สำหรับ real-time ledger feeds

กำลังจะมา

สัปดาห์ที่ 9: Database Persistence & ACID Isolation

Day 36

PostgreSQL Engine with pgx (Unlearning Heavy ORMs)

Native wire protocol, PreparedStatement cache, Zero-alloc binary decoding

กำลังจะมา
Day 37

Connection Pool Tuning & Health Monitoring

MaxConns, MinConns, MaxConnLifetime, Starvation handling

กำลังจะมา
Day 38

ACID Transaction Isolation Levels in Core Banking

Read Committed vs Repeatable Read vs Serializable, Deadlock detection

กำลังจะมา
Day 39

SQL Migration Strategy & Zero-Downtime Deployments

golang-migrate, Expand/Contract database pattern

กำลังจะมา
Day 40

Repository Pattern & Transaction Propagation

Unit of Work ใน Go, ส่ง Tx ข้าม Repository ผ่าน context.Context

กำลังจะมา

สัปดาห์ที่ 10–11: Observability, Reliability & Automated Testing

Day 41

Structured Logging with log/slog

JSON formatting, Contextual attributes, Zero-alloc custom handlers

กำลังจะมา
Day 42

Distributed Tracing with OpenTelemetry

W3C TraceContext, Spans, tracing ข้าม gRPC/HTTP

กำลังจะมา
Day 43

System Metrics Collection with Prometheus

Counter, Gauge, Histogram สำหรับ p95/p99 latency และ TPS

กำลังจะมา
Day 44

Table-Driven Testing, Mocks & Golden Files

Idiomatic table tests, t.Run, Interface mocking โดยไม่พึ่ง Magic Mock

กำลังจะมา
Day 45

Phase 3 Deliverable — Production-Ready Banking Ledger Microservice

gRPC + pgx + OpenTelemetry + testcontainers-go

กำลังจะมา

Phase 4: Systems Performance & Internals · Day 46–55+

บีบเค้นประสิทธิภาพระดับฮาร์ดแวร์ ปรับโปรแกรมสู่ Zero-Allocation และขจัดคอขวดอย่างเป็นวิทยาศาสตร์

สัปดาห์ที่ 12: Escape Analysis & Memory Optimization

Day 46

Compiler Mechanics & Escape Analysis Deep-Dive

go build -gcflags="-m -m", กฎที่ทำให้ตัวแปรหนีจาก Stack ลง Heap

กำลังจะมา
Day 47

Zero-Allocation Techniques in Hot Paths

Slice truncation reuse, Array pointers, unsafe.Pointer

กำลังจะมา
Day 48

High-Performance Object Reuse with sync.Pool

poolLocal caches, GC drain behavior, reuse byte buffers

กำลังจะมา
Day 49

SIMD, CPU Instruction Tuning & Compiler Directives

Inlining heuristics, Mid-stack inlining, Bound-check elimination

กำลังจะมา

สัปดาห์ที่ 13: Diagnostics, Profiling & Distributed Systems Capstone

Day 50

CPU & Memory Profiling with pprof

CPU Flamegraphs, Heap inuse_space vs alloc_space

กำลังจะมา
Day 51

Contention Profiling: Block & Mutex Profiling

Lock Contention, Channel blocking bottlenecks

กำลังจะมา
Day 52

Low-Level Execution Tracing with go tool trace

Scheduling latency, Syscall delays, GC stop-the-world pauses

กำลังจะมา
Day 53

Capstone (Part 1) — Architecture & High-TPS In-Memory Engine

ออกแบบ Ultra-Fast Ledger / Race Timing In-Memory Store

กำลังจะมา
Day 54

Capstone (Part 2) — Lock-Free State & Sharded Storage

Sharded Ring Buffers, Partitioned state เพื่อขจัด lock contention

กำลังจะมา
Day 55

Capstone (Part 3) — Benchmark Validation & Profiling Report

Benchmark เปรียบเทียบ พร้อมรายงาน pprof ก่อนและหลังจูน

กำลังจะมา