Welcome to the Golang Live Coding Practice Suite repository!
This project contains 12 structured modules covering Go concurrency, data architecture, memory optimization, distributed systems, networking protocols, event streaming outbox patterns, and microservice resilience. It is designed to help software engineers prepare for technical interviews, live coding assessments, and master production-grade Go patterns.
All modules in this practice folder are formatted as Clean Starter Code (complete with interfaces, data types, and // TODO stubs) without solution implementations, allowing you to practice independently.
| # | Module Folder | Key Topics & Algorithms | Starter File |
|---|---|---|---|
| 01 | 01-goroutines-and-channels |
Fan-Out/Fan-In Pipeline, Token Bucket Rate Limiter, Thread-Safe Pub-Sub Event Bus | pipeline.go |
| 02 | 02-sync-and-atomic |
Singleflight Cache (Anti-Thundering Herd), Sharded Map, Weighted Semaphore, ErrGroup | sync_tasks.go |
| 03 | 03-graceful-shutdown |
OS Signals (SIGINT/SIGTERM), HTTP & Worker Draining, Timeout Cascade |
server.go |
| 04 | 04-data-structures |
Generic LRU Cache, Circular Ring Buffer Queue, Concurrent Trie (Prefix Tree) | datastructures.go |
| 05 | 05-sql-and-transactions |
ACID Bank Transfer, Pessimistic Locking (SELECT FOR UPDATE), Deadlock Prevention |
sql_tasks.go |
| 06 | 06-performance-and-optimization |
Zero-Alloc Log Formatter (sync.Pool), Struct Field Alignment & Memory Padding |
opt_tasks.go |
| 07 | 07-design-patterns |
Functional Options Pattern, Custom Domain Error Wrapping (Unwrap), Middleware Chain |
patterns.go |
| 08 | 08-distributed-primitives |
Consistent Hashing Ring (Virtual Nodes + Binary Search), Sliding Window Limiter, Fencing Token Lock | dist_tasks.go |
| 09 | 09-networking-and-protocols |
TCP Length-Prefixed Binary Frame Codec, Round-Robin Load Balancer with Health Check | net_tasks.go |
| 10 | 10-advanced-concurrency-challenges |
Bounded Multi-Priority Task Queue (High/Med/Low), Goroutine Leak Detector | advanced.go |
| 11 | 11-event-streaming-and-outbox |
Transactional Outbox Relay Worker, Idempotent Consumer & Dead Letter Queue (DLQ) | outbox.go |
| 12 | 12-microservices-and-resilience |
Circuit Breaker State Machine, W3C Trace Context Propagator (traceparent) |
resilience.go |
Each module folder contains a dedicated README.md detailing:
- Concept & Real-World Background
- Logical Flow & Step-by-Step Algorithm
- Input / Expected Output Examples & Execution Diagrams
- Edge Cases & Critical Considerations
Open the primary Go challenge file in the module folder (e.g. 01-goroutines-and-channels/pipeline.go) and complete the functions marked with:
// TODO: Implement ...Run tests in your target module directory using the terminal:
# Navigate to module directory
cd 01-goroutines-and-channels
# Run unit tests
go test -v ./...
# Run race detector (Highly recommended for concurrent code!)
go test -v -race ./...
# Run memory allocation benchmarks (Module 06)
go test -bench=. -benchmemWhen all tests report PASS, your implementation is correct! Happy coding! 🎯