Skip to contentSkip to content
Verified credentials. On-chain. Forever.Learn more
Cover image for Build a Bounded Concurrent Queue for a Microservice Worker Pool
Code

Build a Bounded Concurrent Queue for a Microservice Worker Pool

FreeVerified credential2 weeksIntermediate

Overview

What this challenge is about.

Implement a bounded concurrent queue in Go (no third-party queue libraries; standard library + sync primitives only) that supports: Put(item) blocks when full, TryPut(item, timeout) with timeout, Get() blocks when empty, TryGet(timeout) with timeout, Close() drains gracefully. Use a mutex + condition variables (sync.Cond) as the baseline, then offer a channel-based alternative — defend the trade-offs in writing. Build a race-free test suite covering: concurrent producers + consumers, timeouts, close-while-blocked, and ensure go test -race -count=100 passes. Benchmark against the existing unbounded channel under 3 workloads (steady, bursty, slow-consumer). Deliver the queue source, the test suite, the benchmark report, and a 4-page design note for the platform team.

CredentialBlockchain-anchored
ShareableLinkedIn-ready
LanguageEnglish
PaceSelf-paced

The Brief

What you'll do, and what you'll demonstrate.

Design and implement a bounded, race-free concurrent queue with backpressure that survives bursty load without OOM-kills, and prove correctness under -race.

Earning criteria — what you'll demonstrate

  • Use mutex + condition variables to implement a bounded blocking queue
  • Compare a sync.Cond approach against a channel-only approach honestly
  • Write test cases that exercise concurrent edge cases (close-while-blocked, timeouts)
  • Benchmark under bursty traffic, not just steady-state

Program Fit

Where this fits in your program.

Sharpens the same skills your degree expects you to demonstrate.

Skills

Skills you'll demonstrate.

Each one shows up on your verified credential.

Careers

Roles this prepares you for.

Real titles. Real skill bridges. Pick the one closest to your trajectory.

Career mappings coming soon.

One more thing

You can put a credential on your CV by Friday.