How To Unit Test Framework Services In Orleans

How To Unit Test Framework Services In Orleans

Testing interactions between components in a distributed system context tends to involve full-scale integration testing rather than fast unit testing. This requires developers to wait for a deployment to execute, rather than having immediate feedback along the test-driven-development cycle. The use of the provider model in Orleans takes much of this pain away, as we can instead mock and fake the base services and providers, while relying on them to do the right thing at run time. We can still have deployment-time integration testing, but with Orleans, it is easy to have immediate testing feedback at development time.

This article describes how we can go about this, and it is based on the unit testing sample I’ve added to the Orleans repository.

read more

Latency-Adaptive Real-Time with Reactive Caching on Microsoft Orleans

Latency-Adaptive Real-Time with Reactive Caching on Microsoft Orleans

The Reactive Caching pattern allows many service clients to stay in sync with the latest data snapshot from an origin, regardless of their relative network latency. This pattern exploits Reactive Polling, enables Real-Time CQRS Projection Streaming and opens the doors to opportunistic Reactive Replication.

This article talks about my team’s experience applying this approach with Microsoft Orleans to solve a multi-geography user latency challenge.

read more

Over-engineering Cyclic Array Rotation In C#

Over-engineering Cyclic Array Rotation In C#

Rotating an array in an efficient way is a classical programming exercise.

It’s also one that’s ripe for over-engineering for funsies.

This article describes five approaches for rotating an array and ranks their performance against each other.

read more

How To Disable Turbo Boost In Laptops

How To Disable Turbo Boost In Laptops

Intel Turbo-Boost and AMD Turbo CORE may be nice for gaming but they’re a nuisance for performance benchmarking.

While there is often a BIOS setting in desktop machines to turn this off, walled garden laptops like mine make it impossible to disable it via the user interface or even their own tuning software.

The good news is, you can use the power configuration manager utility in Windows to force it off outright.

Powercfg -setacvalueindex scheme_current sub_processor PERFBOOSTMODE 0
Powercfg -setactive scheme_current

This disables turbo-boost for the current power plan.

If you’re on Windows 10 and have the fancy power slider, you can now bring your power mode to best performance and your processor will keep working at the maximum standard clock rate, without boosting.

You can find more information about this on the Power and Performance Tuning page from the Performance Tuning Guidelines for Windows Server documentation.

read more