← All Learning Paths

Go Concurrency

A Go concurrency path with goroutines, channels, select, context cancellation and timeouts, mutexes, worker pools, pipelines, and HTTP/gRPC services.

technicaladvanced13 nodes10.5h total

A focused learning path on Go concurrency covering goroutines, channels, sync primitives, context, patterns, and performance for building highly concurrent systems in Go.

  1. Complete "Go Goroutine Basics" by making A slice of squared values in the same order. produce [1, 4, 9, 16, 25] without hard-coding the sample.

    Completion criteria: Attach the solution file, two passing sample runs, and one failing run whose error matches the contract for "[1, 4, 9, 16, 25]".

    Next step: Go Channel Communication

    ⏱ 0.5h

  2. Solve "Go Channel Communication": turn A slice of transformed and filtered integers. into [2, 6, 10] and pass the provided samples.

    Prerequisites: Go Goroutine Basics

    Completion criteria: Attach the solution file, two passing sample runs, and one failing run whose error matches the contract for "A slice of transformed and filtered integers.".

    Next step: Channel Select Multiplexing

    ⏱ 0.5h

  3. Implement "Channel Select Multiplexing" so that First available message yields first ready channel, including the edge case in the second sample.

    Prerequisites: Go Channel Communication

    Completion criteria: Show a test command that validates "First available message" and "first ready channel" and passes after your fix.

    Next step: Go Context Cancellation

    ⏱ 0.5h

  4. Complete "Go Context Cancellation" by making Results computed before cancellation, or an error if cancelled. produce all results (completed before timeout) without hard-coding the sample.

    Prerequisites: Channel Select Multiplexing

    Completion criteria: Submit a solution that passes both samples (Results computed before cancellation, or an error if cancelled. to all results (completed before timeout)) and attach the failing case you fixed.

    Next step: Context with Timeout

    ⏱ 0.5h

  5. Solve "Context with Timeout": turn A context that cancels on timeout into cancels after 5s and pass the provided samples.

    Prerequisites: Go Context Cancellation

    Completion criteria: Attach the solution file, two passing sample runs, and one failing run whose error matches the contract for "cancels after 5s".

    Next step: Go Mutex Synchronization

    ⏱ 0.5h

  6. Implement "Go Mutex Synchronization" so that A consistent counter value reflecting all operations. yields Concurrent calls to increment, decrement, and value from multiple goroutines., including the edge case in the second sample.

    Prerequisites: Context with Timeout

    Completion criteria: Attach the solution file, two passing sample runs, and one failing run whose error matches the contract for "A consistent counter value reflecting all operations.".

    Next step: Goroutine Worker Pool

    ⏱ 0.5h

  7. Complete "Goroutine Worker Pool" by making Processed results from workers produce 10 results without hard-coding the sample.

    Prerequisites: Go Mutex Synchronization

    Completion criteria: Show a test command that validates "Processed results from workers" and "10 results" and passes after your fix.

    Next step: Go Concurrent Pipeline

    ⏱ 0.5h

  8. Solve "Go Concurrent Pipeline": turn A slice of squared prime numbers up to N. into [4, 9, 25, 49] and pass the provided samples.

    Prerequisites: Goroutine Worker Pool

    Completion criteria: Submit a solution that passes both samples (A slice of squared prime numbers up to N. to [4, 9, 25, 49]) and attach the failing case you fixed.

    Next step: Defer for Resource Cleanup

    ⏱ 0.5h

  9. Implement "Defer for Resource Cleanup" so that Guaranteed cleanup on exit yields file closed on return, including the edge case in the second sample.

    Prerequisites: Go Concurrent Pipeline

    Completion criteria: Attach the solution file, two passing sample runs, and one failing run whose error matches the contract for "file closed on return".

    Next step: Go HTTP Server with Middleware

    ⏱ 0.25h

  10. Execute "Go HTTP Server with Middleware", change one constant, and describe how the output diverges from "Create a production-ready HTTP server in Go with middleware chaining, graceful shutdown,".

    Prerequisites: Defer for Resource Cleanup

    Completion criteria: Paste the command, the exit code, and the output line matching "the loggingMiddleware entry point"; then show a second run with a changed parameter.

    Next step: Go HTTP Client with Retry

    ⏱ 0.75h

  11. Run the go snippet "Go HTTP Client with Retry", capture stdout, and show which line demonstrates the documented behavior: "Make HTTP requests in Go with retry logic, exponential backoff, context-based timeouts,".

    Prerequisites: Go HTTP Server with Middleware

    Completion criteria: Paste the command, the exit code, and the output line matching "Make HTTP requests in Go with retry logic, exponential backoff, context-based timeouts,"; then show a second run with a changed parameter.

    Next step: Go gRPC Server Setup

    ⏱ 0.75h

  12. Adapt "Go gRPC Server Setup" to a second input and compare the new output with the behavior described in "Create a gRPC server in Go with protobuf service definitions, interceptor middleware for".

    Prerequisites: Go HTTP Client with Retry

    Completion criteria: Save two runs of "Go gRPC Server Setup" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: Capstone: Go Concurrency

    ⏱ 0.75h

  13. Deliver the "Build a Backpressure Queue Service" blueprint with "Bounded queue" working and "Watermark monitor" recorded as evidence.

    Prerequisites: Go gRPC Server Setup

    Completion criteria: Run the project's test command for "Build a Backpressure Queue Service", paste the passing output, and attach the acceptance note for "Bounded queue" with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h