Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
3 posts found #channels
Worker Service and an In-Process Job Queue: Channel, PeriodicTimer and Windows Service/systemd
Backend PART 03

Worker Service and an In-Process Job Queue: Channel, PeriodicTimer and Windows Service/systemd

An in-process job queue built on a bounded Channel returns false from TryWrite when it is full; the endpoint turns that into a 503 with a Retry-After header and applies backpressure. For periodic work, PeriodicTimer doesn't pile up missed ticks: after a long run it fires at most once right away. AddWindowsService and AddSystemd only activate in their own environment, and the queue empties on restart.

8 Nov 2026 10 min 4
Trade-off Thinking: No Right Answer, Only the Least Worst Option
Software Architecture PART 04

Trade-off Thinking: No Right Answer, Only the Least Worst Option

In architecture every option gains one characteristic at the expense of another; the job is to make the cost visible and accept it deliberately. In Bookstore, sending the order email synchronously ties checkout to SMTP and creates duplicate orders, while queuing it with Channel<T> brings checkout down to 1 ms but loses 3 emails when the process stops; one-way and two-way doors, the last responsible moment and writing down the why.

7 Nov 2026 13 min 5
Producer/Consumer with C# Channels: Backpressure, Bounded Channels and Pipelines
Backend PART 14

Producer/Consumer with C# Channels: Backpressure, Bounded Channels and Pipelines

An async queue with System.Threading.Channels: why three orders fit into a channel with a capacity of two, Writer/Reader and Complete, the WaitToReadAsync/TryRead loop, FullMode options and itemDropped on bounded channels, multiple consumers, an order pipeline that passes failures on with Complete(ex), and the cost of forgetting Complete.

7 Nov 2026 9 min 11
Blog Map