This talk is focused on how the RPC & Serializer in Orleans work and how they are designed for high performance. Rather than being Orleans 101, it's a perf-focused look under the hood. Some examples
Quote Tweet
Konrad Kokosa
@konradkokosa
·
Lead for Microsoft Orleans @ReubenBond about "A Deep Dive into Orleans"
https://youtube.com/watch?v=kgRag4E6b4c…
You can have low-cost abstraction by creating generic types and specializing them using value-typed parameters, allowing the JIT to remove type checks and eliminate dead code
In order to support flexible RPC which is also high-performance (to serialize, deserialize, & invoke), we generate per-method closure types. This eliminates the quagmire of method overload resolution and allows for very cheap introspection for middleware
I mention some issues inherent with optimizing for microbenchmarks in the talk. You may end up with code which benchmarks well but is selfish. Eg, the generated deserializer code here is fast and friendly to the CPU's branch predictor, but less efficient for the instruction cache
Lower is better in these benchmarks, so System.Text.Json is only beating out Newtonsoft.Json here. I imagine it's performance will be improved, but it's not there yet in my books