Async Producer / Consumer Pipeline

In my previous post I mentioned I wrote what I call an async producer / consumer pipeline. I described in detail a compiler error I encountered in my initial efforts, and how I resolved the error, but did not share or discuss the actual pipeline code. I focused on how the VB language, generally regarded as less capable and elegant than the C# language, supported a syntax of defining and immediately invoking a lambda expression, while the C# language did not support the syntax. This syntax is well known to JavaScript developers as an Immediately Invoked Function Expression, or IIFE. […]

An Async Lambda Compiler Error Where VB Outsmarts C#

Stunned I have encountered a scenario where the VB compiler outsmarts the C# compiler. I am stunned by this. C# is the far superior programming language. But I’ve done a lot of testing and am convinced it’s true. Stumped Month ago, while working on C# code for my Leaderless Replication post, I ran into a compiler error I did not understand. My mental compiler- as opposed to Microsoft’s C# compiler- concluded all the types were correct and the code should compile. I could not figure out what was incorrect about the code. I accepted my code was wrong- I’m not […]

Leaderless Replication

Introduction I have been reading Designing Data-Intensive Applications by Martin Kleppmann. (I heard of the book via a review Henrik Warne posted on his blog. I encourage you to read Henrik’s blog- excellent content, clearly articulated). I am only a third of the way through the book but can already say it is one of the best technical computer books I have ever read. As I said in a comment I left on Henrik’s blog, Martin Kleppmann has put a lot of effort into writing clearly and without pretension. He doesn’t use terms without defining the concepts behind them. And […]

Async Does Not Imply Concurrent

I wish authors who write articles about C# async / await programming techniques would emphasize that two concepts they frequently discuss are actually separate features that provide separate benefits. Perhaps I’ve overlooked an explanation of the orthogonality of async and concurrent in the restaurant or cooking breakfast analogies. (Update 2020 Jul 30: The cooking breakfast article has been updated and draws a clearer distinction between async work and parallel / concurrent work). Nonetheless, it will benefit readers of this blog to disentangle the concepts here. It’s easy for novice programmers to write incorrect code and believe they’re getting performance benefits […]