Orleans 2.0 Tech Preview supporting .NET Core

It's been a long migration to have Orleans be .NET Standard compatible, but we finally have a minimum viable release ready to start playing with in .NET Core! 🙂
Orleans 2.0 Tech Preview 1 was just released to MyGet: https://dotnet.myget.org/gallery/orleans-ci (or https://dotnet.myget.org/F/orleans-ci/api/v3/index.json to configure the feed in NuGet)

Differences with Orleans 1.X

Orleans 2.0 Tech Preview is not as full featured as Orleans 1.X, as we ported the minimum needed to have a decent experience, and arguably the hardest/riskiest portion to port. We expect the rest of the extensions to be migrated much faster from now on.
Some notable differences or pending things in this pre-release:
  • Orleans code generation
    • Build time codegen (Microsoft.Orleans.OrleansCodeGenerator.Build nuget package) only works if building on Windows with .NET 4.6.2 installed. It also requires .NET Core preview3 tooling or greater (VS2017 RC if building in VS).
    • Nevertheless, runtime codegen is a viable alternative that works cross-platform (by referencing Microsoft.Orleans.OrleansCodeGenerator package in the Silo host and client projects).
  • For reliable cluster membership, storage, and stream, only Azure Storage providers were migrated for now. The rest are coming soon (or feel free to contribute a port for them).
  • BinaryFormatter (built-in .NET Serialization) is not yet available in .NET Standard, and it was being used as the default fallback serializer in Orleans (and typically used mostly when serializing exceptions). Now we have a custom IL based fallback serializer that should be fast and powerful, but might behave somewhat differently if you have existing code relying on [Serializable].
  • System.Diagnostic.Trace.CorrelationManager.ActivityId is not supported in .NET Standard. If you were relying on this to correlate grain calls, consider using Orleans.Runtime.RequestContext.ActivityId instead.

Is it production ready?

Big disclaimer: We do our CI testing in .NET (because our tests heavily rely on AppDomains to create an in-memory cluster of silos, and those are not supported in .NET Core, but we plan to tackle that soon). We have done some basic manual testing in .NET Core (both Windows and Linux), but expect some issues. Getting feedback (and PRs!) is one of the main goals of this release, and not to be used in production yet.
Also, there is no guarantee that this technical preview is entirely backwards compatible with Orleans 1.3, even for the features that were fully ported. Once we are closer to a stable release, we'll list all the breaking changes that we know of in case you are interested in upgrading your application from 1.3 to 2.0.
Because this tech preview is not as full featured as the 1.X releases is that we are only release in MyGet for now.

Running sample

I created a small Hello World sample app that runs in .NET Core, and you are welcome to use it as a starting point.

Sample application running Orleans in Linux

Sample application running Orleans in Linux

Enjoy it, play with it, and lets us know what you think, either as GitHub issues, PRs or just come hang out in our Gitter channel.
Comments (8)

  1. Yay! Finally! Great work to everyone involved!

  2. Mark Rendle says:

    Great work guys. Will the build-time codegen come to Linux/Mac eventually, or is there a hard blocker on that?

    1. AttilaH says:

      We currently does not support that because ClientGenerator.exe is built during the bootstrapping as a .Net Framework application, but it is clearly possible, I’ve a prototype of ClientGenerator in my fork (https://github.com/attilah/orleans/tree/assembly/vNext/src/ClientGenerator.NetCore) which ran on a previous codebase as a .Net Core App.

      What needs to be done is the following:
      – Modify ClientGenerator to be multitargeted project
      – Tweak the bootstrapping process to build it for .Net and .Net Core too.
      – Tweak Orleans SDK targets file to select the appropriate ClientGenerator.
      – Update Orleans.CodeGenerator.Build Nuget package to include both versions and updated targets file.

      Community contributions are welcome if you ilie to jump on this one 😉

  3. Shane says:

    When I try to restore the nuget dependencies, I get:
    “WARNING: An error occurred while loading packages from ‘https://dotnet.myget.org/F/orleans-prerelease/api/v3/index.json’: The remote server returned an error: (404) Not Found.”

    1. sbykov says:

      Probably just a MyGet glitch. Please try again.

  4. Tomer says:

    We are about to start development (about >1 month, doing Architecture first) of a mid-big distributed web app, running under AWS/Kubernetes/Docker, and Virtual Actor can definitely help with getting things done. We wonder if choosing Orleans 2.0 preview over .NET Core will be wise choice.
    Our main concerns are:
    1. Will it be RC/Release soon (#months)?
    2. The future of Orleans, as we afraid Azure Service Fabric will replace it for good.

    Great work!!

    1. sbykov says:

      1. We plan to switch focus on finalizing 2.0 next after 1.5 is done in a few weeks. We expect 2.0 to take another 2-3 months after that.
      2. Orleans is very complementary to SF. We see a number of customers running Orleans applications on it. We continue investing in Orleans with some exciting new features coming out soon.

      Thank you!

  5. rookie says:

    great!great! I’m looking forward to it because I’m using the.Net Framework version, and I want to use the.Net core

Skip to main content