Skip to main content

Capstone checkpoint

Challenge on lesson: Checkpoint: production architecture

CHALLENGE
Difficulty: advanced+25 XP

Assemble the platform core as class JobPlatform. Constructor: JobPlatform(int capacity). Methods: (bool accepted) Submit(string jobId, Func<int> work) โ€” accepts only if the jobId was never seen ANDin-flight count < capacity (idempotency + backpressure; duplicates and over-capacity return false and count as rejected); int RunAll() โ€” executes every accepted job exactly once (chronologically), returns the work-counter delta (equals accepted count โ€” proving each job ran once); int Pending property. Then static (int accepted, int rejected, int executed) SubmitSchedule(JobPlatform p, List<string> jobIds, int duplicatesPerJob) โ€” submits each id (1 + duplicatesPerJob) times, returns accepted/rejected counts and executed = RunAll().

Back to lesson: Checkpoint: production architecture