We released MagicOnion v4 from Cysharp last week.

https://github.com/Cysharp/MagicOnion/

MagicOnion has been built on the design principles of C# as Schema, Code-First Contracts for four years, immediately following the release of gRPC 1.0. Until now, we have been using gRPC C Core from Google, and now we are using the Microsoft implementation of ASP.NET Core Pure C#.

This has allowed us to share the same foundation as ASP.NET Core MVC, etc., so it’s much easier to provide gRPC and live together, such as providing HTTP/1 REST API and HTML output.

And most importantly, performance has improved.

Image for post
Image for post
https://devblogs.microsoft.com/aspnet/grpc-performance-improvements-in-net-5/

Thanks for the ASP.NET…


I’m based in Japan, and the company I founded, Cysharp, is not as well known in besides Japan. However, you may know the OSS I’m making, as several of them have received many stars on GitHub as well.

.NET people will know of my work in high-performance serializers such as MessagePack for C#. It is used by SignalR’s binary protocol, ASP.NET Core Blazor, Visual Studio, etc.

Unity people will know of my work in UniRx — Reactive Extensions for Unity.

Cysharp was founded in 2018 as a subsidiary of Cygames, one of the largest known mobile gaming companies in Japan…


The only way to handle external processes in C# is with the Process class, but this API is very old, and asynchronous support would require a lot of flag and boilerplate code.

So I created a library that “just throws a line of string like writing a shell,” “receives the result in a C# 8.0 asynchronous stream, which also only requires a line of await foreach,” and “handles ExitCode, StdError, etc. appropriately.

There are other wrapper libraries for Process. However, assuming C# 8.0 Async Streams, ProcessX makes it the simplest.

What would normally take about 30…


I’ve renewed ConsoleAppFramework, a framework for easily creating CLI applications and many batches in C#.

The concept of a CLI framework on top of Generic Host, the basic structure, remains unchanged.

Image for post
Image for post

The method definitions become command line arguments, and help is generated automatically, as well as settings of loggers and DIs, and loading and binding of options in the Generic Host (also used in ASP.NET Core, etc.), so you can do detailed configuration with it. Since the foundation is the same, it can be shared with ASP.NET Core and others.

The simplest example would look like this


It’s been a few months since we released UniTask v2, and we’re now at version 2.0.31, GitHub’s Star is achieved over 1100. We believe it is stable and will be used in production.

For more information on UniTask v2, see this article - UniTask v2 — Zero Allocation async/await for Unity, with Asynchronous LINQ.

With the introduction of async/await, it is possible to implement new designs. Let’s take UnityWebRequest as an example of an asynchronous, pluggable and extensible design.

I will introduce it under the name async decorator pattern, but it is commonly known as Middleware.

It is a common…


I’ve previously published UniTask, a new async/await library for Unity, now I’ve rewritten all the code and released new one.

GitHub — Cysharp/UniTask

In UniTask v2, almost everything is zero-allocated due to a thorough rewrite of the code (Technical details to follow). In addition to significant performance improvements, the new asynchronous sequences and Asynchronous LINQ. Others, await extensions for external assets such as DOTween and Addressables Support has also been built in for added convenience.

Before I talk about v2, here’s a recap. async/await is a feature that has been included since C# 5.0. Just like writing asynchronous code in…


I’ve just released a new logging library ZLogger for .NET Core and Unity. It is very fast, and using previously introduced ZString — Zero Allocation StringBuilder in the backend, it eliminates the allocation when formatting the string.

GitHub — Cysharp/ZLogger

The standard output is especially important for containerization. For example, Datadog Logs and Stackdriver Logging collect logs directly from the standard output of the container. Writing to standard output is also recommended in The Twelve-Factor App — XI. Logs section. As such, dealing with over-decorated logs for the local environment and standard output in a slow Console.WriteLine …


For .NET Core and Unity, I have released a library called ZString that enables the memory allocation to zero for string generation. Besides introducing ZString, this article also deeply disassembles and explains the C# string and explains the String’s complexities and pitfalls and the necessity of ZString.

https://github.com/Cysharp/ZString

I am the author of high-performance serializers such as MessagePack for C# and Utf8Json. This is one of them, for performance enthusiasts.

The table below shows the performance measurement of a simple string concatenation called “x:” + x + “ y:” + y + “ z:” + z’.

Image for post
Image for post
  • “x:” + x +…


Formely, I posted MicroBatchFramework — Cloud Native Batch Framework for C#, this new framework is renamed, evolved version of MicroBatchFramework.

Image for post
Image for post

ConsoleAppFramework is built on Microsoft.Extensions(.NET Generic Host)that covering Logging, Configuration, DI, etc. ConsoleAppFramework do parameter binding, method routing, lifecycle management etc. It is like pair of ASP.NET Core, ASP.NET Core is for Web, ConsoleAppFramework is for CLI.

And so similar concept in PHP, Laravel and Laravel Zero that is Micro-framework for console applications. Microsoft’s competitor of ConsoleAppFramework is dotnet/commandline-api, it has System.CommandLine.Hosting and System.CommandLine.DragonFruit that is similar functionally. But ConsoleAppFramework is more stable and high productivity.

SampleApp.exe -name…


MessagePack for C# Version 2 was released in 2019–12–16. The main implementation was done by Andrew Arnott who is a software engineer at Microsoft, Visual Studio Team. I checked the API design and performance and took care of the Unity compatibility. This collaboration took almost a year, and I think we did a great job.

https://github.com/neuecc/MessagePack-CSharp

Version 1 that implemented by me greatly boosted the old serializer’s performance standards and set a new standard. Version 2 made it work with new APIs (Span, System.Buffers) and also the overall I/O pipeline was optimized upon deciding how the serializer should be. …

Yoshifumi Kawai

a.k.a. neuecc. Creator of UniRx, UniTask, MessagePack for C#, MagicOnion etc. Microsoft MVP for C#. CEO/CTO of Cysharp Inc. Live and work in Tokyo, Japan.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store