Service Fabric spawn actor on startup

放肆的年华 提交于 2019-12-23 10:56:55
问题 Is there a way to require the system to spawn certain actors on startup. Currently I activate the set of actors that I need in Program.cs after the actor registration. This is working ok, but I occasionally get a ReminderLoadInProgressException because the actor that is being activated needs to register a reminder but not all reminders have been loaded at the time it tries to do that. Is there standard way to seed the cluster? 回答1: No, you need something to activate your actors. Program.cs

Service fabric actor state and list

坚强是说给别人听的谎言 提交于 2019-12-13 22:15:58
问题 Is it recommended to have a list in Service fabric actor? I am trying to keep User favorites in a User Actor. What is best approach for this scenario? 回答1: Yes, as long as you treat the list as immutable. The state manager retrieval methods return a reference to an object in local memory. Modifying this object in local memory alone does not cause it to be saved durably. When an object is retrieved from the state manager and modified, it must be reinserted into the state manager to be saved

Dynamically creating services in an service fabric application

断了今生、忘了曾经 提交于 2019-12-11 01:01:46
问题 This is a bit descriptive so please bear with me. :) In the application that I'm trying to build, there are distinct functionalities of product. Users can choose to opt-in for functionality A, B, D but not C. The way I'm building this, is that each of the distinct functionality is a Service (stateless, I'm thinking of storing the data in Azure SQL DBs and exposing REST APIs from each service). Bundled all services together is an ApplicationType. For each customer tenant (consider this as an