-
Notifications
You must be signed in to change notification settings - Fork 3
Version History
- Introduced multi-targeting (.NET Standard / .NET Core 3.1)
- Updated all Service Fabric references to 4.2.477
- Updated all Service Fabric references to 4.2.457.
-
Introduced new local runtime mode. This mode allows debugging stateless services which make use of aspnetcore listeners locally without a need to deploy service to local cluster.
Please see the documentation and sample for more details.
-
Support for configuration of additional delegates on service events (service package).
new HostBuilder() .DefineStatefulService( serviceBuilder => { serviceBuilder .DefineDelegate(delegateBuilder => delegateBuilder.UseEvent( StatefulServiceLifecycleEvent.OnConfigPackageAdded)); }) .Build() .Run();
Please see the documentation for more details.
-
New sample reacting-on-service-package-events is now available to demonstrate how service package events are raised during application upgrade.
Please see the sample for more details.
-
New sample using-local-runtime is now available to demonstrate how stateless service can be debugged without deploying it to Service Fabric cluster.
Please see the sample for more details.
- Fixed an issue when dependency resolution of non-generic type registered as generic interface was causing
ArgumentException($"<parameter name> isn't a generic parameter.")
exception.
-
Support custom
ICommunicationListener
configuration.private static void Main(string[] args) { new HostBuilder() .DefineStatefulService( serviceBuilder => { serviceBuilder .DefineGenericListener(...) listenerBuilder => { listenerBuilder .UseCommunicationListener( (context, name, provider) => { return /* ICommunicationListener */; }) }); }) .Build() .Run(); }
Please see the documentation for more details.
- The project wiki was updated significantly.
-
The
IServiceEventSource
interface was completely redesigned:public interface IServiceEventSource { void WriteEvent<T>( ref T eventData) where T : ServiceEventSourceData; }
-
Support for service's event source (ETW) configuration.
.DefineStatefulService( serviceBuilder => { serviceBuilder .SetupEventSource( eventSourceBuilder => { eventSourceBuilder .UseImplementation(() => ServiceEventSource.Current); }) })
Please see the documentation for more details.
-
New sample configuring-custom-event-source - this sample demonstrates how to configure custom event source to be used for logging and tracing purposes.
Please see the sample for more details.
- An issue when injection of
IStatefulServiceEventPayloadOnDataLoss
was failing for delegates configured to react onStatefulServiceLifecycleEvent.OnDataLoss
event.
-
Support for configuration of the service event when delegate is executed.
new HostBuilder() .DefineStatefulService( serviceBuilder => { serviceBuilder .DefineDelegate(delegateBuilder => delegateBuilder.UseEvent(...)); }) .DefineStatelessService( serviceBuilder => { serviceBuilder .DefineDelegate(delegateBuilder => delegateBuilder.UseEvent(...)); }) .Build() .Run();
Please see the documentation for more details.
-
New sample reacting-on-service-lifecycle-events is now available to try configuring delegates to react on service events.
Please see the sample for more details.
- An issue when events written using
ILogger<T>
from delegate body weren't redirected into ETW.
-
This version requires Microsoft.ServiceFabric.AspNetCore.HttpSys. This is required in order to avoid conflict on Microsoft.ServiceFabric.AspNetCore.Abstractions dependency. This is a subject to change in the next release i.e. there would be separate packages for using Kestrel and HttpSys servers.
Please see the issue for more details.
-
Renamed remoting listener
UseSerializer<TSerializer>(...)
toUseSerializationProvider<TSerializationProvider>(...)
-
Renamed remoting listener
ServiceHostRemotingCommunicationListenerComponents.MessageDispatcher
toServiceHostRemotingCommunicationListenerComponents.MessageHandler
and its type changed from ServiceRemotingMessageDispatcher to IServiceRemotingMessageHandler. -
Signature of
UseCommunicationListener(...)
for aspnetcore listener has changed:From:
public static TCaller UseCommunicationListener<TCaller>( this TCaller @this, ServiceHostAspNetCoreCommunicationListenerFactory factoryFunc); where TCaller : IConfigurableObject<IServiceHostAspNetCoreListenerReplicaTemplateConfigurator>
To:
public static TCaller UseCommunicationListener<TCaller>( this TCaller @this, ServiceHostAspNetCoreCommunicationListenerFactory factoryFunc, Action<IWebHostBuilder> configAction); where TCaller : IConfigurableObject<IServiceHostAspNetCoreListenerReplicaTemplateConfigurator>
The
configAction
is called after all configuration action registered viaConfigureWebHost(...)
method are executed.
-
Improved support of hierarchy dependency injection. Now all open-generic singletons registered as
interface
type are correctly proxied to lower levels.new HostBuilder() .ConfigureServices( services => { // All requests to IOpenGeneric<T> with the same T // would result into same instance in both // FirstEndpoint and SecondEndpoint. services.AddSingleton<IOpenGeneric<>, OpenGeneric<>>(); }) .DefineStatefulService( serviceBuilder => { serviceBuilder .DefineAspNetCoreListener( listenerBuilder => { listenerBuilder.UseEndpoint("FirstEndpoint"); }) .DefineAspNetCoreListener( listenerBuilder => { listenerBuilder.UseEndpoint("SecondEndpoint"); }); }) .Build() .Run();
Please see the documentation for more details.
-
Support for HttpSysCommunicationListener when configuring aspnetcore listener.
... .DefineAspNetCoreListener( listenerBuilder => { listenerBuilder.UseHttpSys(); }) ...
Please see the documentation for more details.
-
Support for customization of IServiceRemotingMessageHandler when configuring remoting listener.
... .DefineRemotingListener( listenerBuilder => { listenerBuilder.UseHandler<THandler>(); }) ...
Please see the documentation for more details.
-
Support for manual dependency injection when configuring remoting listener.
Remoting API Implementation
... .DefineRemotingListener( listenerBuilder => { listenerBuilder.UseImplementation<ApiServiceImpl>( provider => new ApiServiceImpl()); }) ...
Remoting Serialization Provider
... .DefineRemotingListener( listenerBuilder => { listenerBuilder.UseSerializer<TSerializer>( provider => new SerializerImpl()); }) ...
Remoting Message Handler
... .DefineRemotingListener( listenerBuilder => { listenerBuilder.UseHandler<THandler>( provider => new HandlerImpl()); }) ...
Please see the documentation for more details.
-
Support for customization of server options and transport settings when configuring aspnetcore listener or remoting listener.
Configure with HttpSysOptions when using HttpSys.
... .DefineAspNetCoreListener( listenerBuilder => { listenerBuilder.UseHttpSys(options => { ... }); }) ...
Configure with KestrelServerOptions when using Kestrel.
... .DefineAspNetCoreListener( listenerBuilder => { listenerBuilder.UseKestrel(options => { ... }); }) ...
Configure with FabricTransportRemotingListenerSettings when using remoting.
... .DefineRemotingListener( listenerBuilder => { listenerBuilder.UseSettings(() => new FabricTransportRemotingListenerSettings())); }) ...
Please see the documentation for more details.
- We are released!
- Renamed
.UseEndpointName(...)
to.UseEndpoint(...)
for both aspnetcore listener and remoting listener.
-
Replace
ConfigureStatefulService(...)
andConfigureStatelessService(...)
withDefineStatefulService(...)
andDefineStatelessService(...)
methods. This is related to the updated behavior of these methods - previously their behavior was additive and used to configure single stateful service or stateless service. Now each call toDefineStatefulService(...)
orDefineStatelessService(...)
would result into registration of new service.Please see the documentation for more details.
-
Removed
ConfigureDependencies(...)
from aspnetcore listener because there is no generic way to overrideIServiceCollection
used byWebHostBuilder
.
- A way to override dependencies container used in service, delegate and remoting listener using
UseDependencies(...)
method. - A way to define a delegate to execute in service
RunAsync(...)
method (article)
-
A bug when ServiceType was registered multiple times.
Please see the issue for more details.
- Integration with HostBuilder. This allows easy-to-go configuration flow.
- Project is renamed to CoherentSolutions.Extensions.Hosting.ServiceFabric.
-
Support for Service Remoting V2.
Please see the documentation for more details.
-
Support for hierarchical dependency injection when configuring stateful service or stateless service.
Please see the documentation for more details.
-
A bug when minimal configuration of
IWebHost
throw an exception.Please see the issue for more details.
-
Support for Microsoft.Extensions.Logging event redirection to ETW.
Please see the documentation for more details.
- The initial release.
(c) 2021 Coherent Solutions Inc.
GENERAL
GETTING STARTED
UNDERSTANDING THE PROJECT
SAMPLES