Thread marshalling in Reactive Programming - Observe On vs Subscribe On


Posted on Thursday, June 23, 2022

In my opinion, thread marshalling is one of the hardest concepts in asynchronous programming. Understanding multi-threading, and further, taking control of multi-threading in functional programming can be a daunting task. It demands knowledge of where you came from, where you are going and when you are scheduled to arrive. Some operators expose overloads for passing a thread context and it isn't always obvious you should use it. All things that we don't generally consider, matter when we want to harness the power of things like the TaskpoolScheduler. The relevant question to me was, what is asynchronous programming, and does asynchrony guarantee multiple threads?

Read

Is there an echo?


Posted on Saturday, October 2, 2021

When I ran for the .NET Foundation Board, I found it odd that the legacy members were silent. There was no word from them on the experience. There was no understanding of their thought on the state of affairs in the .NET Foundation. There was an election. We shuffled them out without a word and brought in new board members in total silence. The silence I heard was loud enough for me to realize the potential problem. I proceeded anyway, with caution.

Read

Common problems using Reactive Programming in C#


Posted on Wednesday, January 27, 2021

There are a lot of misconceptions about declarative programming. Even more so around Reactive Extensions, which is a cross-platform specification for implementing the observer pattern. This is a well-established pattern for software development that has existed longer than I have been developing software. Microsoft even spawned Reactive Extensions in 2009, yet so few C# developers seem to understand what it is or want to use it. This usually happens when we don't understand how to solve problems with a declarative paradigm, which is really about declaring behavior based on state transitions. So let's look at common problems and patterns you might encounter with Reactive Extensions.

Read