Skip to content

Releases: dotnet/orleans

v3.6.3

04 Aug 22:20
985d0ed
Compare
Choose a tag to compare

What's Changed

  • Fix generic method by @phynalle in #7697
  • Updating ConsulVersion for 3.x to match main by @Tapanila in #7709
  • Fix support for grains with no namespace (in global namespace) by @ReubenBond in #7758
  • [3.x] Make IKeyedSerializer public for more advanced serialization cases by @ReubenBond in #7766
  • Improve : throw `TypeLoadException on failing to load a type by @wangjia184 in #7851
  • Validate constraints that are themselves generic correctly in GenericMethodInvoker. by @niblak in #7876

New Contributors

Full Changelog: v3.6.2...v3.6.3

v3.6.2

15 Apr 21:51
041fd50
Compare
Choose a tag to compare

What's Changed

  • DynamoDB optional table create / update and update corner cases by @smiron in #7681
  • 3.x - Ensure timestamp is updated on codegen output for incremental builds by @archonandrewhunt in #7687

New Contributors

  • @archonandrewhunt made their first contribution in #7687

Full Changelog: v3.6.1...v3.6.2

v3.6.1

05 Apr 15:48
3b9db14
Compare
Choose a tag to compare

What's Changed

  • Ignore value loaded in EventHubCheckpointer if it's obviously corrupted by @benjaminpetit in #7529
  • Fix custom grain directory registration by @benjaminpetit in #7613
  • In CachedGrainLocator.Unregister, remove from cache using the address by @benjaminpetit in #7604
  • Add IGrainLocator.InvalidateCache to remove cache entry when using a custom directory by @benjaminpetit in #7636
  • Check [KnownBaseType] by Type.FullName rather than reference by @wangjia184 in #7656
  • Ignore KnownAssembly attribute which points to the containing assembly by @ReubenBond in #7664
  • Orleans.Reminders.DynamoDB use the Query operation for ReadRows by @smiron in #7658
  • Fix Source Link build for CI by @ReubenBond in #7673

New Contributors

Full Changelog: v3.6.0...v3.6.1

v4.0.0-preview1

16 Feb 00:02
dc036e3
Compare
Choose a tag to compare
v4.0.0-preview1 Pre-release
Pre-release

Major changes from the 3.x release series

The full change log lists around 500 changes, and many involve small quality of life improvements, internal refactorings for performance, reliability, versatility, and maintainability. What follows are the larger changes which we would like to highlight in these release notes since they are more likely to impact application developers.

Grain and Stream identity enhancements

Grain identities now take the form type/key where both type and key are strings. This greatly simplifies how grain identity works and improves support for generic grain types.
Previous versions of Orleans used a compound type for GrainIds in order to support grain keys of either: Guid, long, string, Guid + string, or long + string. This involves some complexity when it comes to dealing with grain keys. Grain identities consist of two components: a type and a key. The type component previously consisted of a numeric type code, a category, and 3 bytes of generic type information.

Streams are also now identified using a string instead of a Guid, which grants more flexibility, especially when working with declarative subscriptions (most commonly accessed via the [ImplicitStreamSubscription(...)] attribute)

This move to stringly-typed ids is expected to be easier for developers to work with, particularly since the GrainId and StreamId types are now public (they were internal) and GrainId is able to identify any grain.

Version-tolerant, high-performance serialization & RPC

4.x changes how serialization works. The default serializer in previous releases of Orleans is not tolerant to changes in a type's schema. Adding, removing, or renaming a field or type could cause serialization to break without obvious recourse. In 4.x, we introduce a new version-tolerant serializer which allows adding/removing/renaming fields and some type change operations (widening or narrowing a numeric type, for example). We still recommended that developers use JSON serialization for persistence. The new serializer is also designed for high performance and as a result, it is substantially faster than the serializer which it replaces.

Aside from serialization, the remote procedure call internals have been overhauled for performance and flexibility. Previous versions of Orleans use a type called InvokeMethodRequest which identifies the interface and method being invoked using generated integer values and contain an array of objects representing the arguments. The InvokeMethodRequest object is passed to a generated IGrainMethodInvoker implementation which essentially contains some nested switch statements to find the correct method to invoke, then casts the arguments in the object array to the correct types in the invocation. This design has several drawbacks:

  • Handling of overloads and complex generic types is complicated and sometimes intractable
  • It requires boxing primitive argument types, such as int, DateTimeOffset, and user-defined structs
  • Type information must be serialized for all method arguments

Instead, the replacement (which lives in Microsoft.Orleans.Serialization) involves generating an implementation of IInvokable for every method. This interface gives infrastructure components like grain filters enough information to see interface and method information as well as to inspect and manipulate arguments and return values. It is also more efficient to serialize and invoke and relies on the C# compiler to perform method overloading. Generic parameters from generic grain interfaces and generic methods become generic parameters of the implementation, avoiding or offloading most of the complexities involved with generics.

Notice about Breaking Changes

  • Clusters cannot be smoothly upgraded from a previous version of Orleans to Orleans 4.0 via a rolling upgrade.
  • Serializable types must be marked with the [GenerateSerializer] attribute, with any serializable property or field marked with the corresponding [Id(x)] attribute. This is intentionally less magical than in previous versions of Orleans, which did its best to infer what types needed to have serializers generated for them. What this extra ceremony buys you is valuable, though: version tolerance.
  • Since GrainId and StreamId are so different, persistence, streams, and reminders are not forward-compatible yet.
  • We will have more to say regarding our plans to facilitate migration of Orleans 3.x applications to Orleans 4.x.

Here is an example of a type which Orleans would generate a serializer for previously, versus how that same type should be written for Orleans 4.0:

Orleans 3.x and below:

[Serializable]
public class UserProfile
{
    public string DisplayName { get; set; }

    public string PreferredLanguage { get; set; }

    public DateTimeOffset AccountCreated { get; set; }
}

Orleans 4.x and above:

[GenerateSerializer]
public class UserProfile
{
    [Id(0)]
    public string DisplayName { get; set; }

    [Id(1)]
    public string PreferredLanguage { get; set; }

    [Id(2)]
    public DateTimeOffset AccountCreated { get; set; }
}

We have included some analyzers to make this process easier for developers. The first code fix prompts you to add the [GenerateSerializer] attribute for any type which has the [Serializable] attribute:
image
The second analyzer will add [Id(x)] attributes for you:
orleans_analyzer

Full Changelog from 3.0.0 to 4.0.0-preview1: v3.0.0...v4.0.0-preview1

Read more

v3.6.0

20 Jan 16:59
f66bff5
Compare
Choose a tag to compare

Breaking changes for Azure providers

Authentication to Azure services has evolved and connection strings are typically deemphasized in favor of managed identities. In this release, we've migrated Azure providers to newer libraries which support managed identities and other authentication methods and we've updated options to expose this functionality. Since there are a large number of potential authentication methods requiring various combinations of options, we moved away from exposing each property and instead added configuration methods to the provider options.

For example, AzureStorageOperationOptions has a ConfigureTableServiceClient method with the following overloads:

  • void ConfigureTableServiceClient(string connectionString)
  • void ConfigureTableServiceClient(Uri serviceUri)
  • void ConfigureTableServiceClient(Func<Task<TableServiceClient>> createClientCallback)
  • void ConfigureTableServiceClient(Uri serviceUri, TokenCredential tokenCredential)
  • void ConfigureTableServiceClient(Uri serviceUri, AzureSasCredential azureSasCredential)
  • void ConfigureTableServiceClient(Uri serviceUri, TableSharedKeyCredential sharedKeyCredential)

Configuration methods help to ensure that the right combination of parameters are provided.

Breaking issue with ASP.NET Core 2.1

Note, if you are using ASP.NET Core 2.1, please note that we have had reports of users running into an incompatibility issue in Microsoft.Extensions, preventing the upgrade. Please see dotnet/extensions#3800, dotnet/aspnetcore#40255, and #7608

Build system changes

  • Builds are now reproducible
  • SourceLink has been enabled and sources are no longer shipped in the NuGet packages
  • Debug symbols are now embedded in the shipped dlls instead of alongside them

Improvements and bug fixes since 3.5.1

  • Breaking and potentially breaking changes

    • Migrate to Azure.Data.Tables SDK for Azure Table Storage (#7300) (#7363)
    • Upgrade to .NET 6.0, update dependencies, and fix packaging (#7431)
  • Non-breaking improvements

    • Rewrite batch build script in powershell (#7379) (#7382)
    • Support Npgsql 6.0 for clustering and reminders (#7402)
    • Initial commit for distributed tests using crank (#7323) (#7440)
    • Support configuring ILBasedSerializer and BinaryFormatterISerializableSerializer as pre-fallback serializers (#7384)
    • Support opting in to IKeyedSerializer implementations on a per-type basis using an attribute (#7438)
    • Create PostgreSQL migrations for version 3.6.0 (#7490) (#7492)
  • Non-breaking bug fixes

    • Fix bug in validating generic constraints for method invocation (#7400)
    • Do not register IGrainStorage in DI unless there is a provider named "Default" (#7409) (#7444)
    • AdoNet - be more explicit when extracting DateTime from IDataRecord (#6968) (#7463)
    • DynamoDB Reminders load using GSI (#7437)

Thank you to the following community members for your PR contributions and to everyone else who contributed: @mjameson-se @dave-b-code @michaeltdaniels @EdeMeijer @shmurchi

Full Changelog: v3.5.1...v3.6.0

v3.5.1

08 Nov 17:18
928c259
Compare
Choose a tag to compare

Improvements and bug fixes since 3.5.0

  • Potentially-breaking changes

    • Support ILBasedSerializer as a fallback only after trying the configured fallback (#7355)
      • This change may expose cases where types in an application are no longer able to be serialized because they were being serialized by ILBasedSerializer. In 3.6.0, we are introducing an option to revert to the previous behavior (attempting to use ILBasedSerializer before the configured fallback serializer), so if this affects you, please wait for that release. If you encounter any issues, please open an issue.
  • Non-breaking improvements

    • Support Minimal API host builder (#7316)
    • CodeGenerator: support implicit using directives (#7310)
    • Improve graceful connection shutdown (#7345)
    • Upgrade Kubernetes version used by Microsoft.Orleans.Kubernetes.Hosting package (Fix: Orleans.Hosting.KubernetesHosting: System.MissingMethodException (#7364))
    • Implement GetGrainId() for SystemTargets & GrainService (#7259)
    • Make Silo.WaitForMessageToBeQueuedForOutbound configurable. (#7354) (#7355)
    • Clarify comment on disabling workload analysis and log unknown status updates at the debug level (#7358)
  • Non-breaking bug fixes

    • Fix: wrong parameter used when throwing QueueCacheMissException (#7295) (#7306)
    • Add support for generic constraint during resolution of generic grain methods (#7325)
    • Adjust ETag options on Clear/Write (#6908) (#7187) (#7326)
    • Record result of deserialization for keyed serializers (#7336)
    • Record deserialized array before deserializing array contents arrays of non-primitive types (#7335)
    • Fix in Redis GrainDirectory: when deleting, check only the ActivationId (#7362)
    • [Streaming] Fix token comparison in SetCursor (#7308)

v3.4.4

04 Oct 16:01
f2bae2e
Compare
Choose a tag to compare

This release is based on 3.4.3, but without some changes made in 3.5.0, noticeably the Event Hubs library upgrade.

If possible, users should upgrade to 3.5.0 instead.

Improvements and bug fixes since 3.4.3

  • Non-breaking bug fixes
    • Fix token comparison in SetCursor (#7314)
    • Fix: wrong parameter used when throwing QueueCacheMissException (#7295)
    • Fix shutdown race condition in GrainTimer (#7234)
    • More fix to avoid shutdown pulling agent sending messages (#7222)
    • In PooledQueueCache, avoid cache miss if we know that we didn't missed any event (#7060)

v3.5.0

03 Sep 13:42
7608c19
Compare
Choose a tag to compare

Improvements and bug fixes since 3.4.3

  • Non-breaking improvements

    • Add C# 9.0 record support to serializer (#7119)
    • Fallback to ILBasedSerializer when BinaryFormatter is disabled (#7198)
    • AAD TokenCredential support on Azure Event Hubs Stream Provider (#7166)
    • Add TLS certificate selector for the client (#7144)
    • Add MembershipVersion in GrainAddress (#7133)
    • Add Silo RoleName based placement (#7157)
    • Permit ValueTask and ValueTask<T> to be used in generic grain methods (#7190)
    • Do not add application parts from dependency context by default (#7197)
    • Updated AzureBlobStorage to use state type during JSON deserialization (#7147) (#7212)
    • Upgrade Azure EventHubs (#7255)
  • Non-breaking bug fixes

    • In PooledQueueCache, avoid cache miss if we know that we didn't miss any event (#7060)
    • GenericMethodInvoker now correctly handles generic methods with overloads (#6844)
    • Fix unhandled exception on Kubernetes watcher background task (#7168)
    • EventHubReceiverProxy: ignore if offset isn't valid (#7192)
    • Fix to avoid stopped stream pulling agents from sending messages (#7222)
    • Fix shutdown race condition in GrainTimer (#7234)

v3.4.3

24 Aug 14:28
8255e5a
Compare
Choose a tag to compare

Improvements and bug fixes since 3.4.2

  • Non-breaking bug fixes
    • Prevent diagnostic notification messages from being dropped prematurely (#7046) (#7049)

v3.4.2

05 Apr 17:54
97062ac
Compare
Choose a tag to compare

Improvements and bug fixes since 3.4.1

  • Non-breaking improvements

    • Close connections asynchronously and improve gracefulness (#7006)
  • Non-breaking bug fixes

    • Only send a rejection if the message is a request (#6946) (#6958)
    • Avoid Message.Id collision in the message callback dictionary (#6945) (#6959)
    • Check if offset is a long in EventHubCheckpointer (#6960)
    • Return zero elapsed time for unstarted Messages (#6969) (#6973)
    • Call ScheduleCollection before starting processing requests (#6974)
    • Fix breaking of outstanding messages when a silo shuts down (#6977) (#6978)
    • Fix retry logic in PersistentStreamPullingAgent.RunConsumerCursor (#6983)