Friday, April 18, 2014


In the mean time Microsoft's C# team has developed async/await as a language extension. In my view it is a fantastic step forward. Now we are able to coordinate asynchronous behaviour on a higher abstraction level.

But when we use many thread, we are still left alone to protect our data's consistency.
In the past years I developed AsyncWcfLib into an Actor framework because I think Actors are the right concept to deal with thread safety.
Actors contain data and as I see it, this data is only manipulated by a single thread. The Actor needs message passing and asynchronous programming. This is now much easier thanks to async/await.

A perfect way of modeling messages is sending immutable objects between actors. Scala is a programming language that has first class support for immutability.
I would not be surprised to see better support for immutability in a future version of C#.

That's why I still stick to C# and developed the Remact.Net framework.
I moved away from WCF and now use WebSockets as an open, bidirectional protocol. Additionally I'm using JSON for serialization. This combination makes it possible to efficiently communicate with actors written in other programming languages like Java-Script, Java and Scala.

No comments:

Post a Comment