Modeling and managing Mobile Application State
Posted on Saturday, December 31, 2022
Mobile application state is a sticky wicket. You receive events that can mutate the application state with no user interaction like a reduced network signal. Users can receive a phone call or other events which could put your app in a background state. Events from outside the application (the operating system, the hardware) might change the state of the running application. What happens if these events conflict? How do we handle them cleanly when the events might depend on each other?
These events transition your application to some state for some period of time. We have an entire system that needs to "Wake Up", "Power Down", or "Run Offline" and we need to respond to the event and transition the mobile application to the proper state so it doesn't crash! I have solved this problem a few ways over several mobile applications. Still looking for a better way to solve the problem.
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?
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.