Service Fabric is a great platform for application hosting which offers high-density hosting, application upgrade, and state replication.
Many users, such as myself, would rather use Orleans than Service Fabric Reliable Actors. There are many reasons for this, including that Orleans is much more mature, open source, and feature rich.
We have integration packages for hosting Orleans atop Service Fabric. This integration is simple and effective but does not allow Orleans to gain all of the benefits which Service Fabric has to offer, such as collocated state.
Orleans should be the obvious choice for Virtual Actors in any hosting environment, so there is some additional work to be done which I would like insight into and assistance with.
This issue is for discussion and tracking of that work.
Basic Integration:
Integration Required for Collocated State:
Extras:
General Work Which Would Help:
Much of this work would be much easier if dependency injection was used more pervasively throughout Orleans. There should not be a GatewayProviderType enum and there definitely should not be a GatewayProviderType.ZooKeeper value. Those things should be configured in a strongly typed manner.
Result:
Ultimately, this will give us integration which is on-par with Service Fabric's Reliable Actors implementation. We will also have all of the added features of Orleans.
Anything I've missed? Any obvious/subtle challenged which I may have overlooked?
Service Fabric is a great platform for application hosting which offers high-density hosting, application upgrade, and state replication.
Many users, such as myself, would rather use Orleans than Service Fabric Reliable Actors. There are many reasons for this, including that Orleans is much more mature, open source, and feature rich.
We have integration packages for hosting Orleans atop Service Fabric. This integration is simple and effective but does not allow Orleans to gain all of the benefits which Service Fabric has to offer, such as collocated state.
Orleans should be the obvious choice for Virtual Actors in any hosting environment, so there is some additional work to be done which I would like insight into and assistance with.
This issue is for discussion and tracking of that work.
Basic Integration:
Integration Required for Collocated State:
IGatewayListProviderbased on Service Fabric'sNamingService. Added in Service Fabric cluster membership providers #2542This should involve creating anThis involves creating anIMembershipTableimplementation which leverages Fabric'sNamingServiceorPropertyService.IMembershipOracleimplementation which can receive updates directly from Service Fabric in addition to periodically polling partitions. Added in Service Fabric cluster membership providers #2542GrainIdto partitions. Using consistent hashing means that we do not need to hold/maintain a grain directory. One potential downside to this approach is that we rely on the randomness of GrainIds to balance load across hosts and cannot perform load shedding in a granular fashion. This is mitigated by using a significant number of partitions, allowing Service Fabric to perform this load balancing at the partition level by shifting partitions between nodes based. This change requires only that we configure a newPlacementStrategy/PlacementDirectorwhich resolvesGrainIdtoSiloAddressbased upon Service Fabric partitions. We can optionally eliminate the Grain Directory when we are using Service Fabric, but keeping the Grain Directory around allows us to use different placement strategies (as long as they are stateless or use a state provider which doesn't require consistent mapping betweenGrainId& Fabric partition.)IReliableDictionary<GrainId,byte[]>, using Service Fabric's Reliable Services model.Extras:
IReliableQueue<T>which can be used to produce anIStreamProvider.General Work Which Would Help:
Much of this work would be much easier if dependency injection was used more pervasively throughout Orleans. There should not be a
GatewayProviderTypeenum and there definitely should not be aGatewayProviderType.ZooKeepervalue. Those things should be configured in a strongly typed manner.Result:
Ultimately, this will give us integration which is on-par with Service Fabric's Reliable Actors implementation. We will also have all of the added features of Orleans.
Anything I've missed? Any obvious/subtle challenged which I may have overlooked?